We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 374

Summary: No error message, when timidity.cfg doesn't exist
Product: SDL_mixer Reporter: Pascal Sclafer <pascal>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86   
OS: Linux   

Description Pascal Sclafer 2006-12-19 00:11:35 UTC
Version: SDL_mixer-1.2.7 SDL-1.2.11
Distribution: Slackware 11.0

Load a midi file using Mix_LoadMUS_RW().
If timidity.cfg cannot be found, the function returns NULL. That's right.
But after that, Mix_GetError() returns an empty string. It should return a more explicit message...

If you use Mis_LoadMUS() instead of Mix_LoadMUS_RW(), then Mix_GetError() returns the expected message. The bug is only present when you use Mix_LoadMUS_RW().

That can be illustrated using playmus:

pascal@portable_pascal:/# playmus /tmp/test.mid
Opened audio at 22050 Hz 16 bit stereo (LE), 4096 bytes audio buffer
Couldn't load /tmp/test.mid: /etc/timidity/timidity.cfg: No such file or directory

pascal@portable_pascal:/# playmus -rwops /tmp/test.mid 
Opened audio at 22050 Hz 16 bit stereo (LE), 4096 bytes audio buffer
Couldn't load /tmp/test.mid:

In the second example, an emty string is returned instead of the right error message.


P.S: Sorry for my bad english.
Comment 1 Patrice Mandin 2006-12-19 14:43:05 UTC
Fixed in svn, revision 2927