Opened 6 years ago
Closed 6 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)
Change History (14)
by , 6 years ago
comment:1 by , 6 years ago
Forgot to say: i use the last git version (502280f26d0a6d49fd49bf45f90635d7194cd755).
comment:2 by , 6 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 , 6 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:5 by , 6 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 , 6 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 , 6 years ago
Game: | → Pink Panther: Passport to Peril |
---|
comment:8 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → pending |
comment:10 by , 6 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 , 6 years ago
Keywords: | original removed |
---|
@whiterandrek: No problem. Have removed original keyword. Will await your investigation and fix :)
comment:13 by , 6 years ago
Status: | pending → closed |
---|
Save before the crash