View Single Post
Old 11-19-09, 04:27 AM   #1
Khym Chanur
Registered User
 
Join Date: Nov 2009
Posts: 7
Default SDL crash in libGLcore.so after un-minimize

My SDL app was mostly working, 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 libGLcore.so. 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:
Code:
#0  0xb6adf57f in ?? () from /usr/lib/libGLcore.so.1
#1  0xb5aeb008 in ?? ()
#2  0x09694eb8 in ?? ()
#3  0x00000000 in ?? ()
There are two threads, with the second being:

Code:
#0  0xffffe430 in __kernel_vsyscall ()
#1  0xb728b786 in nanosleep () from /lib/i686/libc.so.6
#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/libpthread.so.0
#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:

Code:
==3092== Invalid read of size 4
==3092==	at 0x4F04425: ??? (in /usr/lib/libGLcore.so.190.42)
==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/libGL.so.190.42)
==3092==	by 0x623C4FF: ???
==3092==
==3092== Invalid read of size 4
==3092==	at 0x4F0442B: ??? (in /usr/lib/libGLcore.so.190.42)
==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

System/software:
* Mandriva 2010.0
* 2.6.31.5 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
Khym Chanur is offline   Reply With Quote