Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#15269 closed defect (invalid)

Leisure Suit Larry 5 copy protection screen broken in ScummVM 2.8.1

Reported by: miracleflame Owned by: sluicebox
Priority: normal Component: Engine: SCI
Version: Keywords:
Cc: miracleflame Game: Leisure Suit Larry 5

Description

Pressing the copy protection buttons on AeroDork ATM crashes the game with:
ERROR:[lsl5-1-1.000 258/20 btn6::handleEvent @ 07ba]:
parameter 0: 0000:093b (integer), should be reference
parameter 1: 0000:0014 (integer), should be null, integer, reference
parameter 2: 0000:0005 (integer), may be any (optional) (more may follow)
parameter 3: 0000:0008 (integer)
[VM] kFormat[48]: signature mismatch!

Language of game: Any
Version of game: Floppy v1.000
OS: Windows 10 64-bit 22H2

Bug is not present in ScummVM version bundled with the game release on Steam and GOG.
Attaching saves.

Attachments (1)

lsl5sg.zip (18.2 KB ) - added by miracleflame 2 months ago.

Download all attachments as: .zip

Change History (7)

by miracleflame, 2 months ago

Attachment: lsl5sg.zip added

comment:1 by eriktorbjorn, 2 months ago

I couldn't reproduce this with the development version of ScummVM, though I'm not 100% sure if I have the exact same version. The about dialog says "Version 1.000 09/11/91", though.

comment:2 by sluicebox, 2 months ago

The attached save isn't a a ScummVM save, it's from the DOS interpreter. It contains translated strings, so I assume it is from the mod you're working on.

From the game scripts, I don't think this error is possible. Is this an error from the mod you're working on? (In which case, it's probably not going to be a ScummVM bug.)

comment:3 by m-kiewitz, 2 months ago

Parameter 0 should be a reference, but isn't.
This would have to be a script bug, but then it would have been caught ages ago.

comment:4 by sluicebox, 2 months ago

Owner: set to sluicebox
Resolution: invalid
Status: newclosed

This is a SCI Companion compiler bug, not a ScummVM bug.

This error does not occur when running the real game, it occurred when running a recompiled script. If a ScummVM save were attached, we would have seen this because we wouldn't have been able to load it. You were probably just confused over which game directory you were pointed at; that happens to me all the time. Otherwise, "error occurs in a mod I'm making" is the kind of info you want to include in a ticket =)

SCI Companion's decompiler produced a script that its compiler doesn't accurately compile. That's script 20. The decompiler produced the btn6 object definition without a keyStr property definition. That part is correct; property values are inherited from their superclass by default, and in this case both share the same string "x". But Companion's compiler does not handle that correctly; it omits the relocation table entry for btn6:keyStr. The relocation is what makes the difference between an integer and a pointer (reference). Without it, the offset to the string "x" is treated as just an integer. That's exactly what the ScummVM error reports, that the first kFormat parameter is an integer instead of a reference.

comment:6 by m-kiewitz, 2 months ago

lol, this was unexpected @sluicebox

Note: See TracTickets for help on using tickets.