| Summary: | Mix_LoadMUS() sometimes fails to return NULL on error in Timidity | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | Ralph Versteegen <teeemcee> |
| Component: | misc | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | unspecified | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
Timidity_LoadSong calls load_missing_instruments calls fillbank calls load_instrument, which eventually calls SDL_RWFromFile which calls SDL_SetError. load_missing_instruments counts the number of errors (generally, instruments which couldn't be loaded) and returns this count to Timidity_LoadSong, which ignores it. On some more thought, ignoring missing instrument errors is probably intentional, and it's probably too much bother to make Timidity_LoadSong fail if all the instruments failed to load. What do you think, WONTFIX? (In reply to Ralph Versteegen from comment #1) > ignoring missing instrument errors is probably > intentional, and it's probably too much bother to make Timidity_LoadSong > fail if all the instruments failed to load. What do you think, WONTFIX? This looks like a WONTFIX to me. |
Mix_LoadMUS() sometimes fails to return NULL even when there's an error in the Timidity backend. I was missing a "dir" path in timidity.cfg so MIDI didn't play, but Mix_LoadMUS returned non-NULL although Mix_GetError() returns "Couldn't open /etc/timidity/instruments/bagpipes.pat". Also, using SDL_SetHint("SDL_MIXER_DEBUG_MUSIC_INTERFACES", "1"), only "Loaded music with TIMIDITY" was printed. On the other hand with other timidity.cfg problems like a bad "source" path, Mix_LoadMUS returns NULL, Mix_GetError returns "Couldn't open timidity.cfg", and the DEBUG_MUSIC_INTERFACES hint prints "Couldn't open TIMIDITY: Couldn't open timidity.cfg" Present in latest hg revision.