Installing the sound drivers for all of the 16 MIDI mapper channels will usually solve the problem. Alternatively, you can edit the MIDI file to direct the output from a channel without a sound driver, to one of the channels which does have a sound driver installed. This requires a good midi editing program like Cakewalk, or similar software. If your hardware has been left in an improper state by previous midi files, you need to reset your hardware by playing a midi file having a system reset command, or re-powering you system. The symptom I personally encounter is that the file won't load into the playback program.
Error messages vary.
As yet, I know of no easy fix. Usually, the file must be edited using a good midi editing software program, such as Cakewalk, to remove the offending commands.