More on the segfault with DGA & SDL_DOUBLEBUF set. I just recompiled
the 1.2.2 libs for debugging at the segfault’s occuring in the SDL
function DGA_IsSurfaceBusy(). Here’s a stack trace from gdb:
mazer % sudo env SDL_VIDEODRIVER=dga DISPLAY=:0.1 gdb ./dbuf
GNU gdb 5.0rh-5 Red Hat Linux 7.1
(gdb) run
Starting program: /auto/k1/mazer/pype/pype/src/bugtest/./dbuf
[New Thread 1024 (LWP 21610)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 21610)]
DGA_FlipHWSurface (this=0x8049960, surface=0x804b0b0) at SDL_dgavideo.c:641
641 return ((vidmem_bucket *)surface->hwdata)->dirty;
(gdb) where
#0 DGA_FlipHWSurface (this=0x8049960, surface=0x804b0b0) at SDL_dgavideo.c:641
#1 0x40063c4f in DGA_SetVideoMode (this=0x8049960, current=0x804b0b0,
width=1024, height=768, bpp=32, flags=3221225473) at SDL_dgavideo.c:534
#2 0x40056d6c in SDL_SetVideoMode (width=1024, height=768, bpp=32,
flags=3221225473) at SDL_video.c:608
#3 0x08048735 in sdl_open (w=1024, h=768, bpp=32, flags=3221225472)
at dbuf.c:12
#4 0x08048758 in main () at dbuf.c:18
#5 0x401d8177 in __libc_start_main (main=0x804873c , argc=1,
ubp_av=0xbffff47c, init=0x8048524 <_init>, fini=0x80487b0 <_fini>,
rtld_fini=0x4000e184 <_dl_fini>, stack_end=0xbffff46c)
at …/sysdeps/generic/libc-start.c:129
(gdb) print surface
$1 = (SDL_Surface *) 0x0
Something’s funny here, but I can’t seems to quite get a handle
on what. This was working upgrading to 7.1 My original message
is below (I’m not 100% sure it got through to the list).
/jamie
@James_Mazer writes:> Hi,
I just ungraded from redhat 6.2 -> 7.1 and found calling SDL_Init()
with SDL_DOUBLEBUF set for the dga driver gets me a core dump (see
minimal prog at end of message).If I run the test program:
mazer% sudo env DISPLAY=:0.1 SDL_VIDEODRIVER=x11 ./dbuf
It works fine, but gets a segfault:
mazer% sudo env DISPLAY=:0.1 SDL_VIDEODRIVER=dga ./dbuf
Fatal signal: Segmentation Fault (SDL Parachute Deployed)Anybody else seen this behavior? The Xserver is XFree86 4.0.1
from the redhat 4.0.1 rpm files on the 7.1 CD. DOUBLE-BUFFER
and XFree86-DGA extentions are both available. It’s a current
version of SDL off the ftp site:
mazer% rpm -qa | grep SDL
SDL_mixer-devel-1.2.0-1
SDL_image-devel-1.2.0-1
SDL_ttf-devel-2.0.3-1
SDL_ttf-2.0.3-1
SDL-devel-1.2.2-1
SDL_image-1.2.0-1
SDL-1.2.2-1
SDL_mixer-1.2.0-1Any ideas?? Anything? Does this mean I’ve got to go back to 6.2
/jamie
----------------- cut here for dbuf.c --------------------
#include <stdio.h>
#include <SDL/SDL.h>sdl_open(int w, int h, int bpp, Uint32 flags)
{
/* Initialize the SDL library */
if (SDL_Init(SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr,
“Couldn’t initialize SDL: %s\n”, SDL_GetError());
return(NULL);
}
SDL_SetVideoMode(w, h, bpp, flags);
}main()
{
sdl_open(1024, 768, 32, SDL_DOUBLEBUF|SDL_FULLSCREEN);
SDL_Quit();
}–
office: 510-643-3573 mail: 3210 Tolman Hall #1650
lab: 510-642-1950 U.C. Berkeley
fax: 801-697-4179 Berkeley, CA 94720-1650
email: @James_Mazer
–
office: 510-643-3573 mail: 3210 Tolman Hall #1650
lab: 510-642-1950 U.C. Berkeley
fax: 801-697-4179 Berkeley, CA 94720-1650
email: @James_Mazer