Opened 3 years ago

Closed 3 years ago

#12021 closed defect (fixed)

SCI: KQ4 Rosella gets stuck entering doors

Reported by: yuv422 Owned by: yuv422
Priority: normal Component: Engine: SCI
Version: Keywords:
Cc: yuv422 Game: King's Quest 4

Description

The game gets stuck when trying to enter a door and the cursor changes to the crown.

This seems to happen after I put my Mac to sleep while ScummVM is running.

Also the music no longer plays after resuming from sleep. This may be related.

Attachments (1)

kq4sci.004 (17.6 KB ) - added by yuv422 3 years ago.

Download all attachments as: .zip

Change History (8)

by yuv422, 3 years ago

Attachment: kq4sci.004 added

comment:1 by yuv422, 3 years ago

I tested with osx_x64-stable-0a7dd239

Version 0, edited 3 years ago by yuv422 (next)

comment:2 by sluicebox, 3 years ago

The door plays a sound which triggers the room change when it completes. An audio problem that interferes with the sound completing would explain the game getting stuck as described.

I don't have a Mac to test on right now, and the door is working for me on Win7, but I'm seeing problems:

  1. getItemMusic is playing in the save, which seems wrong. Its MusicEntry::status is kSoundPlaying. This is a short sound that plays when picking up an item and there are no items within reach of this save location. It seems like the sound played much earlier and somehow got never stopped. That could be a symptom of the broken audio after resuming from sleep on Mac.
  1. The last note of getItemMusic never stops playing when restoring the game, even though its MusicEntry stops. The stuck note then persists even after restoring an unrelated game. This didn't happen before release 2.2.0, I bisected it to: https://github.com/scummvm/scummvm/commit/e16ab73cc1c4067ae24b708ff5640931dd77fbfc

To reproduce the stuck note regression from scratch:

  1. "look under bridge" to get the golden ball
  2. Quickly save the game while getItemMusic is playing
  3. Restore the save, getItemMusic will play and the final note will be stuck
  4. Restore an unrelated save, the stuck note will still play

yuv422, could you try the previous release and see if the sleep/resume audio problems happen? https://downloads.scummvm.org/frs/scummvm/2.1.2/

(This save appears to be for KQ4 1.006.004 but what I'm seeing applies to every KQ4 version I've tested)

comment:3 by sluicebox, 3 years ago

Priority: highnormal

I tried reproducing this on an M1 Macbook and also an Intel Mac with your OS version (10.14.6) and I couldn't get KQ4 sound to break after sleeping/resuming. I used the same stable ScummVM build. It appears that whatever is going on there that breaks the door is specific to something in your environment so I'm setting the priority to normal. Can you come up with steps to reproduce the broken audio from the start of the game?

comment:4 by yuv422, 3 years ago

Interesting. I'll try fiddling around with my audio setup a bit to see if I can narrow down what might be causing it.

I do run my audio off my monitor's audio out which is fed in via USB-C

comment:5 by sluicebox, 3 years ago

Thanks again for reporting this, it brought some SCI0 audio issues to our attention which led to sorting out a number of things such as the stuck-note regression: https://github.com/scummvm/scummvm/pull/2828

Those changes were merged into master in https://github.com/scummvm/scummvm/commit/505e9aff1596321ae86a7943a87dc0ad7063ab43

I'm not sure if this fixes your original issue but it might. If you're unable to reproduce this then I recommend closing this ticket. If it comes up again you can re-open, or create a new one if that's cleaner.

comment:6 by yuv422, 3 years ago

Yeah that fixed it for me. I can enter the door after returning from computer sleep. :)

comment:7 by yuv422, 3 years ago

Owner: set to yuv422
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.