|
|
#1 | |
|
Registered User
Join Date: Nov 2009
Posts: 7
|
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 ?? () 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 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 * 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 |
|
|
|
|
|
|
#2 | |
|
NVIDIA Corporation
Join Date: Mar 2005
Posts: 2,487
|
Can you please generate and attach a bug report log file and a test application that reproduces the problem? Thanks!
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Nov 2009
Posts: 7
|
I'm not sure if I'll be able to make a test case, since I'm not at all familiar with SDL or OpenGL; the app is an Open Source project I work on which has both text-only and SDL versions, and I discovered the crash while trying out the SDL version.
I have attached the result of running nvidia-bug-report.sh, assuming that's what you mean by "bug report log file". |
|
|
|
|
|
#4 | |
|
NVIDIA Corporation
Join Date: Mar 2005
Posts: 2,487
|
Thanks. I don't see anything obviously wrong in your bug report file, so I'll need to reproduce the problem with your application to be able to help.
|
|
|
|
|
|
|
#5 |
|
Registered User
Join Date: Nov 2009
Posts: 7
|
It's available via git. Use these commands:
Code:
git clone git://crawl-ref.git.sourceforge.net/gitroot/crawl-ref/crawl-ref cd crawl-ref/ git submodule update --init cd crawl-ref/source make TILES=1 NEEDS_PCRE=y MAKECMDGOALS=wizard ./crawl Also, I've found that the "starts with a blank window" problem, which is a prerequisite for crashing, doesn't happen unless you've rapidly switched back and forth a bunch of times between a suspended and un-suspended X server. On my Mandriva 2010.0 KDE desktop, this can be done by pressing Ctrl-Alt-F12 to suspend the X server and go to a text-console showing /var/log/*, and then pressing Ctrl-Alt-F7 to bring back the X server. Even after doing that, you might have to start the app two to four times before the window comes up blank (though it seems if I suspend/un-suspended the X server enough times it gets into a state where the app's window always comes up blank (or maybe that happens after the app has crashed enough times)). If you then re-start the X server the problem goes away. The switching back-and-forth causes messages like this in /var/log/messages: Code:
Nov 19 21:34:03 localhost acpid: client 8445[0:0] has disconnected Nov 19 21:34:03 localhost acpid: client 8445[0:0] has disconnected Nov 19 21:34:03 localhost acpid: client connected from 8445[0:0] Nov 19 21:34:03 localhost acpid: 1 client rule loaded Nov 19 21:34:03 localhost acpid: client connected from 8445[0:0] Nov 19 21:34:03 localhost acpid: 1 client rule loaded Code:
Nov 19 21:34:13 localhost klogd: CPU0 attaching NULL sched-domain. Nov 19 21:34:13 localhost klogd: CPU1 attaching NULL sched-domain. Nov 19 21:34:13 localhost klogd: CPU0 attaching sched-domain: Nov 19 21:34:13 localhost klogd: domain 0: span 0-1 level MC Nov 19 21:34:13 localhost klogd: groups: 0 1 Nov 19 21:34:13 localhost klogd: CPU1 attaching sched-domain: Nov 19 21:34:13 localhost klogd: domain 0: span 0-1 level MC Nov 19 21:34:13 localhost klogd: groups: 1 0 Code:
==3790== Conditional jump or move depends on uninitialised value(s) ==3790== at 0x4EE78ED: ??? (in /usr/lib/libGLcore.so.190.42) |
|
|
|
|
|
#6 | |
|
Registered User
Join Date: Nov 2009
Posts: 7
|
Correction: suspending/un-suspending the X server to enable the blank-window problem worked only once. Additionally, when I restarted my X server, the app window would sometimes start out blank, but minimizing and restoring it wouldn't crash. When I then suspended/un-suspended my X server, the blank-window problem went away. However, before restarting my X server (as reported in the previous comment) the blank-window problem didn't appear until after suspending/un-suspending.
|
|
|
|
|
|
|
#7 |
|
Registered User
Join Date: Nov 2009
Posts: 7
|
Another correction: I think suspending/un-suspending the X server actually worked twice, not just once, since the reason I even though of it in the first place is that the crash started happening after the first time I'd ever suspended the X server.
|
|
|
|
|
|
#8 |
|
Registered User
Join Date: Nov 2009
Posts: 7
|
I tried doing some other stuff with my desktop for an hour or two, did the suspsend/un-suspend X server thing again, and the first time I ran the app it got a blank-window without crashing on un-minimizing, but all subsequent launches of the apps crashed on un-minimize. It doesn't crash while running under valgrind, but it does produce a slew of "invalid read from free'd memory" errors (attaching valgrind logfile).
Oh, and then doing the suspend/un-suspend again fixed the problem, so that there isn't any blank, and valgrind only reports the single "Conditional jump or move depends on uninitialised value" error. And then the next suspend/un-suspend started the problem again. However, subsequent tries suspend/un-suspended left the app with a blank window on startup and crashing after minimizing/un-minimizing. I then did some other stuff on my desktop for a while, and the next time I launched the app it started with a blank window, but minimizing/un-minimizing didn't crash it, but all subsequent attempts did crash. Argh, and now another suspend/un-suspend cycle fixed the problem, and it took a bunch more cycles before the problem started again! I can't find any rhyme or reason to it. |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Nov 2009
Posts: 7
|
The crash happens during the call to SDL_GL_SwapBuffers(), at line 1307 of crawl-ref/crawl-ref/source/tilesdl.cc
|
|
|
|
|
|
#10 |
|
Registered User
Join Date: Jun 2010
Posts: 1
|
Thank you so much for bringing this topic up, I've been having the same problem and it's really getting to my nerves. I hope that there will be some really helpful fixes that will be posted here.
|
|
|
|
|
|
#11 |
|
Registered User
Join Date: Jul 2010
Posts: 1
|
Hi! is there any screen shots? I am having problems with this crash too... I am a beginner and I really need help.. It says "Invalid read"
|
|
|
|
![]() |
| Thread Tools | |
|
|