Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#12901 closed defect (fixed)

SCI: PQ4 (CD): German CD Version crash when entering the options in the game

Reported by: gabberhead Owned by: bluegr
Priority: normal Component: Engine: SCI
Version: Keywords: sci32, crash, patcher, high resolution
Cc: Game: Police Quest 4

Description

i Have the daily build from 4.9.2021. and when i start the game, i can play it without problem. but when i try to enter the options menu, the game crashes with the following message:

ERROR: Failed to load mem 0000:0000!

Then i tried the latest offical version 2.2.0 and the problem is the same.

The crash happens only with activated high resolution option under the engine in the options. When i deactivate it, i can enter the menu without a crash.

Then i tried the official 2.1.2 version, and with that version, the problem is gone. i can enter the menu without the crash with and without the high resolution option.

The Problem is also described here:

https://forums.scummvm.org/viewtopic.php?f=2&t=16367

Attachments (2)

pq4-english-hires.png (32.5 KB ) - added by eriktorbjorn 3 years ago.
pq4-english-lores.png (22.0 KB ) - added by eriktorbjorn 3 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by antoniou79, 3 years ago

Keywords: patcher high resolution added
Summary: Police quest IV German CD Version crash when entering the options in the gameSCI: PQ4 (CD): German CD Version crash when entering the options in the game

I'm adding my comment from the forum thread, in case it might be helpful:
With the kDebugLevelGraphics enabled, the output at the error mark is:

kAddScreenItem 36:1e92 (iconText)
Failed to load mem 0000:0000!

This is triggered in ScreenItem::setFromObject() (screen_item32.cpp)
https://github.com/scummvm/scummvm/blob/2d50ec4a412b9c807cc305679bbd8df979c56861/engines/sci/graphics/screen_item32.cpp#L172

By (crudely) removing the the applyPatch() line in script_patches.cpp, the error no longer happens, but then the PQ4 patch for subtitles+audio option in the GUI is no longer functional.
https://github.com/scummvm/scummvm/blob/2d50ec4a412b9c807cc305679bbd8df979c56861/engines/sci/engine/script_patches.cpp#L22233

So the error is related to the patch application, which does not seem to "agree" with the DEU version.

I don't know why it is connected to the "high resolution" engine option though.

comment:2 by antoniou79, 3 years ago

Keywords: sci32 added

by eriktorbjorn, 3 years ago

Attachment: pq4-english-hires.png added

by eriktorbjorn, 3 years ago

Attachment: pq4-english-lores.png added

comment:3 by eriktorbjorn, 3 years ago

I don't know why it is connected to the "high resolution" engine option though.

At least in the English version, I only see the speech/text option in the high-resolution version:


Not in the low-resolution one:


But I don't know if that means they're handled by different scripts or not.

Edit: Apparently it's the same script. From script_patches.cpp:

// Add support for simultaneous speech & subtitles to the in-game UI.
// The original game code has code paths for lo-res mode but only creates the
// buttons in hi-res mode, so the lo-res code paths are removed to gain more
// space for the patch.
// Applies to: English CD
// Responsible method: iconText::init, iconText::select
static const uint16 pq4CdSpeechAndSubtitlesSignature[] = {
Last edited 3 years ago by eriktorbjorn (previous) (diff)

comment:4 by gabberhead, 3 years ago

Last edited 3 years ago by gabberhead (previous) (diff)

comment:5 by gabberhead, 3 years ago

@eriktorbjorn

It's the same behavior in the german Version and scummvm 2.1.2. The Option is only available in high Resolution. But it's not possible to activate or deactivate speech or subtitles from games options ui.
But with scummvm official Version 2.2.0 and in the daily builds, the game crashes when i try to enter the options in high resolution. In low resolutions there is no crash and also the option to activate or deactivate speech and subtitles is not visible.

comment:6 by sev-, 3 years ago

Priority: highnormal

comment:7 by bluegr, 3 years ago

Owner: set to bluegr
Resolution: pending
Status: newclosed

Should be fixed in df062c6baadfd9e6b01c80ec974a53538dac17f3:
https://github.com/scummvm/scummvm/commit/df062c6baadfd9e6b01c80ec974a53538dac17f3

The fix will be available in the next daily version. Could you please test if the menu is working correctly for your version?

comment:8 by bluegr, 3 years ago

Resolution: pendingfixed
Status: closedpending

comment:9 by gabberhead, 3 years ago

Owner: changed from bluegr to gabberhead
Status: pendingclosed

it works again. tested with the newest daily build. thanx.

comment:10 by bluegr, 3 years ago

Owner: changed from gabberhead to bluegr

Thanks!

Note: See TracTickets for help on using tickets.