http://bugs.winehq.org/show_bug.cgi?id=20448
Summary: Touhou 7 and 10 segfault at startup with Intel drivers >= 2.7, 64-bit Product: Wine Version: 1.1.32 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: hyperair@gmail.com
Created an attachment (id=24300) --> (http://bugs.winehq.org/attachment.cgi?id=24300) Adds a NULL pointer check before dumping FBO attachments
Touhou 7 and 10 segfault at startup with Intel drivers >= 2.7, 64-bit. The reason for this is context_check_fbo_status() being passed a NULL pointer in context->current_fbo by content_apply_fbo_state().
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #1 from Chow Loong Jin hyperair@gmail.com 2009-10-23 17:25:22 --- Created an attachment (id=24301) --> (http://bugs.winehq.org/attachment.cgi?id=24301) Terminal output
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #2 from Chow Loong Jin hyperair@gmail.com 2009-10-23 17:25:43 --- Created an attachment (id=24302) --> (http://bugs.winehq.org/attachment.cgi?id=24302) Backtrace of segfault.
http://bugs.winehq.org/show_bug.cgi?id=20448
Chow Loong Jin hyperair@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #24302|application/octet-stream |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #3 from Henri Verbeet hverbeet@gmail.com 2009-10-23 19:33:28 --- That situation can only happen when your graphics driver setup is broken. The window system provided framebuffer can never be invalid, and 0 is not a valid return code for glCheckFramebufferStatus().
I'd be ok with printing an ERR instead of crashing, but I doubt it'll make the application work correctly. I think there's already a bug filed against Mesa for this.
http://bugs.winehq.org/show_bug.cgi?id=20448
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Component|directx-d3d |-unknown Resolution| |INVALID
--- Comment #4 from Vitaliy Margolen vitaliy@kievinfo.com 2009-10-23 20:12:41 --- Invalid then per comment #3.
http://bugs.winehq.org/show_bug.cgi?id=20448
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Vitaliy Margolen vitaliy@kievinfo.com 2009-10-23 20:12:50 --- Closing - not Wine bug.
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #6 from Chow Loong Jin hyperair@gmail.com 2009-10-24 00:45:56 --- On the contrary, the attached patch makes the said applications work very nicely indeed. Would you be fine with accepting a patch that prints an ERR instead then?
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #7 from Chow Loong Jin hyperair@gmail.com 2009-10-24 01:10:11 --- Actually digging around context.c has led me to see one case where context->current_fbo can remain NULL.
From context_apply_fbo_state(),
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #8 from Chow Loong Jin hyperair@gmail.com 2009-10-24 01:21:49 --- Sorry, please ignore my previous comment. It was submitted prematurely.
Actually digging around context.c has led me to see one case where context->current_fbo can remain NULL.
From context_apply_fbo_state(), if !context->render_offscreen,
context->current_fbo = NULL; context_bind_fbo (context, GL_FRAMEBUFFER, NULL);
In context_bind_fbo(), f = 0; if (context->fbo_read_binding == f && context->fbo_draw_binding == f) return; context->fbo_read_binding = f; context->fbo_draw_binding = f; gl_info->fbo_ops.glBindFramebuffer(target, f);
The above code doesn't touch context->current_fbo, does it? Unless I'm mistaken and somewhere in gl_info->fbo_ops.glBindFramebuffer(target, f) sets it somehow?
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #9 from Henri Verbeet hverbeet@gmail.com 2009-10-24 05:54:01 --- Created an attachment (id=24309) --> (http://bugs.winehq.org/attachment.cgi?id=24309) patch
Yes, it's NULL if the application is rendering onscreen. But in that case "status" in context_check_fbo_status() should *always* be GL_FRAMEBUFFER_COMPLETE. I'll submit something like the attached patch.
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #10 from Chow Loong Jin hyperair@gmail.com 2009-10-24 07:43:35 --- That'd be cool. Something I noticed after applying the patch is that performance really sucks unless I disable all the err and fixme messages via `export WINEDEBUG=fixme-all,err-all` prior to starting the game, but that's another issue.
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #11 from Henri Verbeet hverbeet@gmail.com 2009-10-26 04:02:06 --- Yes, debug output can slow things down quite a bit. If you care about performance you usually want to run with WINEDEBUG="-all".
For what it's worth, the relevant Mesa bug report is http://bugs.freedesktop.org/show_bug.cgi?id=23335. It seems there's at least a configuration issue on your side as well, since you generally want to avoid indirect rendering. Is your 32-bit libGL setup properly?
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #12 from Chow Loong Jin hyperair@gmail.com 2009-10-26 04:10:48 --- I'm pretty sure my configuration is quite fine. In fact, I managed to play Counter Strike 1.6 without the patch, using the OpenGL rendering method, as opposed to using D3D.
Also, I think I'm having direct rendering on -- `glxinfo | grep Direct` says yes.
Is there a way I could check if my 32-bit libGL stuff are fine?
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #13 from Henri Verbeet hverbeet@gmail.com 2009-10-26 04:14:40 --- (In reply to comment #12)
Also, I think I'm having direct rendering on -- `glxinfo | grep Direct` says yes.
Yeah, but that uses your 64-bit GL setup.
Is there a way I could check if my 32-bit libGL stuff are fine?
Runnning with WINEDEBUG="+wgl" should show if you're using direct rendering or not.
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #14 from Chow Loong Jin hyperair@gmail.com 2009-10-26 04:52:22 --- trace:wgl:X11DRV_WineGL_InitOpenglInfo Direct rendering enabled: False
Hmm, it does look like direct rendering is disabled after all. I guess I'm missing some lib32 library or other. What should I be looking for?
http://bugs.winehq.org/show_bug.cgi?id=20448
--- Comment #15 from Henri Verbeet hverbeet@gmail.com 2009-10-26 04:58:40 --- (In reply to comment #14)
trace:wgl:X11DRV_WineGL_InitOpenglInfo Direct rendering enabled: False
Hmm, it does look like direct rendering is disabled after all. I guess I'm missing some lib32 library or other. What should I be looking for?
That's really a question you should be asking somewhere specific for your distro instead of Wine bugzilla, but you probably need a 32-bit Mesa or video driver package.