http://bugs.winehq.org/show_bug.cgi?id=58156
Bug ID: 58156 Summary: Star Wars: Jedi Knight - Dark Forces II Demo: won't launch, "smackw32.DLL" failed to initialize Product: Wine Version: 10.6 Hardware: x86-64 OS: MacOS Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: cemer99797@isorax.com
Created attachment 78437 --> http://bugs.winehq.org/attachment.cgi?id=78437 Wine-devel 10.6 log for "wine jkdemo.exe -windowgui"
the Star Wars: Jedi Knight - Dark Forces II Demo: won't launch, it says "smackw32.DLL" failed to initialize. This is a Windows 95 game demo
I tried setting the Windows Version to Windows 10, Windows 95, and Windows 98 in winecfg. I also tried launching the demo with and without the windowgui flag: `wine jkdemo.exe -windowgui` as mentioned in AppDB HowTo section.
This is a regression because a lot of users report this game demo as Gold in AppDB, including on macOS (https://appdb.winehq.org/objectManager.php?sClass=version&iId=10948)
The jedi.exe file is a launcher GUI which works fine, but when clicking "Play Jedi Knight Demo" it fails with the error:
`file` command info for: jkdemo.exe PE32 executable (GUI) Intel 80386, for MS Windows
Unable to start the Jedi Knight Demo game program. Try running JK.EXE where you installed the Demo directly. Also make sure you have the latest DirectX drivers installed on your system.
The macOS terminal shows this error as one of the last things in the log: "err:module:loader_init "smackw32.DLL" failed to initialize, aborting" (the module is normally unzipped next to the jkdemo.exe executable)
tested with Gcenx's Wine-devel 10.6 (https://github.com/Gcenx/macOS_Wine_builds/releases/tag/10.6) on macOS 11
and Wine-devel 9.21 (https://github.com/Gcenx/macOS_Wine_builds/releases/tag/9.21)
and Gcenx's Wine CrossOverFOSS 23.7.1-1 based on Wine 8.0.1 (https://github.com/Gcenx/winecx/releases/tag/crossover-wine-23.7.1-1)
download page (choose Download this File > Agree > Jedi Knight Demo.zip): https://community.pcgamingwiki.com/files/file/1308-jedi-knight-dark-forces-i... sha256: 7bc013918cf79879a086a10c27306f2f3511852726f4b4a9fec09668ed221d18
http://bugs.winehq.org/show_bug.cgi?id=58156
ToastyBug cemer99797@isorax.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://community.pcgamingw | |iki.com/files/file/1308-jed | |i-knight-dark-forces-ii-dem | |o/ Keywords| |download, regression
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #1 from ToastyBug cemer99797@isorax.com --- I accidentally added the "`file` command" text in the middle of the GUI error message text, it should read:
`file` command info for: jkdemo.exe PE32 executable (GUI) Intel 80386, for MS Windows
The jedi.exe file is a launcher GUI which works fine, but when clicking "Play Jedi Knight Demo" it fails with the error:
Unable to start the Jedi Knight Demo game program. Try running JK.EXE where you installed the Demo directly. Also make sure you have the latest DirectX drivers installed on your system.
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #2 from ToastyBug cemer99797@isorax.com --- I have verified (in a Win95 VM) that the ZIP download mentioned in the original comment ("Jedi Knight Demo.zip") contains the same binary files as the well-known 2012 upload of Star Wars: Jedi Knight - Dark Forces II Demo 16-bit installer from archive.org (https://archive.org/details/StarWarsJediKnightDarkForcesII_1020)
A user wrote in another bugzilla comment from 2018 that they were able to play this demo on macOS 10.13 (https://bugs.winehq.org/show_bug.cgi?id=34166#c106)
file info for the 2012 archive.org 16-bit installer download (won't run on modern 64-bit only macOS):
"jedidemo.zip", sha256: b92dd1dd34790a9152e706bef8976d051d1ff4f61fd401b1bd197b6abf80ee01 unzipped, contains "jedidemo.exe", sha256: 8aae38165e08b68bb63cfd21b8c28ed1d4d8f1bb400a0162588d5b86acdc827e
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #3 from Rafał Mużyło galtgendo@o2.pl --- Anything interesting in console output if you set WINEDEBUG to ''module' ?
http://bugs.winehq.org/show_bug.cgi?id=58156
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #4 from joaopa jeremielapuree@yahoo.fr --- Created attachment 78438 --> http://bugs.winehq.org/attachment.cgi?id=78438 Working fine with wine-10.6 in Linux
Demo from archive.org works fine for me in Linux with wine-10.6 Screenshot proves it.
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #5 from ToastyBug cemer99797@isorax.com --- (In reply to Rafał Mużyło from comment #3)
Anything interesting in console output if you set WINEDEBUG to ''module' ?
Yes, this is from wine-devel 10.6, ran with the command:
cd "/Users/toastybug/Downloads/Jedi Knight Demo" Jedi Knight Demo % WINEDEBUG=module wine JKDEMO.EXE -windowgui
Here are all the lines referencing smackw32.DLL:
01c4:trace:module:load_dll looking for L"smackw32.DLL" in (null) 01c4:trace:module:get_load_order looking for L"Z:\Users\toastybug\Downloads\Jedi Knight Demo\smackw32.DLL" 01c4:trace:module:get_load_order got hardcoded default for L"Z:\Users\toastybug\Downloads\Jedi Knight Demo\smackw32.DLL" 01c4:warn:module:find_builtin_dll cannot find builtin library for L"\??\Z:\Users\toastybug\Downloads\Jedi Knight Demo\smackw32.DLL" 01c4:trace:module:map_image_into_view mapping PE file L"\??\Z:\Users\toastybug\Downloads\Jedi Knight Demo\smackw32.DLL" at 0x280000-0x296000 01c4:trace:module:map_image_into_view mapping L"\??\Z:\Users\toastybug\Downloads\Jedi Knight Demo\smackw32.DLL" section BEGTEXT at 0x281000 off 400 size d800 virt 0 flags 60000020 01c4:trace:module:map_image_into_view clearing 0x28e800 - 0x28f000 01c4:trace:module:map_image_into_view mapping L"\??\Z:\Users\toastybug\Downloads\Jedi Knight Demo\smackw32.DLL" section DGROUP at 0x28f000 off dc00 size 1400 virt 0 flags c0000040 01c4:trace:module:map_image_into_view clearing 0x290400 - 0x291000 01c4:trace:module:map_image_into_view mapping L"\??\Z:\Users\toastybug\Downloads\Jedi Knight Demo\smackw32.DLL" section .bss at 0x291000 off 0 size c00 virt 0 flags c0000080 01c4:trace:module:map_image_into_view mapping L"\??\Z:\Users\toastybug\Downloads\Jedi Knight Demo\smackw32.DLL" section .idata at 0x292000 off f000 size c00 virt 0 flags c0000040 01c4:trace:module:map_image_into_view clearing 0x292c00 - 0x293000 01c4:trace:module:map_image_into_view mapping L"\??\Z:\Users\toastybug\Downloads\Jedi Knight Demo\smackw32.DLL" section .edata at 0x293000 off fc00 size 600 virt 0 flags 40000040 01c4:trace:module:map_image_into_view clearing 0x293600 - 0x294000 01c4:trace:module:map_image_into_view mapping L"\??\Z:\Users\toastybug\Downloads\Jedi Knight Demo\smackw32.DLL" section .reloc at 0x294000 off 10200 size 1400 virt 0 flags 42000040 01c4:trace:module:map_image_into_view clearing 0x295400 - 0x296000 01c4:trace:module:perform_relocations relocating from 00400000-00416000 to 00280000-00296000 01c4:warn:module:alloc_module disabling no-exec because of L"smackw32.DLL"
01c4:trace:module:build_module loaded L"\??\Z:\Users\toastybug\Downloads\Jedi Knight Demo\smackw32.DLL" 00015930 00280000 01c4:trace:module:load_dll Loaded module L"\??\Z:\Users\toastybug\Downloads\Jedi Knight Demo\smackw32.DLL" at 00280000
01c4:trace:module:process_attach (L"smackw32.DLL",0012FD24) - START 01c4:trace:module:MODULE_InitDLL (00280000 L"smackw32.DLL",PROCESS_ATTACH,0012FD24) - CALL 01c4:trace:module:LdrGetDllFullName module 00000000, name 0012F960. (00280000,PROCESS_ATTACH,0012FD24) - RETURN 0 01c4:trace:module:MODULE_InitDLL (00280000 L"smackw32.DLL",PROCESS_DETACH,0012FD24) - CALL 01c4:trace:module:MODULE_InitDLL (00280000,PROCESS_DETACH,0012FD24) - RETURN 1 01c4:warn:module:process_attach Initialization of L"smackw32.DLL" failed 01c4:trace:module:process_attach (L"smackw32.DLL",0012FD24) - END 01c4:err:module:loader_init "smackw32.DLL" failed to initialize, aborting 01c4:err:module:loader_init Initializing dlls for L"Z:\Users\toastybug\Downloads\Jedi Knight Demo\JKDEMO.EXE" failed, status c0000005 01b4:trace:module:LdrShutdownProcess ()
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #6 from ToastyBug cemer99797@isorax.com --- Someone in the AppDB entry for this game demo mentioned this in the HowTo / Notes section (https://appdb.winehq.org/objectManager.php?sClass=version&iId=10948):
To stop regressions in this game, a few test cases need to be written
- reproduce the ddraw codepath used in the cutscenes at the beginning of the game
- reproduce the ddraw codepath used for the menu system where blitting is done to update parts of the screen, they are redrawn incorrectly, so a test comparing the expected colour value against the updated value is needed
- probably the hardest, would be a testcase that uses the same 3d acceleration as enabled by the configuration options
Also the issue with smackw32.DLL is most likely related to the intro video playing in the Smacker video format (https://en.wikipedia.org/wiki/Smacker_video)
http://bugs.winehq.org/show_bug.cgi?id=58156
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org
--- Comment #7 from Bernhard Übelacker bernhardu@mailbox.org --- Created attachment 78553 --> http://bugs.winehq.org/attachment.cgi?id=78553 Working fine with wine-10.7 in Linux, smackw32 PROCESS_ATTACH.txt
Tried to reproduce this also inside a linux VM with wine-10.7, and could not observe this issue with smackw32.dll. So this might be something specific to MacOS.
(In reply to ToastyBug from comment #5)
01c4:trace:module:process_attach (L"smackw32.DLL",0012FD24) - START 01c4:trace:module:MODULE_InitDLL (00280000 L"smackw32.DLL",PROCESS_ATTACH,0012FD24) - CALL 01c4:trace:module:LdrGetDllFullName module 00000000, name 0012F960. (00280000,PROCESS_ATTACH,0012FD24) - RETURN 0
As far as I understand this PROCESS_ATTACH means the DllMain function from the dll gets executed. In my attempts I receive a "RETURN 1", in the failing ones "RETURN 0".
To get some insight what happens in this call to DllMain one could execute with +relay like this: WINEDEBUG=+module,+relay \ wine JKDEMO.EXE -windowgui \ >> $WINEPREFIX/drive_c/relay2.log 2>&1
This creates kind of huge files, please put the lines between "PROCESS_ATTACH...CALL" and "PROCESS_ATTACH...RETURN 0" into a file and attach it here. For comparison I attached that part from my succeeding test.
http://bugs.winehq.org/show_bug.cgi?id=58156
ToastyBug cemer99797@isorax.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|10.6 |8.0.1
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #8 from ToastyBug cemer99797@isorax.com --- Created attachment 78609 --> http://bugs.winehq.org/attachment.cgi?id=78609 reply to Bernhard Übelacker from comment #7
(In reply to Bernhard Übelacker from comment #7)
To get some insight what happens in this call to DllMain one could execute with +relay like this: WINEDEBUG=+module,+relay \ wine JKDEMO.EXE -windowgui \ >> $WINEPREFIX/drive_c/relay2.log 2>&1
This creates kind of huge files, please put the lines between "PROCESS_ATTACH...CALL" and "PROCESS_ATTACH...RETURN 0" into a file and attach it here. For comparison I attached that part from my succeeding test.
After following your instructions with Wine-devel 10.8 (Gcenx binary, https://github.com/Gcenx/macOS_Wine_builds/releases/tag/10.8) on macOS 11.7.10, there are 121 matches for "PROCESS_ATTACH" uppercase, and another 121 matches for "process_attach" lowercase.
Please see the attachment for the full reply
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #9 from ToastyBug cemer99797@isorax.com --- Created attachment 78611 --> http://bugs.winehq.org/attachment.cgi?id=78611 reply to Bernhard Übelacker from comment #7: all lines between "process_attach (L"smackw32.DLL" ... START" and "... END"
There are only 2 matches for: process_attach (L"smackw32.DLL"
The attachment contains all the lines between
process_attach (L"smackw32.DLL",0012FD24) - START
and
process_attach (L"smackw32.DLL",0012FD24) - END
(lines 468329-468369)
http://bugs.winehq.org/show_bug.cgi?id=58156
ToastyBug cemer99797@isorax.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Star Wars: Jedi Knight - |Star Wars: Jedi Knight - |Dark Forces II Demo: won't |Dark Forces II Demo: won't |launch, "smackw32.DLL" |launch, "smackw32.DLL" |failed to initialize |failed to initialize on | |macOS
http://bugs.winehq.org/show_bug.cgi?id=58156
ToastyBug cemer99797@isorax.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Star Wars: Jedi Knight - |Star Wars: Jedi Knight - |Dark Forces II Demo: won't |Dark Forces II Demo: won't |launch, "smackw32.DLL" |launch, "smackw32.DLL" |failed to initialize on |failed to initialize |macOS |(macOS)