Opened 20 months ago
Closed 20 months ago
#12771 closed defect (fixed)
AGS King's Quest 3 VGA from IA crashes on startup
|Reported by:||Tucky27||Owned by:||criezy|
|Version:||Keywords:||Kings Quest 3 AGS|
|Cc:||Game:||King's Quest 3|
Below is the status window upon loading AGS Kings Quest 3 from IA. The game immediately hangs on a black screen and asks scummVM to close
user picked target 'kq3vga' (engine ID 'ags', game ID 'kq3vga')...
Looking for a plugin supporting this target... Adventure Game Studio
WARNING: TODO: SetCurrentDirectory: H:\Games\Sierra\Kings Quest Collection\Extras\Fan games\Kings Quest 3\!
Initializing backend libs
Initializing game data
Opened game data file: ac2game.dta
Game data version: 31
Compiled With: 2.70
Startup directory: ./
Data directory: ./
Setting up game configuration
Voice pack found and initialized.
music.vox found and initialized.
Initializing TTF renderer
Initializing mouse: number of buttons reported is 3
Initialize legacy path finder library
Game title: 'Kings Quest III'
Game GUI version: 110
Plugin 'agsCreditz2' loaded as 'agsCreditz2.dll', resolving imports...
Change History (8)
comment:1 by , 20 months ago
comment:2 by , 20 months ago
|Status:||new → closed|
Thanks for the report. It seems at some point I accidentally erased one of the function exports
comment:3 by , 20 months ago
|Status:||closed → new|
The game is still crashing for me and the status window error message is exactly the same. I tried to run this on Daily Build from August 4th.
comment:4 by , 20 months ago
I just tried it on macOS 64 bit ARM with the latest code and ScummVM compiled as a 64 bit application. The game starts properly for me. I also enabled address sanitizer and it didn't detect any memory issue.
The output I get is the same as yours initially, and then continues
... Game GUI version: 110 Plugin 'agsCreditz2' loaded as 'agsCreditz2.dll', resolving imports... Plugin 'ags_snowrain' loaded as 'ags_snowrain.dll', resolving imports... Plugin 'ags_tcp_ip' loaded as 'ags_tcp_ip.dll', resolving imports... Checking for disk space Game native resolution: 640 x 400 (16 bit) Graphic settings: driver: OGL, windowed: yes, screen def: scaling, screen size: 0 x 0, match device ratio: ignore, game scale: max_round Requested graphics driver 'OGL' not found, will try existing drivers instead WARNING: movement control not supported, mouse control can't be enabled! Mouse speed control: disabled, unit: 1.000000, user value: 1.000000 Setting up window Initialize sprites Engine initialization complete Starting game
It looks like your issue happens maybe when loading the ags_snowrain plugin. But since I cannot reproduce any issue, it is difficult for me to investigate this.
It might be a Windows specific issue.
Are you using the 32 bit or 64 bit ScummVM build? Both would work on Windows 64, but so you might want to check if the other one works in case that makes a difference. And when it asks ScummVM to close, does it provide any additional information that could help pinpoint what is causing the issue?
comment:5 by , 20 months ago
I've tried 32bit and 64bit versions of ScummVM and both crash at the same stage so no additional info. I've checked into acsetup.cfg and I have gamecolordepth=32 whereas your status window lists 16 bit. I tried changing that to 16 bit but that made no difference. I have all required dlls and the game runs regularly through Windows 7 just not in ScummVM. I looked at the itch.io site and some commenter mentioned that the wolf howling in the intro was an older version so I thought that maybe it as thats the one I have. I tried downloading the newer version and it still crashed the same through.
ScummVM crashes with this message when I tried the debugger
An unhandled win32 exception occurred in ScummVM.exe 
Unhandled exception at 0x000000000134B7ED in scummvm.exe: 0xC0000094: Integer division by zero.
comment:6 by , 20 months ago
That additional information is actually useful. An integer division by zero is undefined behaviour in the standard, so different compilers may behave in different ways. That could explain why I don't get the same error. If that is the reason I should be able to see the issue by enabling the UndefinedBehaviorSanitizer in my build on macOS and investigate this further.
comment:7 by , 20 months ago
And the UndefinedBehaviorSanitizer confirms that there is a division by zero in the ags_snow_rain plugin.
engines/ags/plugins/ags_snow_rain/weather.cpp:237:63: runtime error: division by zero
comment:8 by , 20 months ago
|Status:||new → closed|
Thank you for your report. This is now fixed.
I forgot to add that I'm running the latest daily build for 30th July and that I'm running on Windows 7 64 bit.