Opened 22 years ago

Closed 22 years ago

#192 closed defect (fixed)

Monkey1 crash when mp3 stops playing

Reported by: SF/logicdeluxe Owned by: SF/bbrox
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Monkey Island 1

Description

Built on Apr 26 2002 13:06:42 win Whenever a mp3 track has finished playing the game crashes. This happens after the into credits or when I hit ESC there. If I remove track17.mp3 it crashes after the chapter screen etc. The music sounds well so far. The game runs fine without mp3. (with and without CD audio)

Detected game 'Monkey Island 1', version 5.2.2 Loading room 0 Loading room 10 WARNING: Requesting audio track: 110! Update area 7467 pixels. 12% Update area 7403 pixels. 12% Update area 7403 pixels. 12% Update area 7403 pixels. 12% Update area 7403 pixels. 12% Loading room 0 Fatal signal: Segmentation Fault (SDL Parachute Deployed)

Ticket imported from: #549000. Ticket imported from: bugs/192.

Change History (22)

comment:1 by SF/bbrox, 22 years ago

Have you the possibility to debug it under Windows and to post a backtrace at the moment of the crash ?

I will try to look at it on my side, but as I do not have the game nor the MP3 tracks, it could prove difficult :-)

comment:2 by SF/bbrox, 22 years ago

Owner: set to SF/bbrox

comment:3 by SF/logicdeluxe, 22 years ago

Unfortunetely, there is no debug window popping up nor any debug messages are printed in the command line window. Maybe it is the same problem as the reported Loom mp3 bug since that also appear to me.

comment:4 by SF/bbrox, 22 years ago

Could you try with the latest CVS ? I fixed one memory overwrite problem in it (there seems to be still some lying around) and it could fix your problem.

Will go on rewriting this rather uncomprehensible code :-)

comment:5 by SF/urkle, 22 years ago

The latest CVS (as of 14:25 CDT, 5 minutes ago :)) seems to have fixed this mp3 crash bug. I'm running on Linux/SDL.

comment:6 by SF/bbrox, 22 years ago

Please could you stress the code with my latest commits (2002/04/26 at 22:54 CEST) ?

At least on my box it runs now fine and Valgrind does not report any memory corruption errors.

comment:7 by SF/urkle, 22 years ago

well there's something REALLY weird going on now.. I walked into the SCUMM bar and I got a mix of music offset by a little.. (echo....) and then I walk out and I hear the seashore music and every so ofter the SCUMM bar music bleads in.... mixer.cpp CVS version is 1.14

comment:8 by SF/bbrox, 22 years ago

Or, bug is found... Now I need to discuss more with ludde to see how to fix it properly (ie I could fix it but it may break Simon support).

comment:9 by SF/bbrox, 22 years ago

Let's hope that I did not screw again :-) Please could you re-do a CVS update and test the code ? It should now work (yeah I know, it's the third time I say that :-) ).

comment:10 by SF/logicdeluxe, 22 years ago

Built on Apr 27 2002 17:44:51 At least the game does not crash anymore. But now, the music doesn't stop playing at all as long as no other track starts. For example go to the Melee map overview and then back to the out look point. The music from the map overview is still playing then. The same applies for pause mode and the savegame menu.

comment:11 by SF/logicdeluxe, 22 years ago

Built on Apr 27 2002 17:44:51

Tracks restart playing even if they are already playing. For example in the Scumm Bar after talking to the pirates in the left screen.

When chasing the shop keeper the regular tracks are playing instead of the chasing theme (track3.mp3 should play).

Tracks do not restart at their ends. For example the Scumm Bar theme should play in an endless loop until you leave the bar.

comment:12 by SF/bbrox, 22 years ago

Just to be sure that I investigate the 'right' things, did you already have this behavious without my patches (ie when it was crashing often :-) ) or did you only find out about the problem now that ScummVM does not crash at the start. If it's the latter, I would almost prefer having a new bug filed so that I can close this 'crash' bug.

And does it work properly with the 'real' audio CD ?

