Segv on second SMPEG_new()

hi all,

I’ve run up against a problem with SMPEG_new where the
second call to it results in a SEGV and subsequent
SDL Parachute deploy.

The first time through the mpeg plays successfully and
then SMPEG_delete() is called. On the second iteration,
SMPEG_new() is called and a SEGV occurs in that function
call.

I have confirmed that the file being loaded second is
valid and playable. The same occurs if I load the same
file twice.

Interestingly, if I call SMPEG_new() with sdl_audio=0, then
the SEGV is avoided, but the first movie doesn’t play
properly (~20x slowdown), and subsequent movies don’t
play at all.

Any ideas?-----------------------------------------------------
versions:

smpeg-0.4.4-9
SDL-1.2.3-7
glibc-2.2.5-34

platform:

Red Hat Linux 7.3, using XFree86 4.2.0-8

simplified code follows:
SetVideo();

for (count=0; count < NumberOfMovies;count++) {
SelectNewMovie(filename);
mpeg = SMPEG_new(filename, &info, 1);
SMPEG_setdisplay(mpeg, screen, NULL, update);
SMPEG_move(mpeg, 100, 100);
SMPEG_scaleXY(mpeg, info.width, info.height);
SMPEG_play(mpeg);
while (!done &&(pause || (SMPEG_status(mpeg) == SMPEG_PLAYING))){
done = HandleEvent(mpeg, &pause);
SDL_Delay(1000/2);
}
SMPEG_delete(mpeg);
}


G. Richard Keech Chief Instructor
Red Hat Asia-Pacific rkeech at redhat.com, richard at keech.cx
Melbourne Australia http://people.redhat.com/rkeech
+61-419-036-463 mobile +61-3-9370-5611 fax
Legal: http://apac.redhat.com/disclaimer

I’ve run up against a problem with SMPEG_new where the
second call to it results in a SEGV and subsequent
SDL Parachute deploy.

Can you send me a stack dump? Run the program under gdb, and after it
crashes, type “bt” and send me the output.

–ryan.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 16104)]
0x4009e750 in ?? ()
(gdb) bt
#0 0x4009e750 in ?? ()
#1 0x400216c3 in SDL_AudioInit (driver_name=0x0) at SDL_audio.c:292
#2 0x40020671 in SDL_InitSubSystem (flags=16) at SDL.c:87
#3 0x4002179a in SDL_OpenAudio (desired=0xbffff3a0,
obtained=0xbffff380)
at SDL_audio.c:332
#4 0x401d0892 in MPEGaudio::MPEGaudio () from
/usr/lib/libsmpeg-0.4.so.0
Cannot access memory at address 0x1On Sun, 2002-05-26 at 21:41, Ryan C. Gordon wrote:

I’ve run up against a problem with SMPEG_new where the
second call to it results in a SEGV and subsequent
SDL Parachute deploy.

Can you send me a stack dump? Run the program under gdb, and after it
crashes, type “bt” and send me the output.

–ryan.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

G. Richard Keech Chief Instructor
Red Hat Asia-Pacific rkeech at redhat.com, richard at keech.cx
Melbourne Australia http://people.redhat.com/rkeech
+61-419-036-463 mobile +61-3-9370-5611 fax
Legal: http://apac.redhat.com/disclaimer