https://bugs.winehq.org/show_bug.cgi?id=39796
Bug ID: 39796 Summary: SCP Containment Breach page fault regression Product: Wine Version: 1.8-rc4 Hardware: x86-64 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: alexchandel@gmail.com
Created attachment 53104 --> https://bugs.winehq.org/attachment.cgi?id=53104 Backtrace of page fault in DirectDraw HAL mode
As of 1.8, SCP Containment Breach immediately suffers a memory access violation every time a new game is begun or a game is loaded, after the loading screen, but before anything has been rendered.
This occurs in all versions of SCP Containment Breach from 0.8ish through to the newest 1.2.3, in both DirectDraw HAL and Intel 945G mode. Backtraces attached.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #1 from alexchandel@gmail.com --- Created attachment 53105 --> https://bugs.winehq.org/attachment.cgi?id=53105 Backtrace of page fault in Intel 945G mode
https://bugs.winehq.org/show_bug.cgi?id=39796
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Summary|SCP Containment Breach page |SCP Containment Breach page |fault regression |fault
--- Comment #2 from Austin English austinenglish@gmail.com --- Please run a regression test: http://wiki.winehq.org/RegressionTesting
Does this have a free demo/download available?
https://bugs.winehq.org/show_bug.cgi?id=39796
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|regression | URL| |http://www.scpcbgame.com/
--- Comment #3 from Matteo Bruni matteo.mystral@gmail.com --- (In reply to Austin English from comment #2)
Please run a regression test: http://wiki.winehq.org/RegressionTesting
It doesn't sound like a regression. Alex, did the game work with previous Wine versions?
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #4 from alexchandel@gmail.com --- (In reply to Austin English from comment #2)
Please run a regression test: http://wiki.winehq.org/RegressionTesting
Does this have a free demo/download available?
Yes, the entire game is free (and open source). Download mirrors (which include source) are given on this page: http://www.scpcbgame.com/
(In reply to Matteo Bruni from comment #3)
(In reply to Austin English from comment #2)
Please run a regression test: http://wiki.winehq.org/RegressionTesting
It doesn't sound like a regression. Alex, did the game work with previous Wine versions?
Yes, it plays perfectly with Wine 1.6.2 stable. However, somewhere in this dev cycle, the memory errors began. It would be extremely inconvenient if the next table version of wine broke it.
https://bugs.winehq.org/show_bug.cgi?id=39796
alexchandel@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #5 from alexchandel@gmail.com --- As it occurred between the last stable release and now, this would seem to be an archetypical regression.
I can't run a bisect, at least for the next few weeks, but you're welcome to. The program is free; just run the exe, pick any resolution and choose Launch on the popup, choose New Game, enter a name, choose Start, wait for the game to load to 100%/try to render, and see the crash.
https://bugs.winehq.org/show_bug.cgi?id=39796
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download CC| |mstefani@redhat.com
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #6 from alexchandel@gmail.com --- The MAV regression still exists in 1.8
https://bugs.winehq.org/show_bug.cgi?id=39796
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
--- Comment #7 from Austin English austinenglish@gmail.com --- (In reply to alexchandel from comment #5)
I can't run a bisect, at least for the next few weeks, but you're welcome to. The program is free; just run the exe, pick any resolution and choose Launch on the popup, choose New Game, enter a name, choose Start, wait for the game to load to 100%/try to render, and see the crash.
It doesn't crash for me with an nvidia card (or with HAL), but I do see a crash on exit (wine-1.8-rc4)
with 1.7.8 (closest I have compiled to 1.6.2) it hangs when it should enter the game.
This looks hardware/driver dependent. It's not likely the regression will be fixed without you bisecting it.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #8 from alexchandel@gmail.com --- I just tested 1.7.8 with the DirectDraw HAL and (what I assume is) the Intel 945G (because there's a bug in 1.7.8 that causes both to be labelled DirectDraw HAL).
They each caused 2 MAVs in succession. Just like before, you are able to get through the menu. The MAVs happen AFTER you've selected a new game, right as the loading screen finishes when you should enter the game.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #9 from alexchandel@gmail.com --- Just tested 1.7.8 with the DirectDraw HAL and (what I assume is) the Intel 945G.
No MAV on launch now, it happens at exit.
For the first case, "fixme:d3d:resource_check_usage Unhandled usage flags 0x8." is spammed into the log during the load screen. And there is an occasional bug where the opening any screen overlay causes the screen to become permanently black.
In the second case, there are hundreds of malloc errors per second when the game is paused, and the pause screen is gradually corrupted.
Both experience at least two MAVs upon trying to exit the game. Remember, the game works fine 1.6.2.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #10 from alexchandel@gmail.com --- This is the repeating error from the latter case in 1.7.4:
*** set a breakpoint in malloc_error_break to debug wine(61883,0x403c5000) malloc: *** mach_vm_map(size=5197824) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #11 from alexchandel@gmail.com --- Created attachment 53895 --> https://bugs.winehq.org/attachment.cgi?id=53895 Backtrace of page fault on 1.9.5
Remarkably clean backtrace of page fault on 1.9.5
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #12 from Austin English austinenglish@gmail.com --- (In reply to alexchandel from comment #9)
Both experience at least two MAVs upon trying to exit the game. Remember, the game works fine 1.6.2.
So please bisect to find the faulty commit.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #13 from alexchandel@gmail.com ---
I can't edit the comment, due to that classic design flaw Bugzilla never fixed.(In reply to Austin English from comment #12)
(In reply to alexchandel from comment #9)
Both experience at least two MAVs upon trying to exit the game. Remember, the game works fine 1.6.2.
So please bisect to find the faulty commit.
Oh oops.
Comment 9 refers to wine 1.7.4.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #14 from alexchandel@gmail.com --- (In reply to alexchandel from comment #9)
Just tested 1.7.8 with the DirectDraw HAL and (what I assume is) the Intel 945G.
No MAV on launch now, it happens at exit.
For the first case, "fixme:d3d:resource_check_usage Unhandled usage flags 0x8." is spammed into the log during the load screen. And there is an occasional bug where the opening any screen overlay causes the screen to become permanently black.
In the second case, there are hundreds of malloc errors per second when the game is paused, and the pause screen is gradually corrupted.
Both experience at least two MAVs upon trying to exit the game. Remember, the game works fine 1.6.2.
PSA: Comment #9 refers to 1.7.4, NOT 1.7.8.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #15 from alexchandel@gmail.com --- Just tested 1.7.6 with the DirectDraw HAL and (what I assume is) the Intel 945G.
In the first case, there is no MAV when the game begins. Instead, Wine crashes when you try to quit the game with this lovely message: "err:seh:setup_exception_record stack overflow 2112 bytes in thread 0040".
In the second case, there is no MAV when the game begins. Instead it happens when you try to quit the game. There are fewer errors.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #16 from alexchandel@gmail.com --- Just tested 1.7.7 with the DirectDraw HAL and (what I assume is) the Intel 945G.
The first case now crashes with a MAV at 25% loaded, before the game has begun.
The second case now crashes with a MAV at 25% too.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #17 from alexchandel@gmail.com --- The very first step between 1.7.6 and 1.7.7, commit 3a9666f, couldn't be evaluated, because Wine couldn't even draw the game launcher window. If most of the commits between 1.7.6 and 1.7.7 are similarly unstable, a bisect may be impossible.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #18 from alexchandel@gmail.com --- In testing commit 8dc170e, the first graphics mode had no MAVs during loading or immediate gameplay; however quitting the game triggers either two MAVs or an "err:seh:setup_exception_record stack overflow 944 bytes in thread 0009", with no apparent pattern.
The second graphics mode is more bizarre: no MAVs during loading or immediate gameplay, but upon quitting the game an Illegal Instruction followed by a MAV occurs.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #19 from alexchandel@gmail.com --- Testing 90cb553:
For the first graphics option, no errors during the first loading, immediate game, or quitting back to the main menu. However, starting another new game, then trying to quit after in game triggered two MAVs, and an immediate crash afterwards.
The second graphics option had identical results.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #20 from alexchandel@gmail.com --- 784a913 was another untestable commit. Wine couldn't draw the game launcher; it just comes up as a 1px by 20px sliver of a window.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #21 from alexchandel@gmail.com --- 94509fb:
1st case: crashes with 2 MAVs after 25% of the game is loaded.
2nd case: likewise
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #22 from alexchandel@gmail.com --- 45d3731:
1st case: No MAVs on load, or during immediate gameplay. Quitting back to the main menu did not trigger an MAV.
2nd case: No MAVs on load, or during immediate gameplay. However quitting back to the main menu triggered two MAVs.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #23 from alexchandel@gmail.com --- 80055e1:
1st case: crashed with 2 MAVs after 25% of the game was loaded.
2nd case: likewise
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #24 from alexchandel@gmail.com --- 10411fb:
1st case: No MAV upon game loading. However, overlays had many graphical glitches, and the "malloc: *** mach_vm_map" message was spammed into the log. However no MAVs.
2nd case: No MAVs.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #25 from alexchandel@gmail.com --- (In reply to Austin English from comment #12)
(In reply to alexchandel from comment #9)
Both experience at least two MAVs upon trying to exit the game. Remember, the game works fine 1.6.2.
So please bisect to find the faulty commit.
``` 80055e1fcd0140d610d54bf7d48f3843245c7059 is the first bad commit commit 80055e1fcd0140d610d54bf7d48f3843245c7059 Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu Nov 14 10:47:17 2013 +0100
ddraw: Pass the ddraw texture to ddraw_surface_init().
:040000 040000 6f7f4c12bd34eb2db70142afe5112571f9fe40f9 24e43da3ce5adb42046b07b2901a93c6bf764d61 M dlls ```
This is the first commit that causes MAVs.
https://bugs.winehq.org/show_bug.cgi?id=39796
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hverbeet@gmail.com Regression SHA1| |80055e1fcd0140d610d54bf7d48 | |f3843245c7059
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #26 from Henri Verbeet hverbeet@gmail.com --- I can't seem to reproduce this. Can anyone else? Are you using any custom settings or patches? Please attach a log with either current git or wine-1.9.5 and WINEDEBUG="+tid,+seh,+ddraw,+d3d,+d3d_surface,+d3d_texture".
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #27 from Henri Verbeet hverbeet@gmail.com --- Also, I notice you have the Windows version set to "Windows 8". Could you please make sure this bug also happens in a clean prefix with default settings?
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #28 from Henri Verbeet hverbeet@gmail.com --- Created attachment 53924 --> https://bugs.winehq.org/attachment.cgi?id=53924 patch
Actually, does the attached patch make it any better? I do see the application (or rather the bundled fastext.dll) do some questionable things related to surface attachment/detachment and the surface vtbls, and this patch might make a difference.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #29 from alexchandel@gmail.com --- Created attachment 54018 --> https://bugs.winehq.org/attachment.cgi?id=54018 Log of crash on 1.9.6 DirectDraw HAL
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #30 from alexchandel@gmail.com --- Created attachment 54019 --> https://bugs.winehq.org/attachment.cgi?id=54019 Log of crash on 1.9.6 Intel 945G
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #31 from alexchandel@gmail.com --- I tested with a clean prefix, the error still always appears.
Henri,
I was unable to apply the patch to wine-1.9.6, because its dlls/ddraw/surface.c was incompatible. However, I noticed wine-1.9.6 had changes broadly similar to this patch, and I can confirm the issue still exists on 1.9.6. Moreover, I tested this on a different hardware setup (still OS X 10.11 x86_64) and received the same MAV. However the error messages have changed somewhat, so I've attached new logs.
Do you want me to test applying the patch to commit 80055e1fcd0140d610d54bf7d48f3843245c7059?
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #32 from alexchandel@gmail.com --- Actually, wine commit 80055e1fcd0140d610d54bf7d48f3843245c7059 fails to compile with your patch:
``` surface.c:1801:16: warning: implicit declaration of function 'wined3d_device_get_depth_stencil_view' is invalid in C99 [-Wimplicit-function-declaration] && wined3d_device_get_depth_stencil_view(surface->ddraw->wined3d_device) == su... ^ surface.c:1801:98: error: no member named 'wined3d_rtv' in 'struct ddraw_surface' ...&& wined3d_device_get_depth_stencil_view(surface->ddraw->wined3d_device) == surface->wined...
~~~~~~~ ^ surface.c:1802:9: warning: implicit declaration of function 'wined3d_device_set_depth_stencil_view' is invalid in C99 [-Wimplicit-function-declaration] wined3d_device_set_depth_stencil_view(surface->ddraw->wined3d_device, NULL); ^ 2 warnings and 1 error generated. make[1]: *** [surface.o] Error 1 make: *** [dlls/ddraw] Error 2 ```
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #33 from Henri Verbeet hverbeet@gmail.com --- Is there no backtrace with wine-1.9.6? Could you please attach a WINEDEBUG="+tid,+seh,+ddraw,+d3d,+d3d_texture,+d3d_surface" log with wine-1.9.6?
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #34 from alexchandel@gmail.com --- Created attachment 54031 --> https://bugs.winehq.org/attachment.cgi?id=54031 Backtrace on 1.9.6 DirectDraw HAL
Zip of backtrace with WINEDEBUG="+tid,+seh,+ddraw,+d3d,+d3d_texture,+d3d_surface" on fresh prefix on 1.9.6 DirectDraw HAL
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #35 from alexchandel@gmail.com --- Created attachment 54032 --> https://bugs.winehq.org/attachment.cgi?id=54032 Backtrace on Intel 945G
Zip of backtrace with WINEDEBUG="+tid,+seh,+ddraw,+d3d,+d3d_texture,+d3d_surface" on fresh prefix on 1.9.6 Intel 945G
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #36 from alexchandel@gmail.com --- Henri, Done. Beware, the logs expand to 103 MB and 146 MB.
https://bugs.winehq.org/show_bug.cgi?id=39796
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #53924|0 |1 is obsolete| |
--- Comment #37 from Henri Verbeet hverbeet@gmail.com --- Created attachment 54036 --> https://bugs.winehq.org/attachment.cgi?id=54036 patch
Could you create a new log with this patch applied? (Unless it makes the issue go away.)
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #38 from alexchandel@gmail.com --- When applied to 1.9.6, this patch creates a new driver option "Intel(R) Ivybridge Desktop" and appears to fix the crash in windowed mode.
However, I still see the following errors in the console:
fixme:d3d:context_check_fbo_status FBO status GL_FRAMEBUFFER_UNDEFINED (0x8219) err:d3d:context_check_fbo_status FBO 0 is incomplete, driver bug? fixme:win:EnumDisplayDevicesW ((null),0,0x32f4a8,0x00000000), stub! fixme:ddraw:DirectDrawEnumerateExA flags 0x00000004 not handled fixme:win:EnumDisplayDevicesW ((null),0,0x32f368,0x00000000), stub! fixme:win:EnumDisplayDevicesW ((null),0,0x32f098,0x00000000), stub! fixme:win:EnumDisplayDevicesW ((null),0,0x32f098,0x00000000), stub! fixme:ddraw:ddraw7_Initialize Ignoring guid {aeb2cdd4-6e41-43ea-941c-8361cc760781}. fixme:ddraw:ddraw7_WaitForVerticalBlank iface 0x1e82d0, flags 0x1, event 0x0 stub! fixme:win:EnumDisplayDevicesW ((null),0,0x32f4d8,0x00000000), stub!
Plus a few hundred of these:
fixme:d3d_shader:print_glsl_info_log Info log received from GLSL shader #3: fixme:d3d_shader:print_glsl_info_log WARNING: Could not find vertex shader attribute 'vs_in2' to match BindAttributeLocation request.
Unfortunately, when run in fullscreen mode, though the game does not crash upon loading, instead of displaying the game, the screen rapidly flashes between the rendered game screen and some corrupt image of the loading screen at seizure-inducing frequencies.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #39 from alexchandel@gmail.com --- Created attachment 54167 --> https://bugs.winehq.org/attachment.cgi?id=54167 Backtrace on Intel Ivybridge Desktop
Derived from patch 54036 applied to wine-1.9.6. Uploaded as an xz because the zip was 5.8 MB.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #40 from alexchandel@gmail.com --- That said, your patch 54036 is a massive improvement, because wine no longer segfaults. Can this make it into wine 1.9.8?
https://bugs.winehq.org/show_bug.cgi?id=39796
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |668fd0b1941dc85f8600aa2036e | |e145a75d825f7 Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #41 from Austin English austinenglish@gmail.com --- (In reply to alexchandel from comment #40)
That said, your patch 54036 is a massive improvement, because wine no longer segfaults. Can this make it into wine 1.9.8?
Yes, it will: https://source.winehq.org/git/wine.git/commitdiff/668fd0b1941dc85f8600aa2036...
Please file new bugs for subsequent issues.
https://bugs.winehq.org/show_bug.cgi?id=39796
--- Comment #42 from Henri Verbeet hverbeet@gmail.com --- (In reply to alexchandel from comment #38)
fixme:d3d:context_check_fbo_status FBO status GL_FRAMEBUFFER_UNDEFINED (0x8219) err:d3d:context_check_fbo_status FBO 0 is incomplete, driver bug?
I think that's a MacOS bug, or possibly something in winemac.drv. It's generally harmless though.
Plus a few hundred of these:
fixme:d3d_shader:print_glsl_info_log Info log received from GLSL shader #3: fixme:d3d_shader:print_glsl_info_log WARNING: Could not find vertex shader attribute 'vs_in2' to match BindAttributeLocation request.
Those are also usually harmless.
Unfortunately, when run in fullscreen mode, though the game does not crash upon loading, instead of displaying the game, the screen rapidly flashes between the rendered game screen and some corrupt image of the loading screen at seizure-inducing frequencies.
That sounds a lot like bug 34166. There's a hack attached to that bug that seems to help for most people. Unfortunately it doesn't look like Apple is going to fix it.
https://bugs.winehq.org/show_bug.cgi?id=39796
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #43 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.8.
https://bugs.winehq.org/show_bug.cgi?id=39796
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.8.x
https://bugs.winehq.org/show_bug.cgi?id=39796
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---
--- Comment #44 from Michael Stefaniuc mstefani@redhat.com --- Removing 1.8.x milestone from bugs included in 1.8.3.