Trouble using sdl_mixer and OGG files

I have seen this problem listed multiple times on the forum, but so far I do
not see an answer.

I have an OGG file that worked fine back with SDL_Mixer-1.2.5. With the
latest mixer I have a problem where it crashes in music_ogg.c at line 79:

0xC0000005: Access violation writing location 0x00000010

This is the code it crashes on:

	if ( vorbis.ov_open(fp, &music->vf, NULL, 0) < 0 ) {

The vorbis structure appears to be filled out with pointers to the various ogg
dll functions.

Since Mixer 1.2.5 used a lib and not a DLL I assume that this is related to
the problem. I can provide a sample OGG file to demonstrate this bug. I am
using Visual Studio 2003. I saw another post where the person had the same
error and they were using Visual Studio 2005.

  • Ken Rogoway
    Homebrew Software

I have seen this problem listed multiple times on the forum, but so far I do
not see an answer.

I have an OGG file that worked fine back with SDL_Mixer-1.2.5. With the
latest mixer I have a problem where it crashes in music_ogg.c at line 79:

0xC0000005: Access violation writing location 0x00000010

This is the code it crashes on:

	if ( vorbis.ov_open(fp, &music->vf, NULL, 0) < 0 ) {

The vorbis structure appears to be filled out with pointers to the various
ogg dll functions.

Since Mixer 1.2.5 used a lib and not a DLL I assume that this is related to
the problem. I can provide a sample OGG file to demonstrate this bug. I am
using Visual Studio 2003. I saw another post where the person had the same
error and they were using Visual Studio 2005.

I have attached a short OGG file that demonstrates this crash using
SDL-1.2.11 and SDL_Mixer-1.2.7. Build the PLAYMUS sample app that is
included with SDL_Mixer and you will see that it crashes with the above
error when trying to play this OGG file._______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.7/830 - Release Date: 6/3/2007
12:47 PM

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.9/834 - Release Date: 6/5/2007 2:38
PM

-------------- next part --------------
A non-text attachment was scrubbed…
Name: Bad.ogg
Type: application/ogg
Size: 10169 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070605/2f8277e3/attachment.ogx

I have seen this problem listed multiple times on the forum, but so far I
do not see an answer.

I have an OGG file that worked fine back with SDL_Mixer-1.2.5. With the
latest mixer I have a
problem where it crashes in music_ogg.c at line 79:

0xC0000005: Access violation writing location 0x00000010

This is the code it crashes on:

  if ( vorbis.ov_open(fp, &music->vf, NULL, 0) < 0 ) {

The vorbis structure appears to be filled out with pointers to the various
ogg dll functions.

Since Mixer 1.2.5 used a lib and not a DLL I assume that this is related to
the problem. I can
provide a sample OGG file to demonstrate this bug. I am using Visual
Studio 2003. I saw
another post where the person had the same error and they were using Visual
Studio 2005.

I have attached a short OGG file that demonstrates this crash using
SDL-1.2.11 and SDL_Mixer-1.2.7. Build the PLAYMUS sample app that is
included with SDL_Mixer
and you will see that it crashes with the above error when trying to play
this OGG file.

As I thought, switching back to SDL_Mixer-1.2.5 works fine. There appears
to be a bug in SDL_Mixer-1.2.7 (or else I am doing something incorrectly).

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.7/830 - Release Date: 6/3/2007
12:47 PM

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.9/834 - Release Date: 6/5/2007 2:38
PM

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.9/834 - Release Date: 6/5/2007 2:38
PM

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.9/834 - Release Date: 6/5/2007 2:38
PM

I have attached a short OGG file that demonstrates this crash using
SDL-1.2.11 and SDL_Mixer-1.2.7. Build the PLAYMUS sample app that is
included with SDL_Mixer
and you will see that it crashes with the above error when trying to play
this OGG file.

As I thought, switching back to SDL_Mixer-1.2.5 works fine. There appears
to be a bug in SDL_Mixer-1.2.7 (or else I am doing something incorrectly).

It works fine for me on Mac OS X. I’m guessing it’s a C runtime incompatibility on Windows. If you build both SDL_mixer and playmus from source, do you see the problem? If so, can you run it in the debugger and find out what’s going on?

See ya!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment

Behalf Of Sam Lantinga

I have attached a short OGG file that demonstrates this crash using
SDL-1.2.11 and SDL_Mixer-1.2.7. Build the PLAYMUS sample app that is
included with SDL_Mixer
and you will see that it crashes with the above error when trying to
play
this OGG file.

As I thought, switching back to SDL_Mixer-1.2.5 works fine. There
appears to be a bug in SDL_Mixer-1.2.7 (or else I am doing something
incorrectly).

It works fine for me on Mac OS X. I’m guessing it’s a C runtime
incompatibility on Windows. If you build both SDL_mixer and playmus from
source, do you see the problem? If so, can you run it in the debugger and
find out what’s going on?

See ya!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Yes, it happens if I build it from source under Windows using Visual Stuido
2003 or VS2005.

This is the code it crashes on:

  if ( vorbis.ov_open(fp, &music->vf, NULL, 0) < 0 ) {

The vorbis structure appears to be filled out with pointers to the various
ogg dll functions. The file point is a valid file pointer. In the actual
callback it appears to be crashing trying to do the fseek to the start of
the file. I will try changing the compile type from Multithreaded to single
threaded and see if it still crashes.

Ken Rogoway
Homebrew Software
http://www.homebrewsoftware.com/

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.11/838 - Release Date: 6/7/2007
2:21 PM

----- Original Message -----
From: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Sent: Friday, June 08, 2007 12:01 AM
To: A list for developers using the SDL library. (includes SDL-announce)
Subject: Re: [SDL] Trouble using sdl_mixer and OGG files

Yes, it happens if I build it from source under Windows using Visual Stuido
2003 or VS2005.

This is the code it crashes on:

  if ( vorbis.ov_open(fp, &music->vf, NULL, 0) < 0 ) {

The vorbis structure appears to be filled out with pointers to the various
ogg dll functions. The file point is a valid file pointer. In the actual
callback it appears to be crashing trying to do the fseek to the start of
the file. I will try changing the compile type from Multithreaded to single
threaded and see if it still crashes.

Any luck with that?

-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment