I have a problem with OGL , during initialisation I have a segfault occurring in the following code segment, note that I have instrumented the code
XVisualInfo *X11DRV_setup_opengl_visual( Display *display ) { XVisualInfo *visual = NULL; /* In order to support OpenGL or D3D, we require a double-buffered visual and stencil buffer support, */ fprintf(stderr,"setup visual\n"); int dblBuf[] = {GLX_RGBA,GLX_DEPTH_SIZE, 16, GLX_STENCIL_SIZE, 8, GLX_DOUBLEBUFFER, None}; if (!has_opengl()) return NULL; fprintf(stderr,"Choosing Visual display=%p DefaultScreen=%p dblBuf=%p\n",display, DefaultScreen(display), dblBuf); wine_tsx11_lock(); ************************Crash Occurs in the following line visual = pglXChooseVisual(display, DefaultScreen(display), dblBuf); wine_tsx11_unlock(); fprintf(stderr,"Visual is %d\n",visual);
Output is setup visual Choosing Visual display=81ad320 DefaultScreen=0 dblBuf=7fd1ef70 Handling exception at EIP 7f0434b7 accessing 2a0 wine: Unhandled page fault on read access to 0x000002a0 at address 7f0434b7 (thread 0009), starting debugger... Can't attach process 8: error 5
I suspect the problem is DefaultScreen returning 0 Anyone know where this is defined ?