http://bugs.winehq.org/show_bug.cgi?id=30947
Bug #: 30947 Summary: Tropico 4: crashes on startup Product: Wine Version: 1.5.6 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: zoku88@gmail.com Classification: Unclassified
Created attachment 40602 --> http://bugs.winehq.org/attachment.cgi?id=40602 Terminal output.
Tropico 4 fails to start in wine 1.5.6. This worked in wine 1.4
After starting Tropico 4, after a while of nothing appearing on the screen, the wine Crash GUI pops up. After closing the GUI, Tropico4.exe is still running, so you have to manually kill it.
This is what I got when I did the regression testing:
c110a55f12a0dae4fdff9fb3e861eb4eb8bc0380 is the first bad commit commit c110a55f12a0dae4fdff9fb3e861eb4eb8bc0380 Author: Vincent Povirk vincent@codeweavers.com Date: Mon Mar 19 12:54:55 2012 -0500
mscoree: Search for an arch-specific mono dll first.
:040000 040000 0edaebe7b71e5b8ff60e5cce1b2657e65d4a871f 5f7498fcfb84344483dc76e8759455fb6dc0f0e1 M dlls
http://bugs.winehq.org/show_bug.cgi?id=30947
Mykal Valentine zoku88@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=30947
Mykal Valentine zoku88@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |c110a55f12a0dae4fdff9fb3e86 | |1eb4eb8bc0380
http://bugs.winehq.org/show_bug.cgi?id=30947
Mykal Valentine zoku88@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1|c110a55f12a0dae4fdff9fb3e86 | |1eb4eb8bc0380 |
http://bugs.winehq.org/show_bug.cgi?id=30947
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Component|-unknown |mscoree Regression SHA1| |c110a55f12a0dae4fdff9fb3e86 | |1eb4eb8bc0380
http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #1 from Vincent Povirk madewokherd@gmail.com 2012-06-19 08:37:41 CDT --- Does this work if you remove wine-mono? You may have to do that before installing.
http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #2 from Mykal Valentine zoku88@gmail.com 2012-06-19 20:48:39 CDT --- Yes, you are correct. I have just removed wine-mono and was able to start Tropico4 without issue.
http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #3 from Vincent Povirk madewokherd@gmail.com 2012-06-19 20:59:18 CDT --- Can you get a +module,+loaddll,+mscoree log of the failure?
I see there's a demo at http://download.cnet.com/Tropico-4-Demo/3000-2119_4-75547516.html, just making a note of it in case it shows the same problem.
http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #4 from Vincent Povirk madewokherd@gmail.com 2012-06-19 20:59:55 CDT --- Hmm make that +module,+loaddll,+mscoree,+tid
http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #5 from Mykal Valentine zoku88@gmail.com 2012-06-19 21:57:04 CDT --- Created attachment 40616 --> http://bugs.winehq.org/attachment.cgi?id=40616 +module,+loaddll,+mscoree,+tid
Steam was launched as well, so not all messages may be for Tropico 4...
http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #6 from Vincent Povirk madewokherd@gmail.com 2012-06-20 09:08:04 CDT --- 0051:trace:module:MODULE_InitDLL (0x6d500000 L"libmono-2.0-x86.dll",THREAD_ATTACH,(nil)) - CALL 0051:err:ntdll:RtlpWaitForCriticalSection section 0x6d7859e8 "?" wait timed out in thread 0051, blocked by 0000, retrying (60 sec) 0050:err:ntdll:RtlpWaitForCriticalSection section 0x7bcbf940 "/var/tmp/portage/app-emulation/wine-1.5.6/work/wine-1.5.6/dlls/ntdll/loader.c: loader_section" wait timed out in thread 0050, blocked by 0051, retrying (60 sec)
So it's something in Mono's DllMain.
I tried the downloadable demo and the steam demo and wasn't able to reproduce the bug. :(
It'd be really nice if we could get a backtrace of this somehow.
http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #7 from Vincent Povirk madewokherd@gmail.com 2012-06-20 10:10:03 CDT --- If it's not too much trouble, I'd like you to try to get a backtrace of the threads involved in the hang.
To do this, run "winedbg" from a terminal while Tropico 4 is hung (preferably before the crash dialog pops up). Type "info process" to get a list of processes, find the row for tropico 4, and type "attach 0x<pid>", replacing <pid> with whatever is in the leftmost column. Then type "info thread" to get a list of all processes and their threads. For each line under the tropico 4 process, type "bt 0x<tid>", replacing <tid> with the first number on that line.
http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #8 from Mykal Valentine zoku88@gmail.com 2012-06-20 23:39:20 CDT --- Created attachment 40636 --> http://bugs.winehq.org/attachment.cgi?id=40636 Backtrace
Here's the backtrace that I did before the crash dialog appears. Let me know if I need to wait longer before I do the backtrace.
http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #9 from Vincent Povirk madewokherd@gmail.com 2012-06-21 11:05:55 CDT --- That's exactly what I needed. I think I know what's happening now.
Mono's DllMain's THREAD_ATTACH handler apparently calls some functions that require mono_jit_init to have been called. The result, if mono_jit_init hasn't been called, is that mono enters a static CRITICAL_SECTION that it hasn't initialized yet, which causes it to wait forever inside DllMain, which is of course very bad.
In this case, we load Mono but never use the runtime, so we don't ever call mono_jit_init, and things go very wrong when the program creates a thread.
AFAICT there's no safe way for us to use Mono as long as it's doing this. As soon as LoadLibrary returns, it's possible that someone will create a new thread before we can call mono_jit_init.
http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #10 from Vincent Povirk madewokherd@gmail.com 2012-06-21 13:22:29 CDT --- Created attachment 40647 --> http://bugs.winehq.org/attachment.cgi?id=40647 possible fix
I asked about this on #monodev, and I was told the correct fix is for Mono's DllMain to do nothing if Mono hasn't yet been initialized. This patch should implement that behavior.
http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #11 from Vincent Povirk madewokherd@gmail.com 2012-06-21 13:31:58 CDT --- I've uploaded a build of libmono-2.0-x86.dll with the patch here: http://madewokherd.nfshost.com/omgsecret/libmono.tar.bz2
Could you drop the dll in .wine/drive_c/windows/mono/mono-2.0/bin (or, if you prefer, build wine-mono yourself with the attached patch) and see if it fixes the problem? If it does, I'll send the change to Mono, and we should have this fixed in the next wine-mono release.
http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #12 from Mykal Valentine zoku88@gmail.com 2012-06-21 21:39:34 CDT --- Used the one you built and it worked perfectly. :)
Thanks!
http://bugs.winehq.org/show_bug.cgi?id=30947
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kennybobs@o2.co.uk
--- Comment #13 from Vincent Povirk madewokherd@gmail.com 2012-10-10 17:50:28 CDT --- *** Bug 31937 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=30947
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #14 from Ken Sharp kennybobs@o2.co.uk 2012-10-10 18:13:52 CDT --- Confirming
http://bugs.winehq.org/show_bug.cgi?id=30947
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #15 from Vincent Povirk madewokherd@gmail.com 2012-10-30 10:18:11 CDT --- This should be fixed by the wine-mono 0.0.8 update.
http://bugs.winehq.org/show_bug.cgi?id=30947
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #16 from Alexandre Julliard julliard@winehq.org 2012-11-09 13:00:41 CST --- Closing bugs fixed in 1.5.17.
https://bugs.winehq.org/show_bug.cgi?id=30947
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |b3c0d3cd63e7603d6c576e3b89f | |3dd53da332f30 Summary|Tropico 4: crashes on |Tropico 4 crashes on |startup |startup with Wine-Mono | |0.0.4 CC| |focht@gmx.net
https://bugs.winehq.org/show_bug.cgi?id=30947
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |https://web.archive.org/web | |/20210227201838/http://dl.4 | |players.de/f1/pc2/tropico3/ | |tropico4demoEFG.msi