X Tutup
Skip to content

SCI: Fix King's Quest IV demo crash#6578

Merged
bluegr merged 1 commit intoscummvm:masterfrom
eriktorbjorn:scumm-kq4-demo-fix
Apr 28, 2025
Merged

SCI: Fix King's Quest IV demo crash#6578
bluegr merged 1 commit intoscummvm:masterfrom
eriktorbjorn:scumm-kq4-demo-fix

Conversation

@eriktorbjorn
Copy link
Member

It was reported in https://forums.scummvm.org/viewtopic.php?t=17338 that the King's Quest IV demo (which can be found on the ScummVM demos page) crashes with the following messages:

User picked target 'kq4sci-demo' (engine ID 'sci', game ID 'kq4sci')...
Running King's Quest IV: The Perils of Rosella (SCI/Demo/DOS/English)
resource.001: 143e1c14f15ad0fbfc714f648a65f661, 205330 bytes.
resource.map: 992ac7cc31d3717fe53818a9bb6d1dae, 594 bytes.
WARNING: No selector vocabulary found, using a static one!
[kq4sci-demo-ego 699/994 Room699::<noname268> @ 0a11]: Send to invalid selector 0xffff (<noname65535>) of object at 0014:0170!
Debugger started, type 'exit' to return to the game.
Type 'help' to see a little list of commands and variables.
ERROR: [kq4sci-demo-ego 699/994 Room699::<noname268> @ 0a11]: Send to invalid selector 0xffff (<noname65535>) of object at 0014:0170!

Bisecting pointed to the "ride unicorn at night" patch. I suspect it has something to do with the "No selector vocabulary found" warning, but that's way beyond my knowledge of SCI. So this pull request simply disables the unicorn patch for the demo. To me that seems like the simplest, most elegant solution.

Note that I have not played the full game to verify that riding the unicorn at night still work as intended. I haven't played this game for many years (before ScummVM supported it), and from a quick glance at a walkthrough it seems I would have to play a substantial part of it to test this? So this should not be merged blindly. I just wanted to make sure that the bug doesn't get lost.

(I could have filed a bug report instead, but how often do I get to make pull requests for the SCI engine, and how cool is that? ;-)

This patch is not compatible with the demo, and will cause it to crash
with a "Send to invalid selector" error.
@bluegr
Copy link
Member

bluegr commented Apr 28, 2025

Nice find!

This patch is aimed at newer versions of KQ4, where the pic drawing logic was changed compared to earlier ones.

The KQ4 demo features an earlier version of the pic drawing logic, so disabling that patch for the demo as a quick solution to the issue makes sense, and avoids us having to adapt the patch for the demo for no reason.

Thanks again

@bluegr bluegr merged commit 77bdb61 into scummvm:master Apr 28, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup