http://bugs.winehq.org/show_bug.cgi?id=34709
Bug #: 34709 Summary: Terraria unhandled exception on start when using XFCE WM Product: Wine Version: 1.7.4 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: wine@placesthroughtime.com Classification: Unclassified
Created attachment 46272 --> http://bugs.winehq.org/attachment.cgi?id=46272 Screenshot of error message
The attached error message comes up after launching Terraria. The game shows behind the message but can not accept mouse clicks or keyboard entry because of the error. Can not interact with error message window either, only able to force close it out and this also closes Terraria.
Workarounds for this include unchecking 'Allow the window manageer to control the windows' or using 'Emulate a virtual desktop'
OS Linux Mint Debian Edition x64 Window Manager: XFCE 4.10
http://bugs.winehq.org/show_bug.cgi?id=34709
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #1 from Anastasius Focht focht@gmx.net 2013-10-12 14:42:21 CDT --- Hello,
can't reproduce, works fine here. Prerequisite: 'winetricks -q dotnet40 xna40' in clean 32-bit WINEPREFIX.
Please attach terminal output.
Specs: Fedora x86_64, XFCE 4.10.0, Wine 1.7.4
Regards
http://bugs.winehq.org/show_bug.cgi?id=34709
--- Comment #2 from Joshua wine@placesthroughtime.com 2013-10-12 14:57:11 CDT --- Created attachment 46276 --> http://bugs.winehq.org/attachment.cgi?id=46276 Console output running Terraria.
http://bugs.winehq.org/show_bug.cgi?id=34709
--- Comment #3 from Joshua wine@placesthroughtime.com 2013-10-12 14:58:14 CDT --- Additionally I found this only happens when the game is configured and then launched in Windowed mode not fullscreen
http://bugs.winehq.org/show_bug.cgi?id=34709
--- Comment #4 from Joshua wine@placesthroughtime.com 2013-10-12 15:18:50 CDT --- Created attachment 46278 --> http://bugs.winehq.org/attachment.cgi?id=46278 Console output running Terraria with WINEDEBUG=+gdiplus.
http://bugs.winehq.org/show_bug.cgi?id=34709
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet Status|UNCONFIRMED |NEW Summary|Terraria unhandled |Terraria 1.0.x crashes |exception on start when |during display mode change |using XFCE WM |from windowed mode to | |fullscreen or vise versa Ever Confirmed|0 |1
--- Comment #5 from Anastasius Focht focht@gmx.net 2013-10-12 15:52:37 CDT --- Hello folks,
confirming... Changing the display mode in game is the missing bit, it doesn't matter if windowed -> fullscreen or vice versa.
Managed exception backtrace:
--- snip --- ... Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Reset(PresentationParameters presentationParameters, GraphicsAdapter graphicsAdapter) at Microsoft.Xna.Framework.GraphicsDeviceManager.ChangeDevice(Boolean forceCreate) at Microsoft.Xna.Framework.GraphicsDeviceManager.ToggleFullScreen() at Terraria.Main.DrawMenu() at Terraria.Main.Draw(GameTime gameTime) at Microsoft.Xna.Framework.Game.DrawFrame() at Microsoft.Xna.Framework.Game.Tick() at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e) at Microsoft.Xna.Framework.GameHost.OnIdle() at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame() at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e) at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at Microsoft.Xna.Framework.WindowsGameHost.Run() at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun) at Terraria.Program.Main(String[] args) ... --- snip ---
Relevant part trace log:
--- snip --- ... 002c:trace:d3d9:d3d9_swapchain_QueryInterface iface 0x1de090, riid {580ca87e-1d3c-4d54-991d-b7d3e3c298ce}, out 0x33d3bc. 002c:warn:d3d9:d3d9_swapchain_QueryInterface {580ca87e-1d3c-4d54-991d-b7d3e3c298ce} not implemented, returning E_NOINTERFACE. 002c:trace:d3d:wined3d_device_reset New params: 002c:trace:d3d:wined3d_device_reset backbuffer_width 1152 002c:trace:d3d:wined3d_device_reset backbuffer_height 864 002c:trace:d3d:wined3d_device_reset backbuffer_format WINED3DFMT_B8G8R8A8_UNORM 002c:trace:d3d:wined3d_device_reset backbuffer_count 1 002c:trace:d3d:wined3d_device_reset multisample_type 0 002c:trace:d3d:wined3d_device_reset multisample_quality 0 002c:trace:d3d:wined3d_device_reset swap_effect 0x1 002c:trace:d3d:wined3d_device_reset device_window 0x10086 002c:trace:d3d:wined3d_device_reset windowed 0 002c:trace:d3d:wined3d_device_reset enable_auto_depth_stencil 0x1 002c:trace:d3d:wined3d_device_reset auto_depth_stencil_format WINED3DFMT_X8D24_UNORM 002c:trace:d3d:wined3d_device_reset flags 0 002c:trace:d3d:wined3d_device_reset refresh_rate 0 002c:trace:d3d:wined3d_device_reset swap_interval 1 002c:trace:d3d:wined3d_device_reset auto_restore_display_mode 0x1 002c:trace:d3d:wined3d_device_set_depth_stencil device 0x1ecec8, depth_stencil 0x1da818, old depth_stencil (nil). 002c:trace:d3d:wined3d_set_adapter_display_mode wined3d 0x1e1590, adapter_idx 0, mode 0x33d4ac (1152x864@0 WINED3DFMT_B8G8R8A8_UNORM 0). 002c:trace:d3d:wined3d_get_adapter_display_mode wined3d 0x1e1590, adapter_idx 0, display_mode 0x33d3cc, rotation (nil). 002c:Call user32.EnumDisplaySettingsExW(001e4108 L"\\.\DISPLAY1",ffffffff,0033d170,00000000) ret=7e06eaeb 002c:Ret user32.EnumDisplaySettingsExW() retval=00000001 ret=7e06eaeb 002c:trace:d3d:wined3d_get_adapter_display_mode Returning 1920x1080@60 WINED3DFMT_B8G8R8X8_UNORM 0x1. 002c:Call user32.ChangeDisplaySettingsExW(001e4108 L"\\.\DISPLAY1",0033d2f0,00000000,00000004,00000000) ret=7e06f07c 002c:Call window proc 0xc50a0a (hwnd=0x10086,msg=WM_DISPLAYCHANGE,wp=00000020,lp=03600480) 002c:Call user32.CallWindowProcA(ffff0028,00010086,0000007e,00000020,03600480) ret=048a97bd 002c:Call window proc 0xc50562 (hwnd=0x10086,msg=WM_DISPLAYCHANGE,wp=00000020,lp=03600480) ... 002c:trace:d3d:wined3d_device_setup_fullscreen_window Setting up window 0x10086 for fullscreen mode. ... 002c:trace:d3d:wined3d_device_setup_fullscreen_window Old style was 06cf0000, 00050100, setting to 860b0000, 00050000. ... 002c:trace:d3d:wined3d_device_reset Resetting stateblock. 002c:trace:d3d:context_acquire device 0x1ecec8, target (nil). 002c:trace:d3d:context_enter Entering context 0x1fd098, level 1. 002c:Call opengl32.wglGetCurrentContext() ret=7e0432a5 002c:Ret opengl32.wglGetCurrentContext() retval=00030001 ret=7e0432a5 002c:trace:d3d:delete_opengl_contexts Unloading resource 0x11773ed0. 002c:Call ntdll.RtlAllocateHeap(00110000,00000008,001fd013) ret=7e096d19 002c:Ret ntdll.RtlAllocateHeap() retval=1aa90020 ret=7e096d19 002c:trace:d3d:context_acquire device 0x1ecec8, target (nil). 002c:trace:d3d:context_enter Entering context 0x1fd098, level 2. 002c:trace:d3d:context_bind_texture glBindTexture call ok /home/focht/projects/wine/wine-git/dlls/wined3d/context.c / 2027 002c:trace:d3d:context_release Releasing context 0x1fd098, level 2. 002c:trace:d3d:context_acquire device 0x1ecec8, target (nil). 002c:trace:d3d:context_enter Entering context 0x1fd098, level 2. 002c:trace:d3d:context_release Releasing context 0x1fd098, level 2. 002c:trace:d3d:delete_opengl_contexts Unloading resource 0x11773c90. 002c:trace:d3d:context_acquire device 0x1ecec8, target (nil). 002c:trace:d3d:context_enter Entering context 0x1fd098, level 2. 002c:trace:d3d:context_release Releasing context 0x1fd098, level 2. 002c:trace:d3d:context_acquire device 0x1ecec8, target (nil). 002c:trace:d3d:context_enter Entering context 0x1fd098, level 2. 002c:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7af8f420 ip=7af8f420 tid=002c 002c:trace:seh:raise_exception info[0]=00000000 002c:trace:seh:raise_exception info[1]=00000314 002c:trace:seh:raise_exception eax=00000000 ebx=7d847648 ecx=7cde66a8 edx=00000000 esi=7d5521dc edi=00000000 002c:trace:seh:raise_exception ebp=00000000 esp=0033bd30 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010246 002c:trace:seh:call_vectored_handlers calling handler at 0x791f5a7c code=c0000005 flags=0 --- snip ---
@Joshua: Those gdiplus FIXME's are harmless at best.
Regards
http://bugs.winehq.org/show_bug.cgi?id=34709
--- Comment #6 from Henri Verbeet hverbeet@gmail.com 2013-10-13 03:10:07 CDT --- (In reply to comment #5)
--- snip --- ... 002c:trace:d3d9:d3d9_swapchain_QueryInterface iface 0x1de090, riid {580ca87e-1d3c-4d54-991d-b7d3e3c298ce}, out 0x33d3bc. 002c:warn:d3d9:d3d9_swapchain_QueryInterface {580ca87e-1d3c-4d54-991d-b7d3e3c298ce} not implemented, returning E_NOINTERFACE.
{580ca87e-1d3c-4d54-991d-b7d3e3c298ce} is IID_IDirect3DBaseTexture9, which is a bit suspicious to query for on a swapchain, but not necessarily a problem by itself.
002c:trace:d3d:delete_opengl_contexts Unloading resource 0x11773c90. 002c:trace:d3d:context_acquire device 0x1ecec8, target (nil). 002c:trace:d3d:context_enter Entering context 0x1fd098, level 2. 002c:trace:d3d:context_release Releasing context 0x1fd098, level 2. 002c:trace:d3d:context_acquire device 0x1ecec8, target (nil). 002c:trace:d3d:context_enter Entering context 0x1fd098, level 2. 002c:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7af8f420 ip=7af8f420 tid=002c 002c:trace:seh:raise_exception info[0]=00000000 002c:trace:seh:raise_exception info[1]=00000314 002c:trace:seh:raise_exception eax=00000000 ebx=7d847648 ecx=7cde66a8 edx=00000000 esi=7d5521dc edi=00000000 002c:trace:seh:raise_exception ebp=00000000 esp=0033bd30 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010246 002c:trace:seh:call_vectored_handlers calling handler at 0x791f5a7c code=c0000005 flags=0 --- snip ---
If I'm reading that correctly, it dies inside delete_opengl_contexts(), possibly while unloading the 0x11773c90 resource, which is either a surface or a texture. Any chance you could pin it down a bit further? Turning on +d3d_surface,+d3d_texture should help, if nothing else.
http://bugs.winehq.org/show_bug.cgi?id=34709
--- Comment #7 from Anastasius Focht focht@gmx.net 2013-10-13 06:54:55 CDT --- Created attachment 46285 --> http://bugs.winehq.org/attachment.cgi?id=46285 WINEDEBUG=+tid,+seh,+relay,+loaddll,+process,+d3d,+d3d9,+d3d_synchronous,+d3d_surface,+d3d_texture wine ./Terraria.exe >>log.txt 2>&1
Hello Henri,
attached is a snippet containing resource unloading for "bad" and "good" case at the point of crash. Winedbg's backtrace is useless as nvidia's driver uses the frame pointer as scratch register.
Regards
http://bugs.winehq.org/show_bug.cgi?id=34709
--- Comment #8 from Henri Verbeet hverbeet@gmail.com 2013-10-13 14:56:05 CDT --- (In reply to comment #7)
attached is a snippet containing resource unloading for "bad" and "good" case at the point of crash. Winedbg's backtrace is useless as nvidia's driver uses the frame pointer as scratch register.
If the crash is inside the GL driver, that probably means it's crashing inside the glDeleteTextures() call in gltexture_delete() then. It's not immediately obvious to me from the log why that would happen though, unless e.g. the GL context got corrupted or deleted earlier.
http://bugs.winehq.org/show_bug.cgi?id=34709
--- Comment #9 from Anastasius Focht focht@gmx.net 2013-10-14 03:04:23 CDT --- Created attachment 46292 --> http://bugs.winehq.org/attachment.cgi?id=46292 46285: WINEDEBUG=+tid,+seh,+loaddll,+process,+d3d,+d3d9,+d3d_synchronous,+d3d_surface,+d3d_texture wine ./Terraria.exe >>log.txt 2>&1
Hello Henri,
--- quote --- If the crash is inside the GL driver, that probably means it's crashing inside the glDeleteTextures() call in gltexture_delete() then. It's not immediately obvious to me from the log why that would happen though, unless e.g. the GL context got corrupted or deleted earlier. --- quote ---
yes, it crashes in gltexture_delete(). I added additional trace "rgb gltexture_delete" immediately before the GL call.
Attached is another trace log (without relay), uncompressed: 88 MiB
tid: 002d context: 0x1dc5e0 texture: 0x15636e50
--- snip --- 002d:trace:d3d:context_enter Entering context 0x1dc5e0, level 2. 002d:trace:d3d_texture:wined3d_texture_unload texture 0x15636e50 -> rgb gltexture_delete 002d:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7af8f420 ip=7af8f420 tid=002d 002d:trace:seh:raise_exception info[0]=00000000 002d:trace:seh:raise_exception info[1]=00000314 002d:trace:seh:raise_exception eax=00000000 ebx=7d847648 ecx=7cc0e0e8 edx=00000000 esi=7d5521dc edi=00000000 002d:trace:seh:raise_exception ebp=00000000 esp=0033bd50 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010246 --- snip ---
Maybe you spot something obvious in full log ...
Regards
https://bugs.winehq.org/show_bug.cgi?id=34709
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #10 from Anastasius Focht focht@gmx.net --- Hello folks,
I can't reproduce this anymore, in-game fullscreen vs. windowed mode change, including screen resolution change works fine here now.
$ wine --version wine-1.7.25-93-g12aa347
Regards
https://bugs.winehq.org/show_bug.cgi?id=34709
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.26.