Opened 14 months ago
Closed 14 months ago
#14646 closed defect (fixed)
SCI: QFG4: Game crashes if Import character button is clicked without a file selected
Reported by: | KGOrphanides | Owned by: | sluicebox |
---|---|---|---|
Priority: | normal | Component: | Engine: SCI |
Version: | Keywords: | QFG4, import | |
Cc: | KGOrphanides | Game: | Quest for Glory 4 |
Description
Very trivial bug here. Clicking Import on the Import Character screen if there is no file to import crashes the game.
Steps to reproduce:
Ensure that no QFG .sav character file is located in the ScummVM save path (usually ~\.scummvm)
Launch GOG version of Quest for Glory 4 (CD/DOS/English)
Click Import Character
Result:
The ScummVM console pops up with
`ERROR:
parameter 0: 000f:0007 (reference), should be reference
parameter 1: 0000:0002 (integer), should be null, integer
parameter 2: 0000:0000 (null, integer), should be reference
parameter 3: 0000:0000 (null, integer), should be null, integer
parameter 4: 0000:0001 (integer), should be null, integer
[VM] KArrayCopy: signature mismatch in method Str::callKernel (room 54, script 64918, localCal
)
Reproducibility:
I've reproduced the issue under version 2.7.0 (Pop!_OS 22.04) on x64 and 2.7.1 build from source on aarch64 (Raspberry Pi OS 6.1). If you have a file in the path, you just get the expected "sorry I couldn't find your character" message.
Attachments (1)
Change History (3)
by , 14 months ago
Attachment: | image-20230925-151147.png added |
---|
comment:1 by , 14 months ago
Component: | GUI → Engine: SCI |
---|---|
Game: | → Quest for Glory 4 |
Summary: | QFG4: Game crashes if Import character button is clicked without a file selected (Linux) → SCI: QFG4: Game crashes if Import character button is clicked without a file selected |
comment:2 by , 14 months ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in: https://github.com/scummvm/scummvm/commit/2a9439182a1a06c9400689be395af14c4f6e42a3
This *should* have been a fatal error in Sierra's interpreter, in which case someone would have noticed it and fixed the game script, but according to the disassembly, the interpreter's validation tested the address that held the null pointer instead of the null pointer itself, so the validation always passed. Classic QFG4! =)
I've updated our validation to match what really happens.
Thanks again!
Hello! Thank you for reporting this.
I took a quick look, I understand why it's throwing that error but I don't understand why the original doesn't. (yet!)
I also tried disabling our code that hooks into this dialog to display our message box and disable the Change Directory button, and that doesn't seem to affect this.
I'll try modding QFG4 scripts later to narrow down the discrepancy in the original
This error happens on all platforms.