[Bug 30947] Tropico 4: crashes on startup

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Jun 21 11:05:55 CDT 2012


http://bugs.winehq.org/show_bug.cgi?id=30947

--- Comment #9 from Vincent Povirk <madewokherd at 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.

-- 
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.



More information about the wine-bugs mailing list