I created an application that uses EGL and I wondered why it freezes. Them problem lies with EGL. It can be reproduced with the following code:
Code: Select all
int main(int argc, char *argv[])
{
EGLDisplay display_ = EGL_NO_DISPLAY;
bcm_host_init();
display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY);
eglInitialize(display_, NULL, NULL);
eglTerminate(display_);
display_ = EGL_NO_DISPLAY;
bcm_host_deinit();
return 0;
}
Debugging shows that it hangs at:
Code: Select all
#0 0xb6d17b5c in ioctl () from /lib/libc.so.6
#1 0xb6f41908 in create_service.constprop.4 () from /usr/lib/libvchiq_arm.so
#2 0xb6f4404c in vchi_service_open () from /usr/lib/libvchiq_arm.so
#3 0xb6f53c84 in vc_vchi_gencmd_init () from /usr/lib/libbcm_host.so
#4 0xb6f5256c in bcm_host_init () from /usr/lib/libbcm_host.so
#5 0x00008660 in main (argc=<optimized out>, argv=<optimized out>) at egl_bug.cpp:17
yoth
NOTE: Problem was fixed in https://github.com/raspberrypi/firmware/issues/185