Opened 5 years ago

Closed 5 years ago

#10800 closed defect (fixed)

[Pink] "Pink Panther: Passport to Peril" crashes

Reported by: rtentser Owned by: whiterandrek
Priority: normal Component: Engine: Pink
Version: Keywords:
Cc: Game: Pink Panther: Passport to Peril

Description

When Pink look under the bed in six house (first from right) after he's returned frop Egypt, the game crashes with this output:

WARNING: SDL mixer output buffer size: 512 differs from desired: 1024!
User picked target 'peril' (gameid 'peril')...

Looking for a plugin supporting this gameid... Pink Panther Engine
Starting 'The Pink Panther: Passport to Peril'

WARNING: Could not find classicmacfonts.dat. Falling back to built-in fonts!
scummvm: engines/pink/objects/actions/action_play.cpp:67: virtual void Pink::ActionPlay::onStart(): Assertion `_startFrame < _decoder.getFrameCount()' failed.
Aborted

Attachments (1)

peril.s00 (22.2 KB ) - added by rtentser 5 years ago.
Save before the crash

Download all attachments as: .zip

Change History (14)

by rtentser, 5 years ago

Attachment: peril.s00 added

Save before the crash

comment:1 by rtentser, 5 years ago

Forgot to say: i use the last git version (502280f26d0a6d49fd49bf45f90635d7194cd755).

Last edited 5 years ago by rtentser (previous) (diff)

comment:2 by digitall, 5 years ago

Replicated here with latest git master under Linux x86_64.

Running scummvm -d 6 --debugflags=actions or use the debug console ie. CTRL-d to enable these settings gives the following at the function with the assertion:
Actor Pink has now ActionPlay CheckUnderBedHoldDB
cummvm: engines/pink/objects/actions/action_play.cpp:67: virtual void Pink::ActionPlay::onStart(): Assertion `_startFrame < _decoder.getFrameCount()' failed.

comment:3 by digitall, 5 years ago

The following patch fixes the issue based on the superclass of ActionPlay's onStart method:

diff --git a/engines/pink/objects/actions/action_play.cpp b/engines/pink/objects/actions/action_play.cpp
index fb4f05f0cb..9551f13424 100644
--- a/engines/pink/objects/actions/action_play.cpp
+++ b/engines/pink/objects/actions/action_play.cpp
@@ -64,7 +64,10 @@ void ActionPlay::onStart() {
        int frameCount = _decoder.getFrameCount();
        if (_stopFrame == -1 || _stopFrame >= frameCount)
                _stopFrame = frameCount - 1;
-       assert(_startFrame < _decoder.getFrameCount());
+
+       if (_startFrame >= _decoder.getFrameCount())
+               _startFrame = 0;
+
        ActionCEL::setFrame(_startFrame);
        // doesn't need to decode startFrame here. Update method will decode
 }

However, Pink then puts the hamburger back several times i.e. probably an error in the value of _endFrame. Not sure if this is the right solution and/or whether the repeated loop is due to a different latent issue which was hidden by this not working.

comment:4 by digitall, 5 years ago

Owner: set to whiterandrek

@whiterandrek: Any ideas?

comment:5 by whiterandrek, 5 years ago

Sequence CheckUnderBedDB

Items:

SequenceItemLeader: _actor=Pink, _action=AtMidR
SequenceItemLeader: _actor=Pink, _action=CheckUnderBedDB
SequenceItemLeader: _actor=Pink, _action=CheckUnderBedHoldDB
SequenceItemLeader: _actor=Pink, _action=CheckUnderBedHoldDB
SequenceItemLeader: _actor=Pink, _action=CheckUnderBedHoldDB
SequenceItemLeader: _actor=Pink, _action=CheckUnderBedHoldDB

SequenceItemLeader: _actor=Pink, _action=CheckUnderBedDB2
SequenceItemLeader: _actor=Pink, _action=AtMidR

It's looped because of wrong scripts. The action CheckUnderBedHoldDB is repeated 4 times.

@digitall: You can push changes.

comment:6 by digitall, 5 years ago

Keywords: original added

OK. Pushed patch as commit 3f99c2c9dd8f92c8f8925f5824c6f69fe7c2305f.

@whiterandrek: I assume you meant that this was a script bug present in the original. Could you patch this in the engine with a workaround to fix this script issue?

comment:7 by digitall, 5 years ago

Game: Pink Panther: Passport to Peril

comment:8 by digitall, 5 years ago

Resolution: fixed
Status: newpending

comment:9 by digitall, 5 years ago

(Pending on possible script fix for repeated animation)...

comment:10 by whiterandrek, 5 years ago

I have checked the original game and it hasn't such issue. Need more time to find out why the scripts are wrong in ScummVM engine.

comment:11 by digitall, 5 years ago

Keywords: original removed

@whiterandrek: No problem. Have removed original keyword. Will await your investigation and fix :)

comment:12 by whiterandrek, 5 years ago

In 07b4495:

PINK: fixed ActionPlay behavior when startFrame is wrong

This fixes Trac bug #10800

comment:13 by whiterandrek, 5 years ago

Status: pendingclosed
Note: See TracTickets for help on using tickets.