http://bugs.winehq.org/show_bug.cgi?id=27838
Summary: Can't change some graphics settings in GTAIV Product: Wine Version: 1.3.24 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: b7.10110111@gmail.com
Steps to reproduce: 1. start gtaiv 2. go to options 3. Change a setting, e.g. "Shadow quality" 4. Press <Space> to apply 5. See an error: GTA IV FATAL ERROR: DD3D80: D3D reset failed - Please restart the game. After i press OK, a segfault occurs. (In some of the previous wine versions i just got segfault without this error message, so something has improved since then).
http://bugs.winehq.org/show_bug.cgi?id=27838
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor
--- Comment #1 from Austin English austinenglish@gmail.com 2011-07-22 23:06:30 CDT --- If you've got time to kill, running a regression test to find what commit improved things may give us a hint.
In either case, terminal output?
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #2 from Ruslan b7.10110111@gmail.com 2011-07-23 06:29:52 CDT --- OK, done a "regression" test. It appears that there's a commit which had previously fixed problems in resetting D3D state: __________________________GOOD______________________________________ fadfdf21c055caf833a137ffc269c2073dc87fd6 is the first good commit commit fadfdf21c055caf833a137ffc269c2073dc87fd6 Author: Henri Verbeet hverbeet@codeweavers.com Date: Fri Apr 15 18:33:37 2011 +0200
wined3d: Forward surface refcounts to the container.
This will prevent textures from being released if one of its surfaces is still in use by the stateblock. We have similar constructions in d3d8 and d3d9, but those won't prevent the wined3d texture from being released.
:040000 040000 9524a301f942c04b1bd19f6ee763a8662a5afccd a0888eab4fd4a02d6d488071e7b4e84d62f671e0 M dlls ________________________END_GOOD__________________________________________ Before it, changes to GTAIV "shadow quality" setting lead to one-time crash (i.e. game continues to work after restart) without error messages. After it, things work perfectly well (at least in game menu with no game loaded itself), i.e. i can change graphics settings without errors and without crashes - works as intended.
Next, there's a commit which breaks this perfect state introducing the "D3D reset failed" error: _________________________BAD_______________________________________ 99092e8a0a74a77efec0526c0ccad61c9ebe3544 is the first bad commit commit 99092e8a0a74a77efec0526c0ccad61c9ebe3544 Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed May 4 22:18:43 2011 +0200
d3d9: Simplify reset_enum_callback().
Note that the existing code wouldn't work for volumes, since volumes aren't proper resources in d3d9.
:040000 040000 d4bc7d3373f9ddf3ef71c0dbb5abd7c6a844f83c 78f53c2354c1f322d45332d766f2d2cc16466409 M dlls _______________________END_BAD_____________________________________________
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #3 from Ruslan b7.10110111@gmail.com 2011-07-23 06:32:38 CDT --- Created an attachment (id=35655) --> (http://bugs.winehq.org/attachment.cgi?id=35655) Crash log when no error message appears (the earliest breakage)
It appears after i press <Space> to apply changes, then click close button on wine exception box.
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #4 from Ruslan b7.10110111@gmail.com 2011-07-23 06:33:56 CDT --- Created an attachment (id=35656) --> (http://bugs.winehq.org/attachment.cgi?id=35656) Log when D3D reset error appears
I press space as before, then click OK in message box, then press close button on wine crash window.
http://bugs.winehq.org/show_bug.cgi?id=27838
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adys.wh@gmail.com, | |hverbeet@gmail.com
--- Comment #5 from Jerome Leclanche adys.wh@gmail.com 2011-07-23 07:25:12 CDT --- CC henri
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #6 from Henri Verbeet hverbeet@gmail.com 2011-07-23 10:34:08 CDT --- Could you create a log with WINEDEBUG="+d3d9,+d3d,+d3d_surface"?
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #7 from Ruslan b7.10110111@gmail.com 2011-07-23 11:40:45 CDT --- WINEDEBUG='+d3d9,+d3d,+d3d_surface' wine LaunchGTAIV.exe &> wine-d3d.log Here it is: http://www.filedropper.com/wine-d3dlog. It's 102M in uncompressed state, 1.1M bzip2 compressed, so bugzilla can't accept it directly.
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #8 from Ruslan b7.10110111@gmail.com 2011-07-23 13:02:37 CDT --- Might be useful for comparison: the same log, but with wine-1.3.18-3-gfadfdf2, where this bug doesn't exist (the good commit I named): http://www.filedropper.com/wine-d3d-goodlog
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #9 from Henri Verbeet hverbeet@gmail.com 2011-07-23 16:49:41 CDT --- Created an attachment (id=35667) --> (http://bugs.winehq.org/attachment.cgi?id=35667) patch
Does this patch make it any better?
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #10 from Ruslan b7.10110111@gmail.com 2011-07-23 17:29:00 CDT --- (In reply to comment #9)
Created an attachment (id=35667)
--> (http://bugs.winehq.org/attachment.cgi?id=35667) [details]
patch
Does this patch make it any better?
This patch fixes all settings when the game isn't loaded, but in-game changes to "Reflection resolution", "Water quality" and "Shadow quality" still lead to D3D reset failure.
On commit fadfdf21c055caf833a137ffc269c2073dc87fd6 these settings worked correctly, but some messages were printed to console while they were being applied (with WINEDEBUG unset):
err:d3d_surface:surface_set_texture_name Surface has SFLAG_INTEXTURE set, but no texture name. err:d3d_surface:surface_modify_location Surface 0x21e230 does not have any up to date location. fixme:keyboard:X11DRV_LoadKeyboardLayout L"0", 0002: stub! fixme:keyboard:X11DRV_MapVirtualKeyEx keyboard layout (nil) is not supported err:d3d:device_resource_released Texture 0x21de70 is still in use by stateblock 0x276c1fc8, stage 16. err:d3d:device_resource_released Texture 0x275cdb38 is still in use by stateblock 0x276c1fc8, stage 19. err:d3d_surface:surface_set_texture_name Surface has SFLAG_INTEXTURE set, but no texture name. err:d3d_surface:surface_modify_location Surface 0x44825ee0 does not have any up to date location. err:d3d:device_resource_released Texture 0x3f89fa18 is still in use by stateblock 0x276d4e00, stage 16. err:d3d:device_resource_released Texture 0x421b0198 is still in use by stateblock 0x276d4e00, stage 19. err:d3d_surface:surface_set_texture_name Surface has SFLAG_INTEXTURE set, but no texture name. err:d3d_surface:surface_modify_location Surface 0x4b6f1790 does not have any up to date location. fixme:keyboard:X11DRV_LoadKeyboardLayout L"0", 0002: stub! fixme:keyboard:X11DRV_MapVirtualKeyEx keyboard layout (nil) is not supported err:d3d:device_resource_released Texture 0x44351ad0 is still in use by stateblock 0x3f68c438, stage 16. err:d3d:device_resource_released Texture 0x4433af40 is still in use by stateblock 0x3f68c438, stage 19. err:d3d_surface:surface_set_texture_name Surface has SFLAG_INTEXTURE set, but no texture name. err:d3d_surface:surface_modify_location Surface 0x4ea48480 does not have any up to date location. err:d3d:device_resource_released Texture 0x4b5bd6b0 is still in use by stateblock 0x3f69d240, stage 16. err:d3d:device_resource_released Texture 0x42d420c0 is still in use by stateblock 0x3f69d240, stage 19. err:d3d_surface:surface_set_texture_name Surface has SFLAG_INTEXTURE set, but no texture name.
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #11 from Henri Verbeet hverbeet@gmail.com 2011-07-24 08:46:08 CDT --- Could you create a new log for that, and include +d3d_texture?
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #12 from Ruslan b7.10110111@gmail.com 2011-07-24 08:47:46 CDT --- (In reply to comment #11)
Could you create a new log for that, and include +d3d_texture?
For new patch or for commit where everything worked?
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #13 from Henri Verbeet hverbeet@gmail.com 2011-07-24 08:51:18 CDT --- WINEDEBUG="+d3d9,+d3d,+d3d_surface,+d3d_texture", with the patch applied on top of current git.
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #14 from Ruslan b7.10110111@gmail.com 2011-07-24 09:14:56 CDT --- Here it is: http://www.filedropper.com/wine-d3d-newlog I loaded the game, then tried to change "Reflection resolution", then pressed OK in error message, and Close in exception handler.
http://bugs.winehq.org/show_bug.cgi?id=27838
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #35667|0 |1 is obsolete| |
--- Comment #15 from Henri Verbeet hverbeet@gmail.com 2011-07-24 11:46:50 CDT --- Created an attachment (id=35675) --> (http://bugs.winehq.org/attachment.cgi?id=35675) patch
Could you give this patch a try?
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #16 from Ruslan b7.10110111@gmail.com 2011-07-24 13:51:08 CDT --- (In reply to comment #15)
Created an attachment (id=35675)
--> (http://bugs.winehq.org/attachment.cgi?id=35675) [details]
patch
Could you give this patch a try?
Now every option seems to work, so this patch completely fixes the bug.
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #17 from Henri Verbeet hverbeet@gmail.com 2011-07-26 11:42:36 CDT --- Should be fixed by 11955307951540b0c51d3517ef01364038cf96b5 and 27b20bac43a1cc54037d2daec81f90d3f3479473.
http://bugs.winehq.org/show_bug.cgi?id=27838
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #18 from Austin English austinenglish@gmail.com 2011-07-26 12:28:34 CDT --- (In reply to comment #17)
Should be fixed by 11955307951540b0c51d3517ef01364038cf96b5 and 27b20bac43a1cc54037d2daec81f90d3f3479473.
Fixed.
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #19 from Ruslan b7.10110111@gmail.com 2011-07-26 12:36:52 CDT --- (In reply to comment #17)
Should be fixed by 11955307951540b0c51d3517ef01364038cf96b5 and 27b20bac43a1cc54037d2daec81f90d3f3479473.
Huh... so small changes compared to test patch.. But yes, i confirm that this is fixed.
http://bugs.winehq.org/show_bug.cgi?id=27838
--- Comment #20 from Henri Verbeet hverbeet@gmail.com 2011-07-26 12:41:14 CDT --- (In reply to comment #19)
(In reply to comment #17)
Should be fixed by 11955307951540b0c51d3517ef01364038cf96b5 and 27b20bac43a1cc54037d2daec81f90d3f3479473.
Huh... so small changes compared to test patch.. But yes, i confirm that this is fixed.
The test patch also had some of the required infrastructure changes from 0739cae273387d4ee4ac987d583d5ec3105c792d, c84112f86fd336c4813e4b6c677492604481d0a2 and 44e109debea3f1b26d908273f384260dc3fedb96, but only the last two patches in that series fix the actual bugs.
http://bugs.winehq.org/show_bug.cgi?id=27838
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #21 from Alexandre Julliard julliard@winehq.org 2011-08-05 12:38:36 CDT --- Closing bugs fixed in 1.3.26.