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 - No error message, when timidity.cfg doesn't exist
Summary: No error message, when timidity.cfg doesn't exist
Status: RESOLVED FIXED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-19 00:11 UTC by Pascal Sclafer
Modified: 2006-12-19 14:43 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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