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 246

Summary: SDL_mixer 1.2.7 crashes when loading a .ogg file as music
Product: SDL_mixer Reporter: Sebastian Beschke <s.beschke>
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86   
OS: Windows (XP)   

Description Sebastian Beschke 2006-06-07 17:05:42 UTC
Using the prebuilt SDL_mixer DLLs, SDL_mixer 1.2.7 crashes with an access violation upon trying to load an OGG Vorbis file using Mix_LoadMUS().

Here's a small sample program:



#include <stdio.h>
#include "SDL.h"
#include "SDL_mixer.h"

int main(int argc, char* argv[])
{  
   fprintf(stderr, "SDL_Init(SDL_INIT_AUDIO);\n");
   SDL_Init(SDL_INIT_AUDIO);
   
   fprintf(stderr, "Mix_OpenAudio\n");
   if(Mix_OpenAudio(22050, AUDIO_S16SYS, 2, 4096)) {
      fprintf(stderr, "OpenAudio failed: %s\n", Mix_GetError());
      exit(1);
   }

   
   fprintf(stderr, "Mix_LoadMUS()\n");
   Mix_Music* music = Mix_LoadMUS("music.ogg");
   if(!music) {
      fprintf(stderr, "Could not load music.ogg: %s\n", Mix_GetError());
      exit(1);
   }
   
   fprintf(stderr, "Mix_FreeMusic()\n");
   Mix_FreeMusic(music);
   
   Mix_CloseAudio();
   
   SDL_Quit();
   
   return 0; 
}
Comment 1 Ryan C. Gordon 2006-06-25 15:52:44 UTC
This is working on Linux (and Valgrind doesn't smell anything fishy)...perhaps we fixed it? A broken ogg? Perhaps it's a Windows-specific thing or a misbuilt library?

Tossing it to Sam.

--ryan.

Comment 2 Sebastian Beschke 2006-06-25 16:54:30 UTC
The OGG file I used was fine; the problem occured for me on Windows XP and has been reproduced by several people (using the pre-built DLLs).
Sebastian
Comment 3 Sam Lantinga 2006-06-25 17:28:04 UTC
I can reproduce the problem as well, I'm looking into it.
Comment 4 Sam Lantinga 2006-06-26 13:43:02 UTC
This was caused by a C runtime mismatch.  This is fixed in subversion, and you can get the updated 1.2.7 files here:
http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.7-win32.zip