[Scummvm-devel] MT-32 option causing crashes / silent exits in 1.3.0

Max Horn max at quendi.de
Sun Jun 5 11:27:21 CEST 2011


As a follow up, some more thoughts:


I just did a quick test; if I run
  ./scummvm -emt32 monkey2
ScummVM works for me (I have everything set up right). If I remove the MT-32 control ROMs, though, I get an error on the console, but otherwise ScummVM exits silently. Bad. The funny thing is, the MT-32 emu even tries hard to paint an error message into the window, but since it bails out immediately, this is no good.

This suggests two changes: First, we should modify the MT-32 emu to return an error code instead of calling error(), if it fails to instantiate. So that can fall back to another MIDI driver or at least show a nice error dialog.

Second, error() is quite annoying if there is no debugger console setup. I.e. if no game is running resp. if the game is starting and so has not yet setup an error console. This ties in with the other recent discussion about logs and how to report errors. We should do something about this. Several ways come to mind:

a) While no console has been setup, we should install an error handler that shows a GUI dialog with the error text. Of course that can only be done if at least the GUI has been setup correctly, so it can't be used for errors very early in the startup process. It may also be problematic if out-of-memory was the error cause.

b) Alternatively, we ensure that there is always an active console instance. This would require some changes to the console code, but might be useful in general, too. So, we would further separate the code that handles console commands from the presentation code.

c) We add an OSystem API displayAlert() or so, which tries to use OS functionality to show the error dialog. At least on desktop systems, and most phones, I would imagine that works well. For consoles, e.g. NDS, it could just paint the text into the screen surface, like the MT-32 emu does right now.




Bye,
Max



More information about the Scummvm-devel mailing list