Opened 18 years ago
Closed 16 years ago
#2678 closed defect (fixed)
KYRA1: Crash on exceeded polyphony
Reported by: | SF/noizert | Owned by: | lordhoto |
---|---|---|---|
Priority: | normal | Component: | Engine: Kyra |
Version: | Keywords: | ||
Cc: | Game: | Kyrandia 1 |
Description
When changing rooms from pool of sorrow to dark forrest (both sides) I often get: WARNING: MidiParser::hangingNote(): Exceeded polyphony! Wich sometimes crashes ScummVM.
Using Jun 14 17:52 build. With mp3 compressed emc files and cm-32l emulation enabled on Win x64.
Ticket imported from: #1506583. Ticket imported from: bugs/2678.
Change History (24)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
A little question what is cm-32l emulation and how did you compress the script files with mp3 (or did you mean the .VRM files instead of .EMC)?
comment:3 by , 18 years ago
Component: | → Engine: Kyra |
---|---|
Game: | → Kyrandia 1 |
comment:4 by , 18 years ago
Summary: | kyrandia: crash on exceeded polyphony → KYRA1: Crash on exceeded polyphony |
---|
comment:5 by , 18 years ago
Meant .vrm yes. CM-32L is the follow up for the MT-32. ScummVM supports it roms for quite a while now via munt. Check out http://vogons.zetafleet.com for more info.
comment:6 by , 18 years ago
Ok I tried today, I couldn't reproduce it with my (real) MT-32 (with Linux/ALSA), I also didn't got any warnings like that. I guess it's not kyra what crashes ScummVM but the MT-32 emulator, try to use a native MIDI output on your system and check if you can still confirm the described behaviour.
comment:7 by , 18 years ago
When using Windows MIDI I get the following messages whenever changing rooms:
WARNING: MM System Error 'There is not enough memory available for this task. Q uit one or more applications to increase available memory, and then try again.'!
Again on the same location I get MidiParser::hangingNote(): Exceeded polyphony! and the message written above.
Which now doesn't result in a crash, but garbled MIDI music for a second. Then the music continues playing.
I'm using the standard Windows MIDI Synth.
comment:8 by , 18 years ago
Ok I think we can safly say here that it's a XMIDI parser and maybe (C)MT-32(l) emulation problem. I won't have time to look at this before the 0.9.0 release but since I'll work on fixing MT-32 specific problems in the nearer future I'll try to look at the problems with the XMIDI parser too. (Whoever is in charge of the MT-32 emulator please take a look at the specific problems with it).
comment:9 by , 18 years ago
Owner: | set to |
---|
comment:10 by , 18 years ago
Kingguppy who did a lot of work for mt32/cm32l emulation seems to have resided his work, although I can not say this for sure. A today's post of canadacow, the orignal developer of mt32 emulator, posted some good news today: http://vogons.zetafleet.com/viewtopic.php?t=12448 Maybe it's wise to enlighten him about problems with the emulator.
comment:11 by , 18 years ago
I've had this happen at startup a couple of times now with the ALSA driver. For whatever reason, MidiParser::onTimer() is parsing a bunch of MIDI events telling it to hang notes.
Perhaps there's a threading issue? I noticed some engines use a mutex in combination with the MIDI parser. I'm not familiar enough with the problems involved.
comment:12 by , 18 years ago
I commited a possible fix today, could you try again? Since I was never able to reproduce this. So if it's gone I'll close this.
comment:13 by , 18 years ago
Status: | new → pending |
---|
comment:14 by , 18 years ago
I just got the "exceeded polyphony" warning from the Kyra 2 intro (using MIDI music). There was a very short cacophony of notes, and I don't think I actually heard it play the tune it was supposed to.
How's this for a wild guess? Perhaps it thought - for whatever perverted reason - that it was really behind on processing MIDI events, and that it had to handle them all at once just to catch up?
But why would it do that? Uninitialized variable? Memory corruption? Something else?
comment:15 by , 18 years ago
Status: | pending → new |
---|
comment:17 by , 18 years ago
Status: | new → pending |
---|
comment:18 by , 18 years ago
Status: | pending → new |
---|
comment:21 by , 17 years ago
Still happens from time to time, someone with more knowledge of MIDI and threading would have to rewrite the MIDI player code. Together with this bug #1497961 "KYRA1: music/sfx volume settings not working" could be fixed, also MT-32 initializing code could be added.
comment:22 by , 17 years ago
ScummVM 0.12.0svn (Mar 12 2008 19:33:29) Features compiled in: Vorbis FLAC MP3 zLib MPEG2
I got the exact same behaviour as the OP while wandering Serpent's Grotto except it didn't crash, it just shut down MIDI playback (background music - effects were still working) until i loaded a saved game. (which brought back MIDI background music)
Same behaviour as eriktorbjoern posted: "There was a very short cacophony of notes"
comment:23 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:24 by , 16 years ago
I just recently played through Kyrandia 1 German with MIDI (to be precise MT-32) and didn't encounter anything like that anymore, so I must have been fixed by my MIDI changes to KYRA before 0.13.0.
MIDI music is known to not work right in The Legend of Kyrandia, though this particular problem was new to me. I haven't been able to reproduce it myself.
Adlib music should be well supported, however, and sounds surprisingly good.