AnsweredAssumed Answered

Segmentaion fault in libEGL-dfb on i.mx6 SABRE

Question asked by David Wretman on Feb 27, 2014
Latest reply on Jun 13, 2014 by Yixing Kong
Branched to a new discussion



I'm trying to run a simple OpenGL application with the DirectFB enabled vivante libraries from gpu-viv-bin-mx6q. When trying to initialize EGL I get a segmentation fault in what i guess is the The callstack is as follows:


GetDFBSurfFormat() at gc_hal_user_dfb.c:61 0x2af52a50  

gcoOS_GetWindowInfoEx() at gc_hal_user_dfb.c:1,191 0x2af53524  

veglGetWindowInfo() at gc_egl_platform.c:139 0x2ac57ce8  

_CreateSurface() at gc_egl_surface.c:1,690 0x2ac52bd4  

eglCreateWindowSurface() at gc_egl_surface.c:2,712 0x2ac5381c  

init() at SimpleTriangle.c:213 0x9a7c  

main() at SimpleTriangle.c:353 0xa224  


I'm trying to initialize the EGL with the following code:


   DFBResult err;


   DFBSurfaceDescription dsc;


   DFBCHECK(DirectFBInit(&argc, &argv));


   // create the super interface



   // create an event buffer for all devices with these caps

   DFBCHECK(dfb->CreateInputEventBuffer(dfb, DICAPS_KEYS | DICAPS_AXES, DFB_FALSE, &events));


   // set our cooperative level to DFSCL_FULLSCREEN for exclusive access to the primary layer

   dfb->SetCooperativeLevel(dfb, DFSCL_FULLSCREEN);


   // get the primary surface, i.e. the surface of the primary layer we have exclusive access to

   dsc.flags = DSDESC_CAPS;



   DFBCHECK(dfb->CreateSurface(dfb, &dsc, &primary));


   // get the size of the surface and fill it

   //DFBCHECK(primary->GetSize(primary, &screen_width, &screen_height));

   //DFBCHECK(primary->FillRectangle(primary, 0, 0, screen_width, screen_height));



   egldisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);

   eglInitialize(egldisplay, NULL, NULL);

   assert(eglGetError() == EGL_SUCCESS);



   eglChooseConfig(egldisplay, s_configAttribs, &eglconfig, 1, &numconfigs);

   assert(eglGetError() == EGL_SUCCESS);

   assert(numconfigs == 1);


   eglsurface = eglCreateWindowSurface(egldisplay, eglconfig, (EGLNativeWindowType)primary, NULL);



Has anybody experienced something similar or do you have a working example with this configuration?