[Bug 31550] New: Patrizier 2 Gold crashes in wined3d_device_set_render_target
http://bugs.winehq.org/show_bug.cgi?id=31550 Bug #: 31550 Summary: Patrizier 2 Gold crashes in wined3d_device_set_render_target Product: Wine Version: 1.5.11 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs(a)winehq.org ReportedBy: j.wielicki(a)sotecware.net Classification: Unclassified Regression SHA1: befdbbd90f3be5e044d11be8af049410e7628f00 Created attachment 41491 --> http://bugs.winehq.org/attachment.cgi?id=41491 quickfix which worksforme I revived that old game a few days ago, just to find that it crashes during startup in wine. Other OpenGL/DirectX games run fine though. I bisected wine between 1.3.2 and 1.5.8 to find commit befdbbd90f3be5e044d11be8af049410e7628f00 Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jun 18 17:19:39 2012 +0200 wined3d: Reset render target bindings in wined3d_device_reset(). to be the first bad commit according to git. The crash occurs in wined3d_device_set_render_target, which is called by wined3d_device_reset, when attempting to access device->fb.render_targets, which is a nil value at that time. My hotfix is to check for device->fb.render_targets be-ing non-NULL before calling wined3d_device_set_render_target from wined3d_device_reset. Appearantly it is perfectly fine to leave these calls out, as they were added by the bad commit which introduced the regression. A quick test through my <del>games</del><ins>hardware accellerated graphics test applications</ins> makes it appear that this patch doesn't break anything. The patch is made against the current master. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31550 --- Comment #1 from j.wielicki(a)sotecware.net 2012-08-26 06:39:14 CDT --- Created attachment 41492 --> http://bugs.winehq.org/attachment.cgi?id=41492 log + traceback of the crash -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31550 j.wielicki(a)sotecware.net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |j.wielicki(a)sotecware.net -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31550 --- Comment #2 from j.wielicki(a)sotecware.net 2012-08-26 06:44:01 CDT --- To clarify the statement: “Appearantly it is perfectly fine to leave these calls out, as they were added by the bad commit which introduced the regression.” The commit message suggests that they are added to ”reset”, that is to put the render target into the initial state, if device_reset is called more than once (with different d3d calls inbetween). That suggests for me that one can leave out these calls on the first call to device_reset. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31550 --- Comment #3 from Henri Verbeet <hverbeet(a)gmail.com> 2012-08-26 07:51:41 CDT --- Do you have any custom Direct3D registry settings? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31550 Henri Verbeet <hverbeet(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31550 --- Comment #4 from j.wielicki(a)sotecware.net 2012-08-26 08:06:55 CDT --- Not sure what “custom” means in that context. The key HKCU/Software/Wine/AppDefaults/Patrizier 2.exe does not contain any Direct3D key. However, HKCU/Software/Wine/Direct3D has two values: DirectDrawRenderer REG_SZ "gdi" DirectDrawRenderer REG_SZ "opengl" Which looks odd to me, as I thought a key can only have one value with a given name ... Not sure whether that matters, as this seems not specific to P2. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31550 --- Comment #5 from Henri Verbeet <hverbeet(a)gmail.com> 2012-08-26 08:20:03 CDT --- Created attachment 41493 --> http://bugs.winehq.org/attachment.cgi?id=41493 patch (In reply to comment #4)
Not sure what “custom” means in that context. The key HKCU/Software/Wine/AppDefaults/Patrizier 2.exe does not contain any Direct3D key. However, HKCU/Software/Wine/Direct3D has two values:
DirectDrawRenderer REG_SZ "gdi" DirectDrawRenderer REG_SZ "opengl"
Which looks odd to me, as I thought a key can only have one value with a given name ...
Yeah, that's a bit odd, particularly if you didn't put that there yourself. Regardless, it looks like it's picking up the "DirectDrawRenderer" = "gdi" setting. You almost never want to set that, unless it's used as a workaround for a specific bug. Does the attached patch also help? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31550 --- Comment #6 from j.wielicki(a)sotecware.net 2012-08-26 08:30:03 CDT --- No, the attached patch does not fix the error (backtrace looks the same). I found the reason for the duplicate keys, the opengl one has a typo in its name ;). So gdi is effective and also the trigger for this bug. Removing the gdi key makes the error go away. _But_ I am using gdi to work around a problem in another application (Neverwinter Nights). Not sure whether this bug still applies then, as I probably just could setup the renderer for Neverwinter Nights and leave the default for Patrizier 2. I think though that it should work with both ;). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31550 --- Comment #7 from Henri Verbeet <hverbeet(a)gmail.com> 2012-08-26 08:58:34 CDT --- (In reply to comment #6)
I think though that it should work with both ;). Sure. It's just that gdi DirectDrawRenderer has several known issues, and won't work at all for ddraw applications that do 3D rendering. The long term plan is for it to go away once the remaining issues with the OpenGL renderer are fixed.
I actually slightly misread the original backtrace, and thought it was crashing on line 5170. The patch you attached should be fine. Could you send it to wine-patches? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31550 --- Comment #8 from j.wielicki(a)sotecware.net 2012-08-26 09:07:17 CDT --- submitted as Message-ID: <503A2D3F.4050501(a)sotecware.net> Thanks for looking at it! -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31550 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |a64b7918c8171ce208e82ecc2fa | |909ebc3626037 Status|UNCONFIRMED |RESOLVED CC| |00cpxxx(a)gmail.com Resolution| |FIXED --- Comment #9 from Bruno Jesus <00cpxxx(a)gmail.com> 2012-08-29 16:00:48 CDT --- Patch commited: source.winehq.org/git/wine.git/commitdiff/a64b7918c8171ce208e82ecc2fa909ebc3626037 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31550 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #10 from Alexandre Julliard <julliard(a)winehq.org> 2012-08-31 12:57:06 CDT --- Closing bugs fixed in 1.5.12. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org