Caught Signal 11 with SDL via directfb

Hi All,

I am trying to use SDL with directfb for hardware acceleration and I’m
getting:
(!) [ 8336: 0.000] --> Caught signal 11 (at (nil), invalid address)
<–

I get this error when I’m trying to use Mplayer to play with -vo sdl
option or when I am trying to run testvidinfo.

I’ve downloaded the latest SDL sourcecode from the CVS, but the latest
patches doesn’t seem to solve this problem.

Below is the output from testvidinfo:

   ---------------------- DirectFB v0.9.20 ---------------------
         (c) 2000-2002  convergence integrated media GmbH  
         (c) 2002-2003  convergence GmbH-----------------------------------------------------------

() Single Application Core. (with MMX support) (2004-03-28 20:14)
(
) DirectFB/misc/memcpy: using MMXEXT optimized memcpy()
() DirectFB/InputDevice: IMPS/2 Mouse 0.9 (convergence integrated
media GmbH)
(
) DirectFB/InputDevice: Keyboard 0.9 (convergence integrated media
GmbH)
() MMX detected and enabled
(
) DirectFB/GraphicsDevice: VIA/S3G UniChrome 0.3 (-)
(*) DirectFB/Layer: Enabled ‘FBDev Primary Layer’.
Video driver: directfb
Current display: 16 bits-per-pixel
Red Mask = 0x0000f800
Green Mask = 0x000007e0
Blue Mask = 0x0000001f
Fullscreen video modes:
800x600x16
A window manager is available
Hardware surfaces are available (32768K video memory)
Copy blits between hardware surfaces are accelerated
Colorkey blits between hardware surfaces are accelerated
Alpha blits between hardware surfaces are accelerated
Color fills on hardware surfaces are accelerated
(!) [ 8350: 0.000] --> Caught signal 11 (at (nil), invalid address)
<–
Segmentation fault

------------- some other info

Epia 10000M (Nehemia)
Red Hat 9 (Kernel 2.4.25-epia2)
DirectFb 0.90
Mplayer 1.0pre3

Regards,
Anatoliy


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover

You need to set these env vars, so SDL knows what to use.

export SDL_VIDEODRIVER=directfb
export SDL_DIRECTFB_MGA_CRTC2=1
export SDL_DIRECTFB_MGA_STRETCH=1
export SDL_DIRECTFB_MGA_OVERSCAN=1

if you use the -vo dfbmga, it shouldn’t matter though

Anatoliy Ivkov wrote:>Hi All,

I am trying to use SDL with directfb for hardware acceleration and I’m
getting:
(!) [ 8336: 0.000] --> Caught signal 11 (at (nil), invalid address)
<–

I get this error when I’m trying to use Mplayer to play with -vo sdl
option or when I am trying to run testvidinfo.

I’ve downloaded the latest SDL sourcecode from the CVS, but the latest
patches doesn’t seem to solve this problem.

Below is the output from testvidinfo:

  ---------------------- DirectFB v0.9.20 ---------------------
        (c) 2000-2002  convergence integrated media GmbH  
        (c) 2002-2003  convergence GmbH                   
   -----------------------------------------------------------

() Single Application Core. (with MMX support) (2004-03-28 20:14)
(
) DirectFB/misc/memcpy: using MMXEXT optimized memcpy()
() DirectFB/InputDevice: IMPS/2 Mouse 0.9 (convergence integrated
media GmbH)
(
) DirectFB/InputDevice: Keyboard 0.9 (convergence integrated media
GmbH)
() MMX detected and enabled
(
) DirectFB/GraphicsDevice: VIA/S3G UniChrome 0.3 (-)
(*) DirectFB/Layer: Enabled ‘FBDev Primary Layer’.
Video driver: directfb
Current display: 16 bits-per-pixel
Red Mask = 0x0000f800
Green Mask = 0x000007e0
Blue Mask = 0x0000001f
Fullscreen video modes:
800x600x16
A window manager is available
Hardware surfaces are available (32768K video memory)
Copy blits between hardware surfaces are accelerated
Colorkey blits between hardware surfaces are accelerated
Alpha blits between hardware surfaces are accelerated
Color fills on hardware surfaces are accelerated
(!) [ 8350: 0.000] --> Caught signal 11 (at (nil), invalid address)
<–
Segmentation fault

