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)
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #10 from ToastyBug cemer99797@isorax.com --- As of Wine-devel 10.14, this game is now playabale again but only with workaround and caveats. To play it, you have to launch the JEDI.EXE launcher app (not the JKDEMO.EXE game app) and click "Play Jedi Knight Demo"...
After clicking "Play Jedi Knight Demo": 1. the game app will be launched to an all-black fullscreen and tries to change the screen resolution 2. the game app will minimize itself to the macOS Dock after 1 to 3 seconds 3. the same error pop-up as in my first post will show up:
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.
Clicking the minimized game app from the macOS Dock (grayscale Jedi icon) will return the game app to fullscreen, with an all-black fullscreen and the intro video music playing in the background.
Pressing Esc will skip the all-black intro video and correctly load the main menu and the game is playable! Press the equals key to increase the game viewport to fill the screen.
### NOTES: 1. if you choose "Cutscenes" from the main menu and press OK to play the Splash movie (intro movie), it will now play correctly
2. if you switch out of (Cmd-Tab) and return to the game from: * the all-black intro video (before pressing Esc to skip): the game correclty returns to the all-black intro video * the main menu: the main menu will now be all black, but the sounds still play when clicking your mouse and pressing Esc * the correctly-playing intro video from the Cutscenes menu: the game returns to an all-black intro video, but if you skip it (Esc), the main menu will display correctly * gameplay: the game viewport will be all the way off-screen to the top of the screen, meaning only the bottom 20% of the game can be seen (press the equals key to increase the in-game viewport). If you press Esc the pause menu still appears correctly * the pause menu, activated for the first time from gameplay: the game returns to an all-black pause menu, and pressing Esc returns the game viewport being off-screen to the top as before * the pause menu, activated for a second time from gameplay: the pause menu correctly reappears, but after returning to gameplay, the game viewport is still off to the top of the screen
3. if you close all macOS Terminal windows (which normally exits all wine processes), the game app will still be running, but the error pop-up will be killed. The game can be exited by force-quitting the wine processes in macOS Activity Monitor or Force Quit dialog
I also bisected this with Wine-devel 10.12 and 10.13, and they both give the same error as in my first post, so this was fixed in Wine-devel 10.14:
"smackw32.DLL" failed to initialize, aborting
I am using the official WineHQ/Gcenx binary from Homebrew/GitHub: https://formulae.brew.sh/cask/wine@devel https://github.com/Gcenx/macOS_Wine_builds/releases/download/10.14/wine-deve...
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #11 from ToastyBug cemer99797@isorax.com --- Created attachment 79337 --> http://bugs.winehq.org/attachment.cgi?id=79337 macOS Terminal log for JEDI.EXE, wine 10.14, WINEDEBUG=module
This is the macOS Terminal log for JEDI.EXE (the launcher app, not the game app), wine 10.14, WINEDEBUG=module
The log ends (and control is returned to the Terminal) as soon as the error pop-up is closed (the game app continues in another spawned wine process not controllable from the Terminal)
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #12 from ToastyBug cemer99797@isorax.com --- Created attachment 79338 --> http://bugs.winehq.org/attachment.cgi?id=79338 screenshot of JKDEMO.EXE error pop-up
When launching the game app (JKDEMO.EXE) directly, there is a small error pop-up over an all-black fullscreen background, that says:
ERROR ERR_CANNOT_LOAD_FILE □□□□□□□□
This happenes with both a direct launch (JKDEMO.EXE) or with the windowgui argument (JKDEMO.EXE -windowgui)
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #13 from ToastyBug cemer99797@isorax.com --- Created attachment 79339 --> http://bugs.winehq.org/attachment.cgi?id=79339 macOS Terminal log for JKDEMO.EXE, wine 10.14, WINEDEBUG=module
This is the macOS Terminal log for JKDEMO.EXE (the game app), with no arguments, wine 10.14, WINEDEBUG=module
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #14 from ToastyBug cemer99797@isorax.com --- Created attachment 79340 --> http://bugs.winehq.org/attachment.cgi?id=79340 macOS Terminal log for JKDEMO.EXE -windowgui, wine 10.14, WINEDEBUG=module
This is the macOS Terminal log for JKDEMO.EXE (the game app), with the -windowgui argument (JKDEMO.EXE -windowgui), wine 10.14, WINEDEBUG=module
http://bugs.winehq.org/show_bug.cgi?id=58156
ToastyBug cemer99797@isorax.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #15 from ToastyBug cemer99797@isorax.com --- I am marking this bug ("smackw32.DLL" failed to initialize) as resolved as of Wine-devel 10.14
I am moving the rest of the new issues described since Comment 10 (https://bugs.winehq.org/show_bug.cgi?id=58156#c10) to a new bug# 58729
http://bugs.winehq.org/show_bug.cgi?id=58156
--- Comment #16 from ToastyBug cemer99797@isorax.com --- I also found another game affected by this bug ("smackw32.DLL" failed to initialize), also fixed in Wine-devel 10.14
game: NetStorm: Islands At War download page: https://www.myabandonware.com/game/netstorm-islands-at-war-a12#download zip filename: NetStorm-Islands-at-War_Win_EN_RIP-Version.zip sha256: e014d3b41011532e4be2646304c67adc60c1c4d5998eb84df9e73a33bb4f7fea
run netstorm.exe to launch
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 & other |launch, "smackw32.DLL" |games: won't launch, |failed to initialize |"smackw32.DLL" failed to |(macOS) |initialize (macOS)
http://bugs.winehq.org/show_bug.cgi?id=58156
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #17 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 10.16.