I've been trying to run wine with a few games, and I've been getting a similar error and backtrace with all of them. Here's the relevant info:
wine: Unhandled page fault on read access to 0x00000000 at address 0xf748c110 (thread 0043), starting debugger... Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0xf748c110). ... Backtrace: =>0 0xf748c110 in libc.so.6 (+0x74110) (0x0032e670) 1 0x7e59fae9 X11DRV_WineGL_InitOpenglInfo+0x353() [/home/jb/programs/wine-git/dlls/winex11.drv/opengl.c:351] in winex11 (0x0032e670) ... (goes on for a dozen or so more, not relevant to this bug)
So my first thought was "What's wrong with libc?" Then I looked at the source of the file at level 1 of the stack and found this:
350: str = (const char *) pglGetString(GL_EXTENSIONS); 351: WineGLInfo.glExtensions = HeapAlloc(GetProcessHeap(), 0, strlen(str)+1);
From this it's obvious that pglGetString is returning a null pointer. It would be better to do something like this instead:
str = (const char *) pglGetString(GL_EXTENSIONS); if(str == 0) { ERR( "Couldn't find GL_EXTENSIONS string, disabling OpenGL.\n" ); goto done; } WineGLInfo.glExtensions = HeapAlloc(GetProcessHeap(), 0, strlen(str)+1);
What do you think?
Joshua Beck jxb091000@utdallas.edu wrote:
350: str = (const char *) pglGetString(GL_EXTENSIONS); 351: WineGLInfo.glExtensions = HeapAlloc(GetProcessHeap(), 0, strlen(str)+1);
From this it's obvious that pglGetString is returning a null pointer.
What OpenGL driver are you using? glGetString(GL_EXTENSIONS) returning NULL might be a driver bug.
It would be better to do something like this instead:
str = (const char *) pglGetString(GL_EXTENSIONS); if(str == 0) { ERR( "Couldn't find GL_EXTENSIONS string, disabling OpenGL.\n" ); goto done; } WineGLInfo.glExtensions = HeapAlloc(GetProcessHeap(), 0, strlen(str)+1);
What do you think?
WineGLInfo.glExtensions is used in other places in the code, it must be initialized.
On 22 March 2011 08:59, Joshua Beck jxb091000@utdallas.edu wrote:
What do you think?
Does the pglXMakeCurrent() call a few lines above succeed? We should probably check the result of that call. Nevertheless, this means something is broken with your GL setup, so while the error handling could be improved, it's not going to make the application work. With the NVIDIA drivers this kind of thing typically happens when you have a version mismatch between libGL and the kernel module.
On 03/22/2011 05:55 AM, Henri Verbeet wrote:
On 22 March 2011 08:59, Joshua Beckjxb091000@utdallas.edu wrote:
What do you think?
Does the pglXMakeCurrent() call a few lines above succeed? We should probably check the result of that call.
It doesn't succeed. I added some FIXMEs to the code to get output for debugging and this is what it printed before it crashed:
fixme:wgl:X11DRV_WineGL_InitOpenglInfo pglXMakeCurrent returned 0 fixme:wgl:X11DRV_WineGL_InitOpenglInfo pglGetString pointer is equal to 0 Nevertheless, this means something is broken with your GL setup, so while the error handling could be improved, it's not going to make the application work. With the NVIDIA drivers this kind of thing typically happens when you have a version mismatch between libGL and the kernel module.
I know it's not going to make it work, but it's still a good idea to have descriptive error messages. It helps less technically skilled people figure out what's wrong. Also wine-devel isn't really the place to ask for help setting up 32-bit drivers, so I didn't ask for that help here. If you want to help me we should email each other outside of the mailing list.