SDL crash in after un-minimize

My SDL app was working just fine, except that it would frequently start up with a blank window, and the only way to get SDL to draw to it would be to minimize the window and then restore it, after which everything worked fine (the blankness was the only problem; it would respond to keystrokes just fine). But after a while, not only did the blank window start happening all the time, but un-minimizing the window would cause a crash in (everything in the stack trace before the was just ???). Restarting the X server got rid of the crashes happening all the time, but I can still duplicate the crash by repeatedly minimizing and restoring the window while the program is still in it’s splash-screen.

The stack trace looks like:

#0  0xb6adf57f in ?? () from /usr/lib/

#1  0xb5aeb008 in ?? ()

#2  0x09694eb8 in ?? ()

#3  0x00000000 in ?? ()

There are two threads, with the second being:

#0  0xffffe430 in __kernel_vsyscall ()

#1  0xb728b786 in nanosleep () from /lib/i686/

#2  0xb77271f3 in SDL_Delay (ms=1) at src/timer/unix/SDL_systimer.c:118

#3  0xb7727244 in RunTimer (unused=0x0) at src/timer/unix/SDL_systimer.c:203

#4  0xb76c5a61 in SDL_RunThread (data=0x9627cf0) at src/thread/SDL_thread.c:202

#5  0xb7723abb in RunThread (data=0x9627cf0)

	at src/thread/pthread/SDL_systhread.c:47

#6  0xb71e0885 in start_thread () from /lib/i686/

#7  0xb72cb57e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Running my app in valgrind when the crash happens gives these memory errors:

==3092== Invalid read of size 4

==3092==	at 0x4F04425: ??? (in /usr/lib/

==3092==  Address 0x623cc78 is 1,952 bytes inside a block of size 3,032 free'd

==3092==	at 0x4024536: free (vg_replace_malloc.c:325)

==3092==	by 0x4223F9B: ??? (in /usr/lib/

==3092==	by 0x623C4FF: ???


==3092== Invalid read of size 4

==3092==	at 0x4F0442B: ??? (in /usr/lib/

==3092==  Address 0x7 is not stack'd, malloc'd or (recently) free'd

The crashes happened in these places (a different place each time):

  • 0x523eedd

  • 0xb6a5a57f

  • 0xb6c1157f

  • 0xb6a9c57f

  • 0xb6a6357f

  • 0xb6adf57f


  • Mandriva 2010.0

  • Kernel

  • 32 bit AMD Athlon 7550 Dual-Core Processor

  • nvidia 190.42

  • mesa 7.5.2-2

  • libSDL1.2_0-1.2.13-13

  • libSDL_image1.2_0-1.2.7-2

I don’t quite see what this has to do with CUDA. You might want to try instead.

Sorry, it’s just that I thought this was the most on-topic forum I could find on the official Nvidia site. I guess it should have gone into the GeForce Drivers sub-forum.

As I said, is the place to go for NVIDIA linux driver support.