#8054 closed patch
Windows MMSYSTEM error reclassification
Reported by: | SF/jamieson630 | Owned by: | SF/ender |
---|---|---|---|
Priority: | normal | Component: | Port: Win32 |
Version: | Keywords: | ||
Cc: | Game: |
Description
When running under the -ewindows option, SCUMMVM preiodically fills up the Windows MMSYSTEM MIDI stream buffer, resulting in the following error:
"MMSYSTEM067 The port is transmitting data to the device. Wait until the data has been transmitted, and then try again."
This problem was observed in DOTT, occurring several times during the Chron-o-John "hyperspace" sequence toward the beginning of the game.
This is treated as a fatal error by SCUMMVM, resulting in an immediate program termination. In fact, this is a non-fatal error, as are probably all MMSYSTEM errors. (In other words, SCUMMVM will not become crash or become unstable if it continues to execute beyond an error generated by MMSYSTEM.)
Buffer fills seem to occur in areas where a lot of jumps between music resources take place, and frequent part changes means that the occasional drop of a MIDI message does not noticeably influence the resulting audio.
This patch issues warning() calls for MMSYSTEM errors rather than error() calls, thus allowing games running under the -ewindows option to still be playable without unnecessary bailouts.
There's also an indent correction to a function prototype, just because it was getting on my nerves. ;-)
Ticket imported from: #610257. Ticket imported from: patches/159.
Attachments (1)
Change History (6)
by , 22 years ago
Attachment: | mididrv.diff added |
---|
comment:1 by , 22 years ago
is this the cause for my bug report: "#601926 DOTT: random crashes in the 2. cutscene" ?
comment:2 by , 22 years ago
It may very well be. Calling the error() function causes an immediate program bailout. Reference my notes in Patch #610251, in which I describe how error() tries to bail out without properly shutting down the SDL subsystems. The result that additional code gets called on a timer before the program exits, and pointers to now non-existant resources get referenced. Bada boom.
When debugging under Visual C++ with full browse information for SCUMMVM and SDL (I had to rebuild SDL to get this), I discovered first-chance exceptions cropping up anywhere from various spots in SCUMMVM (most often in the scaling module, in my experiences) to a wide array of various functions within SDL.DLL.
HOWEVER, you should observe an easily readable error message being generated before this happens. You didn't mention whether you get a SCUMMVM error message before the crash. If you don't, then what you are observing may be due to something else (although still related to my notes in Patch #610251, where I mentioned that there are 33 other locations in SCUMMVM where inappropriate bailouts are coded).
If you can verify a Windows MMSYSTEM error being reported just before the crash, we should make a note of this patch and 610251 on that bug's thread.
comment:3 by , 22 years ago
Applied, thanks :)
If that DOTT error ends up being related, let me know.
I'll be fixing all the exit(1) calls shortly.
comment:4 by , 22 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:5 by , 6 years ago
Component: | → Port: Win32 |
---|
Patch against mididrv.cpp 1.4 revision