https://bugs.winehq.org/show_bug.cgi?id=51948
Bug ID: 51948 Summary: Gothic 2 Gold crashes when first entering addonworld (Jharkendar) Product: Wine Version: 6.20 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: broatchgill@gmail.com Distribution: ---
Created attachment 70921 --> https://bugs.winehq.org/attachment.cgi?id=70921 Backtrace.txt - Unhandled exception: page fault on read access
Wine crashes when I first enter addonworld in Gothic 2 Gold. Newworld and oldworld have worked great until this. Works in Windows 10.
https://bugs.winehq.org/show_bug.cgi?id=51948
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |directx-dmusic
https://bugs.winehq.org/show_bug.cgi?id=51948
herac1es broatchgill@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-dmusic |-unknown
--- Comment #1 from herac1es broatchgill@gmail.com --- 0118:err:msvcrt:demangle_datatype Unknown type @
Above is output to console, when Gothic is started from console.
https://bugs.winehq.org/show_bug.cgi?id=51948
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |ArchLinux Version|6.20 |6.19 Severity|major |normal
https://bugs.winehq.org/show_bug.cgi?id=51948
herac1es broatchgill@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |directx-dmusic
--- Comment #2 from herac1es broatchgill@gmail.com --- Sorry z.figura12 I set component back to unknown. I have had no issues with music/sound, so didn't think dmusic would be the problem. However I tried installing the dmusic override using winetricks and with a bit of fiddling I have managed to get it working.
https://bugs.winehq.org/show_bug.cgi?id=51948
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mstefani@winehq.org
--- Comment #3 from Michael Stefaniuc mstefani@winehq.org --- Can you please try to reproduce it without winetricks directmusic and capture the following debug output?
export WINEDEBUG="+seh,+dsound,+dsound3d,+dswave,+dmband,+dmcompos,+dmdump,+dmfile,+dmfileraw,+dmime,+dmloader,+dmobj,+dmscript,+dmstyle,+dmsynth,+dmusic"
And then run the the game on the console redirecting the output to a file and then attaching that?
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #4 from herac1es broatchgill@gmail.com --- Created attachment 71019 --> https://bugs.winehq.org/attachment.cgi?id=71019 Debug output to console
Hope this is what you require.
https://bugs.winehq.org/show_bug.cgi?id=51948
herac1es broatchgill@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #71019|0 |1 is obsolete| |
--- Comment #5 from herac1es broatchgill@gmail.com --- Created attachment 71021 --> https://bugs.winehq.org/attachment.cgi?id=71021 Debug output to console
Text version
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #6 from Rafał Mużyło galtgendo@o2.pl --- ...so, it almost certainly is dmusic,
While that 'demangle_datatype Unknown type @' potentially is worth checking out to verify after the failure things are handled correctly, it's dmusic where things fail.
Note though, that while the crash is a bug that needs fixing, midi music will likely not work without native libs.
Things seem to break when this call: 016c:trace:dmloader:IDirectMusicLoaderFileStream_Attach (0DCB4F28, L"C:\GOG GAMES\GOTHIC 2 GOLD\_WORK\DATA\MUSIC\ADDONWORLD\DLS_Harp.dls", 0014E590)
fails.
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #7 from Michael Stefaniuc mstefani@winehq.org --- Yes, the attached debug output is perfect.
Does the file exist in your installation and is it readable? "C:\GOG GAMES\GOTHIC 2 GOLD\_WORK\DATA\MUSIC\ADDONWORLD\DLS_Harp.dls"
dlls/dmloader/loaderstream.c in function IDirectMusicLoaderFileStream_Attach() this fails: This->hFile = CreateFileW (wzFile, (GENERIC_READ | GENERIC_WRITE), (FILE_SHARE_READ | FILE_SHARE_WRITE), NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (This->hFile == INVALID_HANDLE_VALUE) { WARN(": failed\n");
So basically the file cannot be opened; that's clearly seen in the log.
And then the error trickles down until something doesn't expects an error and bombs out.
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #8 from herac1es broatchgill@gmail.com --- Yes, file exists and for my user is set with read/write permissions. Others are read only. Not sure if there is an app I could use to try and open/play it?
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #9 from Rafał Mużyło galtgendo@o2.pl --- Soundfonts aren't quite something you can simply playback.
Though, if eyeball tests show nothing wrong, perhaps WINEDEBUG=file would show something of interest ?
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #10 from herac1es broatchgill@gmail.com --- Created attachment 71031 --> https://bugs.winehq.org/attachment.cgi?id=71031 WINEDEBUG=file
Tried WINEDEBUG=file. The output file was large so I have extracted match to Harp.dls and can see file not found.
On closer inspection I noticed the filename discrepancy. 'DLS_Harp.dls' does not exist but '__DLS_Harp.dls' does. All dls files in AddonWorld folder begin with '__'.
I copied '__DLS_Harp.dls' to 'DLS_Harp.dls' and although not fully tested the game works.
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #11 from Rafał Mużyło galtgendo@o2.pl --- That would suggest this problem is a combination of a bug in the addon (perhaps it references a wrong filename due to a typo - might me worth asking them) and Windows handling such case more gracefully.
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #12 from herac1es broatchgill@gmail.com --- Works ok in windows.
https://bugs.winehq.org/show_bug.cgi?id=51948
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |o.dierick@piezo-forte.be
--- Comment #13 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Hello,
According to steamdb depot information [1], there is a 'DLS_Harp.dls' in "_WORK\DATA\MUSIC\NEWWORLD\" and '__DLS_Harp.dls' in "_WORK\DATA\MUSIC\ADDONWORLD\". I don't think the GOG version is different.
Maybe the game loads both files one after the other and Wine gets confused with the cached directory data?
It's hard to tell what is happening without more WINEDEBUG=+file content.
Tried WINEDEBUG=file. The output file was large so I have extracted match to Harp.dls and can see file not found.
Can you try to attach a compressed log, or cut a complete chunk of ~1MB of lines around the first file not found error?
[1] https://steamdb.info/depot/39511/
Regards.
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #14 from herac1es broatchgill@gmail.com --- Created attachment 71042 --> https://bugs.winehq.org/attachment.cgi?id=71042 WINEDEBUG=+file compressed
Hi,
Yes, there is a 'DLS_Harp.dls' in "_WORK\DATA\MUSIC\NEWWORLD\" and '__DLS_Harp.dls' in "_WORK\DATA\MUSIC\ADDONWORLD\".
I have attached compressed log.
Thanks.
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #15 from Michael Stefaniuc mstefani@winehq.org --- The attachment 71021 has mentions of __DLS_Harp.dls: 016c:trace:dmfile:dump_DMUS_OBJECTDESC - wszFileName = L"__DLS_Harp.dls" 016c:trace:dmfile:dump_DMUS_OBJECTDESC - wszFileName = L"__DLS_Harp.dls"
So something gets confused in Wine's dmusic related code. Most likely as it is automatic loading.
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #16 from Michael Stefaniuc mstefani@winehq.org --- Here's the issue, same guidObject = {b4b1e55e-c9c3-45ad-993e-d46499f54b30}
016c:trace:dmloader:IDirectMusicLoaderImpl_GetObject (0014E590)->(0135DEC0, IID_IDirectMusicObject, 0135E27C) 016c:trace:dmfile:dump_DMUS_OBJECTDESC DMUS_OBJECTDESC (0135DEC0): - dwSize = 0 016c:trace:dmfile:dump_DMUS_OBJECTDESC - dwValidData = 0x000097 ( DMUS_OBJ_OBJECT DMUS_OBJ_CLASS DMUS_OBJ_NAME DMUS_OBJ_FILENAME DMUS_OBJ_VERSION ) 016c:trace:dmfile:dump_DMUS_OBJECTDESC - guidClass = CLSID_DirectMusicCollection 016c:trace:dmfile:dump_DMUS_OBJECTDESC - guidObject = {b4b1e55e-c9c3-45ad-993e-d46499f54b30} 016c:trace:dmfile:dump_DMUS_OBJECTDESC - vVersion = '1,0,0,1' 016c:trace:dmfile:dump_DMUS_OBJECTDESC - wszName = L"__DLS_Harp" 016c:trace:dmfile:dump_DMUS_OBJECTDESC - wszFileName = L"__DLS_Harp.dls" 016c:trace:dmloader:IDirectMusicLoaderImpl_GetObject : looking if we have object in the cache or if it can be found via alias 016c:trace:dmloader:find_cache_object Found by DMUS_OBJ_OBJECT 016c:trace:dmloader:IDirectMusicLoaderImpl_GetObject : not loaded yet 016c:trace:dmloader:IDirectMusicLoaderImpl_GetObject : found alias entry for requested object... using stored info ^^^^^ This is probably wrong but will need tests to figure out.
016c:trace:dmfile:dump_DMUS_OBJECTDESC DMUS_OBJECTDESC (03DDFE38): - dwSize = 848 016c:trace:dmfile:dump_DMUS_OBJECTDESC - dwValidData = 0x000097 ( DMUS_OBJ_OBJECT DMUS_OBJ_CLASS DMUS_OBJ_NAME DMUS_OBJ_FILENAME DMUS_OBJ_VERSION ) 016c:trace:dmfile:dump_DMUS_OBJECTDESC - guidClass = CLSID_DirectMusicCollection 016c:trace:dmfile:dump_DMUS_OBJECTDESC - guidObject = {b4b1e55e-c9c3-45ad-993e-d46499f54b30} 016c:trace:dmfile:dump_DMUS_OBJECTDESC - vVersion = '1,0,0,1' 016c:trace:dmfile:dump_DMUS_OBJECTDESC - wszName = L"DLS_Harp" 016c:trace:dmfile:dump_DMUS_OBJECTDESC - wszFileName = L"DLS_Harp.dls" 016c:trace:dmloader:IDirectMusicLoaderImpl_GetObject : loading from file (L"C:\GOG GAMES\GOTHIC 2 GOLD\_WORK\DATA\MUSIC\ADDONWORLD\DLS_Harp.dls")
https://bugs.winehq.org/show_bug.cgi?id=51948
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1
--- Comment #17 from Michael Stefaniuc mstefani@winehq.org --- OK, the dmusic object cache implementation in Wine is incomplete.
016c:trace:dmloader:IDirectMusicLoaderImpl_SetSearchDirectory (0014E590, GUID_DirectMusicAllTypes, L"C:\GOG GAMES\GOTHIC 2 GOLD\_WORK\DATA\MUSIC\ADDONWORLD\", 0)
The game is not clearing the information about the old cached object so it should load "DLS_Harp.dls" from the old directory. See fClear parameter description on http://doc.51windows.net/Directx9_SDK/htm/idirectmusicloader8setsearchdirect...
But the cache for objects loaded from file lacks the directory information. So once the search directory is changed the cached but not loaded file objects are lost. Definitely a bug that should be fixed and would be enough to avoid the crash. Also it's easy to add a Wine test for that.
Now if "NEWWORLD\DLS_Harp.dls" should be loaded or "ADDONWORLD\__DLS_Harp.dls" is a different issue; guidObject is the same for both.
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #18 from Michael Stefaniuc mstefani@winehq.org --- I bought the game on Steam but is there a trick to get past the initial crash in Vdfs32g.dll? There are multiple multi-step procedures to patch the game with unofficial patches...
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #19 from herac1es broatchgill@gmail.com --- Install the following in this order:
gothic2_fix-2.6.0.0-rev2.exe g2notr-systempack-1.6.exe gothic2_playerkit-2.6f.exe
https://steamcommunity.com/app/39510/discussions/0/613948093876506956/
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #20 from herac1es broatchgill@gmail.com --- (In reply to herac1es from comment #19)
Install the following in this order:
gothic2_fix-2.6.0.0-rev2.exe g2notr-systempack-1.6.exe gothic2_playerkit-2.6f.exe
https://steamcommunity.com/app/39510/discussions/0/613948093876506956/
or I might have used this one , can't quite remember:
https://steamcommunity.com/app/39510/discussions/0/152393186501250052/
https://bugs.winehq.org/show_bug.cgi?id=51948
--- Comment #21 from herac1es broatchgill@gmail.com --- Sorry just remembered I created a fresh install to test the above. My gog version runs without the patches.