------------- some other info

Epia 10000M (Nehemia)
Red Hat 9 (Kernel 2.4.25-epia2)
DirectFb 0.90
Mplayer 1.0pre3

Regards,
Anatoliy


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover


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

Hi guys,

I have the EPIA-M motherboard VIA/S3G UniChrome (Via CLE266) video
chipset.

I did do EXPORT SDL_VIDEODRIVER=directfb.

I tried with my limited understanding of SDL/Linux/C to see where the
Signal 11 is happening and it looks like it is in the SDL_Quit()
function.

Could someone help me with that, please?

My output of the testvidinfo:
---------------------- DirectFB v0.9.20 ---------------------
© 2000-2002 convergence integrated media GmbH
© 2002-2003 convergence GmbH-----------------------------------------------------------

() Single Application Core. (with MMX support) (2004-03-28 20:14)
(
) DirectFB/misc/memcpy: using MMXEXT optimized memcpy()
() DirectFB/InputDevice: IMPS/2 Mouse 0.9 (convergence integrated
media GmbH)
(
) DirectFB/InputDevice: Keyboard 0.9 (convergence integrated media
GmbH)
() MMX detected and enabled
(
) DirectFB/GraphicsDevice: VIA/S3G UniChrome 0.3 (-)
(*) DirectFB/Layer: Enabled ‘FBDev Primary Layer’.
Video driver: directfb
Current display: 16 bits-per-pixel
Red Mask = 0x0000f800
Green Mask = 0x000007e0
Blue Mask = 0x0000001f
Fullscreen video modes:
800x600x16
A window manager is available
Hardware surfaces are available (32768K video memory)
Copy blits between hardware surfaces are accelerated
Colorkey blits between hardware surfaces are accelerated
Alpha blits between hardware surfaces are accelerated
Color fills on hardware surfaces are accelerated
(!) [ 839: 0.000] --> Caught signal 11 (at (nil), invalid address)
<–
Segmentation fault


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover

Anatoliy Ivkov wrote:

Hi guys,

I have the EPIA-M motherboard VIA/S3G UniChrome (Via CLE266) video
chipset.

I did do EXPORT SDL_VIDEODRIVER=directfb.

I tried with my limited understanding of SDL/Linux/C to see where the
Signal 11 is happening and it looks like it is in the SDL_Quit()
function.

Could someone help me with that, please?

What program are you running to get a crash ?
Also, what version of SDL are you using ?

Stephane

Thanks for the help, Stephane! Please find the backtrace below:

Program received signal SIGSEGV, Segmentation fault.
0x4004b9fc in DirectFB_VideoQuit (this=0x804a1d8) at
SDL_DirectFB_video.c:1107
1107 this->screen->hwdata->surface = NULL;
(gdb) bt
#0 0x4004b9fc in DirectFB_VideoQuit (this=0x804a1d8) at
SDL_DirectFB_video.c:1107
#1 0x40040bc0 in SDL_VideoQuit () at SDL_video.c:1311
#2 0x4001e279 in SDL_QuitSubSystem (flags=32) at SDL.c:206
#3 0x4001e331 in SDL_Quit () at SDL.c:223
#4 0x08049420 in main (argc=1, argv=0x0) at testvidinfo.c:348
#5 0x400de917 in __libc_start_main () from /lib/libc.so.6

Thanks,
Anatoliy.

— Stephane Marchesin <stephane.marchesin at wanadoo.fr> wrote:> > Stephane,

I am running testvidinfo program that gives the exception, but I
also
get this exception when use mplayer with -vo sdl option.

I know that it is in SDL_Quit() function, because when I run
testvidinfo
it displays the output below:

Hardware surfaces are available (32768K video memory)
Copy blits between hardware surfaces are accelerated
Colorkey blits between hardware surfaces are accelerated
Alpha blits between hardware surfaces are accelerated
Color fills on hardware surfaces are accelerated
(!) [ 839: 0.000] --> Caught signal 11 (at (nil), invalid
address)
<–
Segmentation fault

And the Color fills on hardware surfaces are accelerated is the
last
output before SQL_Quit() function. Since that output works fine,
the
exception must be happening in the SDL_Quit() function.

