http://bugs.winehq.org/show_bug.cgi?id=13915
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #44 from Anastasius Focht focht@gmx.net 2010-08-20 13:13:24 --- Hello,
could be anything ... looking at that snippet: make sure you switch address space randomization off for sure! If you are really sure that kernel32.dll gets the same base address in child process the loader creates, provide the following log in case of a crash :
$ WINEDEBUG=+tid,+seh,+loaddll,+module,+process,+relay wine ./loader_foo.exe
log.txt 2>&1
(make sure log.txt doesn't exist prior)
Injecting stuff has its limitations. You can't do everything at that point because the main thread hasn't run to process entry yet. Imports are fixed but process attach notifications are not yet sent at that point. They will get triggered by any injected threads that run _prior_ waking up the main thread that ought to call it.
Does your injected dll synchronize with the parent (loader) to wake up the initially suspended main thread? Be careful if your dll patches stuff from the game in its dllmain, especially dynamic data structures which might not be fully present yet/or are being modified in startup phase of game.
Regards