http://bugs.winehq.org/show_bug.cgi?id=30745
Bug #: 30745 Summary: Soulbringer, GOG version, crashes at start, no splash screen even. Product: Wine Version: 1.5.4 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: fernando@cmartins.nl Classification: Unclassified
see backtrace
http://bugs.winehq.org/show_bug.cgi?id=30745
--- Comment #1 from Fernando Martins fernando@cmartins.nl 2012-05-21 18:10:52 CDT --- Created attachment 40258 --> http://bugs.winehq.org/attachment.cgi?id=40258 backtrace
http://bugs.winehq.org/show_bug.cgi?id=30745
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #2 from joaopa jeremielapuree@yahoo.fr 2012-05-21 21:24:06 CDT --- Try a native mfc42 dll.
http://bugs.winehq.org/show_bug.cgi?id=30745
--- Comment #3 from Austin English austinenglish@gmail.com 2012-05-21 22:15:12 CDT --- (In reply to comment #2)
Try a native mfc42 dll.
Wine doesn't provide one. It's already present:
PE 5f400000-5f4f2000 Export mfc42
otherwise it would've given an error during the dll import.
http://bugs.winehq.org/show_bug.cgi?id=30745
--- Comment #4 from GyB gyebro69@gmail.com 2012-05-28 05:54:04 CDT --- Created attachment 40312 --> http://bugs.winehq.org/attachment.cgi?id=40312 7zipped +relay,+seh,+tid log (uncompressed 4.6 MB)
I can confirm the problem with the GOG.com version of the game. Soulbringer.exe, which is the launcher/configuration tool for the game, crashes. I see the same crash with previous Wine versions as well (1.1.35, 1.2.3, 1.4 etc) Here I'm attaching a +relay debug log in case someone can find it useful.
I also have the DotEmu version of the game, and that version of Soulbringer.exe starts correctly in Wine (both versions need mfc42.dll) The GOG.com version of the game contains additional patches, there are extra dlls in the game directory (e.g. patch.dll) used by Soulbringer.exe.
http://bugs.winehq.org/show_bug.cgi?id=30745
Pierre Etchemaite pe-winehq@concept-micro.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pe-winehq@concept-micro.com
--- Comment #5 from Pierre Etchemaite pe-winehq@concept-micro.com 2012-07-30 04:15:17 CDT --- You can see intro video by launching SoulbringeVCnoeax.exe, but after that you get stuck on a slashscreen: the menu, or whatever is supposed to happen next, never appears.
http://bugs.winehq.org/show_bug.cgi?id=30745
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #6 from GyB gyebro69@gmail.com 2012-07-31 10:24:40 CDT --- (In reply to comment #5)
You can see intro video by launching SoulbringeVCnoeax.exe, but after that you get stuck on a slashscreen: the menu, or whatever is supposed to happen next, never appears.
That's bug #24916. The problem here is with the launcher (Soulbringer.exe).
wine-1.5.9-294-g0316a1b
http://bugs.winehq.org/show_bug.cgi?id=30745
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |focht@gmx.net Component|-unknown |kernel32 Summary|Soulbringer, GOG version, |GOG.com version of |crashes at start, no splash |Soulbringer crashes on |screen even. |startup (GetModuleHandleExW | |needs to support | |GET_MODULE_HANDLE_EX_FLAG_P | |IN) Ever Confirmed|0 |1
--- Comment #7 from Anastasius Focht focht@gmx.net 2013-10-12 07:31:27 CDT --- Hello folks,
confirming. Bought the game for a few bucks just for analysis.
In short: There is an in-process patcher dll that requires to stay in memory until the process exits (makes use of GET_MODULE_HANDLE_EX_FLAG_PIN flag which Wine doesn't implement).
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/GOG.com/Soulbringer ... $ WINEDEBUG=+tid,+seh,wine ./Soulbringer.exe ... 0009:trace:loaddll:load_native_dll Loaded L"C:\Program Files\GOG.com\Soulbringer\PATCH.dll" at 0x3c0000: native 0009:trace:loaddll:load_native_dll Loaded L"C:\Program Files\GOG.com\Soulbringer\data\Stealth\Render\D3d6Lib.dll" at 0x10000000: native ... 0009:fixme:module:GetModuleHandleExW should pin refcount for 0x3c0000 ... 0009:trace:loaddll:free_modref Unloaded module L"C:\Program Files\GOG.com\Soulbringer\data\Stealth\Render\D3d6Lib.dll" : native 0009:trace:loaddll:free_modref Unloaded module L"C:\Program Files\GOG.com\Soulbringer\PATCH.dll" : native ... 0009:trace:loaddll:load_native_dll Loaded L"C:\Program Files\GOG.com\Soulbringer\PATCH.dll" at 0x3c0000: native 0009:trace:loaddll:load_native_dll Loaded L"C:\Program Files\GOG.com\Soulbringer\D3d7Lib.dll" at 0x10000000: native ... 0009:fixme:module:GetModuleHandleExW should pin refcount for 0x3c0000 ... 0009:trace:loaddll:free_modref Unloaded module L"C:\Program Files\GOG.com\Soulbringer\D3d7Lib.dll" : native 0009:trace:loaddll:free_modref Unloaded module L"C:\Program Files\GOG.com\Soulbringer\PATCH.dll" : native 0009:trace:loaddll:free_modref Unloaded module L"C:\windows\system32\dinput.dll" : builtin 0009:trace:loaddll:free_modref Unloaded module L"C:\windows\system32\winmm.dll" : builtin 0009:trace:loaddll:free_modref Unloaded module L"C:\windows\system32\msacm32.dll" : builtin 0009:trace:seh:raise_exception code=c0000005 flags=0 addr=0x3c2320 ip=003c2320 tid=0009 0009:trace:seh:raise_exception info[0]=00000000 0009:trace:seh:raise_exception info[1]=003c2320 0009:trace:seh:raise_exception eax=00000000 ebx=7ea69ec2 ecx=0033f8f8 edx=0016ed6d esi=0033f8f8 edi=00000000 0009:trace:seh:raise_exception ebp=0033ea68 esp=0033ea24 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010206 0009:trace:seh:call_stack_handlers calling handler at 0x5f492e0a code=c0000005 flags=0 ... --- snip ---
When being loaded, "PATCH.dll" inserts hooks at several locations in main executable. The game code eventually hits such a hook while the dll was already unloaded (not pinned in memory).
MSDN for GetModuleHandleEx(): http://msdn.microsoft.com/en-us/library/windows/desktop/ms683200%28v=vs.85%2...
Source: http://source.winehq.org/git/wine.git/blob/c0e72bb3626a7ba8090ee07cc0aa88cd5...
--- snip --- 505 BOOL WINAPI GetModuleHandleExW( DWORD flags, LPCWSTR name, HMODULE *module ) 506 { ... 538 if (status == STATUS_SUCCESS) 539 { 540 if (flags & GET_MODULE_HANDLE_EX_FLAG_PIN) 541 FIXME( "should pin refcount for %p\n", ret ); 542 else if (!(flags & GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT)) 543 LdrAddRefDll( 0, ret ); 544 } ... 554 return (status == STATUS_SUCCESS); 555 } --- snip ---
$ du -sh setup_soulbringer.exe 828M setup_soulbringer.exe
$ sha1sum setup_soulbringer.exe 5be1a70a24e37212bfeaa02a29d8d86af9cf2fca setup_soulbringer.exe
$ wine --version wine-1.7.4
Regards
http://bugs.winehq.org/show_bug.cgi?id=30745
--- Comment #8 from Nikolay Sivov bunglehead@gmail.com 2013-10-12 09:41:35 CDT --- It looks like the best way is to use LdrGetDllHandleEx(), internally LdrAddRefDll() should be able to pin refcount.
http://bugs.winehq.org/show_bug.cgi?id=30745
--- Comment #9 from Anastasius Focht focht@gmx.net 2013-10-14 18:02:13 CDT --- Hello folks,
support for LdrAddRefDll( LDR_ADDREF_DLL_PIN, module) has been added:
http://source.winehq.org/git/wine.git/commitdiff/146ff49161fb35095ae9ac6f4c4...
When the kernel32 part gets committed this bug will be fixed.
Regards
http://bugs.winehq.org/show_bug.cgi?id=30745
--- Comment #10 from Nikolay Sivov bunglehead@gmail.com 2013-10-15 01:32:04 CDT --- An easy way to fix that is sent http://www.winehq.org/pipermail/wine-patches/2013-October/127577.html.
http://bugs.winehq.org/show_bug.cgi?id=30745
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
http://bugs.winehq.org/show_bug.cgi?id=30745
--- Comment #11 from Bruno Jesus 00cpxxx@gmail.com 2013-10-15 13:39:05 CDT --- Patch commited: http://source.winehq.org/git/wine.git/?a=commit;h=9a6567d1a6161f331ae4e07f3b...
http://bugs.winehq.org/show_bug.cgi?id=30745
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |9a6567d1a6161f331ae4e07f3bd | |2697875af3d74 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #12 from Anastasius Focht focht@gmx.net 2013-10-15 14:59:55 CDT --- Hello folks,
the launcher now starts successfully.
Final commit: http://source.winehq.org/git/wine.git/commitdiff/9a6567d1a6161f331ae4e07f3bd...
This will also fix issues observed in other applications which depended on pinned modules like .NET CLR/apps (indicated by "fixme:module:GetModuleHandleExW should pin refcount" messages)
Thanks Nikolay
Regards
http://bugs.winehq.org/show_bug.cgi?id=30745
--- Comment #13 from Fernando Martins fernando@cmartins.nl 2013-10-15 16:55:25 CDT --- for clarification: launcher starts but game gets stuck on title screen?
http://bugs.winehq.org/show_bug.cgi?id=30745
--- Comment #14 from Anastasius Focht focht@gmx.net 2013-10-15 17:11:01 CDT --- Hello,
--- quote --- for clarification: launcher starts but game gets stuck on title screen? --- quote ---
well this bug is about the launcher crashing on startup - which is fixed now. You are free to report new bugs for other issues with the game. Make sure you have searched Bugzilla prior to avoid duplicates.
Regards
http://bugs.winehq.org/show_bug.cgi?id=30745
--- Comment #15 from Austin English austinenglish@gmail.com 2013-10-16 02:49:44 CDT --- (In reply to comment #12)
Hello folks,
the launcher now starts successfully.
Final commit: http://source.winehq.org/git/wine.git/commitdiff/9a6567d1a6161f331ae4e07f3bd...
This will also fix issues observed in other applications which depended on pinned modules like .NET CLR/apps (indicated by "fixme:module:GetModuleHandleExW should pin refcount" messages)
Any tips on which apps to check? A quick bugzilla search shows 35 bugs like that, most of which are IE8/Silverlight related:
http://bugs.winehq.org/buglist.cgi?query_format=advanced&list_id=127508&...
http://bugs.winehq.org/show_bug.cgi?id=30745
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #16 from Alexandre Julliard julliard@winehq.org 2013-10-25 12:54:10 CDT --- Closing bugs fixed in 1.7.5.
https://bugs.winehq.org/show_bug.cgi?id=30745
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.6.x
https://bugs.winehq.org/show_bug.cgi?id=30745
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.6.x |---
--- Comment #17 from Alexandre Julliard julliard@winehq.org --- Removing 1.6.x milestone from bugs included in 1.6.2.