By the way, if you want to have faster response time, there is #ScummVM on irc.openprojects.net. You can find me there using the nick BBrox (if I am at home :-) ).

Moreover, if you want me to debug a particular scene (like the shopkeeper chase), the best is to attach a save game.

comment:13 by SF/logicdeluxe, 22 years ago

This is the first time it works for me so far (more or less). Therefore I can not tell you if any of these bugs were there before. Note that the game was not crashing often, it was ALWAYS crashing.

I checked out these bugs for CD audio as well now:

Tracks are stopping when they should. => mp3 bug. (At least in the game. Although not in pause mode and savegame menu. Seems to be a different problem.)

Tracks don't restart while they are already playing. => mp3 bug.

The shopkeeper chase theme plays properly with CD audio. No regular themes during the chase => mp3 bug.

The looping issue. The CD plays up to the end instead of looping. After the mp3 track silence appears. => seems to be another bug.

The chapter screen appears until CD track 7 is played to the end. With mp3 the chapter screen only appears for quite a short moment and the game continoues without playing track6.mp3 to the end. => mp3 bug, I think.

(I'll just create own reports for the none mp3 related bugs.)

comment:14 by SF/bbrox, 22 years ago

Another question : is the sound also 'lagged' with the real CD ? For example in the intro screen, the music should 'change' at the same time the stars appear on the LucasArts logo or when the Monkey Island name appears on the screen.. With MP3 sound it's lagging about half a second.

So is this MP3 specific or is it also happening in the real-CD mode ?

Anyway, will look at the other problems :)

comment:15 by SF/logicdeluxe, 22 years ago

Even with my original EXE there are some latencies with CD audio. Therefor I don't think this is a Scummvm bug at all. The CD tracks itself seem to be a little inaccurate. Some of them start with a little silence.

If you want, you might try to remove 4/5 seconds at start of audio track 18 and add them right befor the 2nd music in the same track starts. It worked with perfect sync on a burned copy. But I did not check it with Scummvm. (Of course there might exist different versions of the game which got fixed this problem. I don't know of them.)

comment:16 by SF/bbrox, 22 years ago

OK, just comitted some code that should fix : - the 'parts' screen problem - the sound not stopping when it should

For the other problems, it would be nice to have a savegame just before the new music 'appears' (essentially for the shopkeeper chase).

I know that some things are still not implemented (and that the code is a little bit flaky in certain cases), but tell me what remains to be fixed :-)

comment:17 by SF/logicdeluxe, 22 years ago

Built on Apr 28 2002 19:20:18 All bugs remain completely unchanged. No stopping, no 'parts' screen waiting. Here is a shop keeper save game: http://www.gratissaugen.de/files/monkey.s09 To test the stopping problem just go back to the lookout point at start. The sea shore track should stop, but it doesn't.

comment:18 by SF/urkle, 22 years ago

It looks lagged when I play with CD audio as well.. by the same amount as with the mp3.. Though I haven't played monkey island on a good ol' dos system in a while to know exactly sure how it was synced up originally...

I'll have to find an ol' dos system to play it on a check it out...

comment:19 by SF/bbrox, 22 years ago

Strange, for me everything seems to work OK except for the repeat of the sound (for example, staying too long in the Scumm bar will stop the sound). Otherwise, with your save game, I get a music durin the chase 'scene' (except that music is definitely broken during game load).

There is just a little bug in the AdLib driver that generates noise when no music is playing.

Are you sure you did upgrade properly before re-compiling because that's the only thing I would see that explains this problem :-/

comment:20 by SF/logicdeluxe, 22 years ago

Built on Apr 29 2002 19:38:13 Now it works. It stops correctly, it doesn't restart unneccessary, the 'part' track is played to the end and the music doesn't change during the chase.

Even in the love scene track16.mp3 starts when track7.mp3 has played to the end.

comment:21 by SF/bbrox, 22 years ago

Resolution: fixed
Status: newclosed

comment:22 by SF/bbrox, 22 years ago

Well, as the CD and the MP3 status are the same, I will close this bug and continue working on the two other one (that are common to MP3 and real CD).

Note: See TracTickets for help on using tickets.