Plese let me know if I can debug it better.

Could you send me a backtrace with gdb please ?
You have to do the following :

  • recompile SDL wiht debugging enabled
  • recompile testvidinfo with debugging enabled
  • type “gdb ./testvidinfo”
  • type “run”
  • produce the crash
  • type “bt”, this will output the backtrace

You can even send the backtrace on-list, it might mean something to
other people.

Thanks,
Stephane


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover

Thanks for the help, Stephane! Please find the backtrace below:

Program received signal SIGSEGV, Segmentation fault.
0x4004b9fc in DirectFB_VideoQuit (this=0x804a1d8) at
SDL_DirectFB_video.c:1107
1107 this->screen->hwdata->surface = NULL;
(gdb) bt
#0 0x4004b9fc in DirectFB_VideoQuit (this=0x804a1d8) at
SDL_DirectFB_video.c:1107
#1 0x40040bc0 in SDL_VideoQuit () at SDL_video.c:1311
#2 0x4001e279 in SDL_QuitSubSystem (flags=32) at SDL.c:206
#3 0x4001e331 in SDL_Quit () at SDL.c:223
#4 0x08049420 in main (argc=1, argv=0x0) at testvidinfo.c:348
#5 0x400de917 in __libc_start_main () from /lib/libc.so.6

Thanks,
Anatoliy.

Ok, it seems that something is missing in this update :
http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/src/video/directfb/SDL_DirectFB_video.c.diff?r1=1.12&r2=1.13

I think we need something like the following patch. Thomas, do you confirm ?

Stephane

Index: SDL_DirectFB_video.c===================================================================
RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/directfb/SDL_DirectFB_video.c,v
retrieving revision 1.17
diff -u -r1.17 SDL_DirectFB_video.c
— SDL_DirectFB_video.c 13 Feb 2004 18:39:01 -0000 1.17
+++ SDL_DirectFB_video.c 6 May 2004 08:51:44 -0000
@@ -1104,9 +1104,6 @@
HIDDEN->c2frame = NULL;
}

  • this->screen->hwdata->surface = NULL;
  • this->screen->hwdata->palette = NULL;
  • if (HIDDEN->eventbuffer)
    {
    HIDDEN->eventbuffer->Release (HIDDEN->eventbuffer);

Ok, it seems that something is missing in this update :
http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/src/video/directfb/SDL_DirectFB_
video.c.diff?r1=1.12&r2=1.13

I think we need something like the following patch. Thomas, do you confirm
?

Stephane

Index: SDL_DirectFB_video.c

RCS file:
/home/sdlweb/libsdl.org/cvs/SDL12/src/video/directfb/SDL_DirectFB_video.c,v
retrieving revision 1.17
diff -u -r1.17 SDL_DirectFB_video.c
— SDL_DirectFB_video.c 13 Feb 2004 18:39:01 -0000 1.17
+++ SDL_DirectFB_video.c 6 May 2004 08:51:44 -0000
@@ -1104,9 +1104,6 @@
HIDDEN->c2frame = NULL;
}

  • this->screen->hwdata->surface = NULL;
  • this->screen->hwdata->palette = NULL;
  • if (HIDDEN->eventbuffer)
    {
    HIDDEN->eventbuffer->Release (HIDDEN->eventbuffer);

Absolutely. Wonder why it didn’t segfault in the first place
at my setup using this code :wink:

Cheers,
Thomas

I think we need something like the following patch. Thomas, do you confirm ?

Stephane

Index: SDL_DirectFB_video.c

RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/directfb/SDL_DirectFB_video.c,v
retrieving revision 1.17
diff -u -r1.17 SDL_DirectFB_video.c
— SDL_DirectFB_video.c 13 Feb 2004 18:39:01 -0000 1.17
+++ SDL_DirectFB_video.c 6 May 2004 08:51:44 -0000
@@ -1104,9 +1104,6 @@
HIDDEN->c2frame = NULL;
}

  • this->screen->hwdata->surface = NULL;
  • this->screen->hwdata->palette = NULL;

Yep, added to CVS.

Thanks!
-Sam Lantinga, Software Engineer, Blizzard Entertainment