Hello there,
I have all of the Bullet demos up and running, but a curious thing happens when I exit out of some them (either by closing the program window or by hitting 'q' on the keyboard). Sometimes the demo crashes, sometimes it does not. Let's take, for example, the appBasicDemo project. I compiled it using VS2005. When I run the Release configuration, all goes well until I go to exit. About 75% of the time, I get an application error:
The instruction at "0x6952e894" referenced memory at "0x4479c058". The memory could not be "written". Click OK to terminate the program.
This does not occur if I close the console window instead of the program window (in that case, the program closes without errors every time).
When I run the Debug configuration and try to exit the program, if the error occurs, the debugger traceback takes me to btBoxShape.h (this is for appBasicDemo specifically - for other demos, the traceback takes me to other headers).
The weird thing is, sometimes this application error occurs and sometimes it does not. I can't seem to figure out if there is a correlation between when I choose to exit and when the application error occurs - it seems completely random (I've tried exiting the program right away, waiting until the block hits the plane and then exiting, and waiting until all objects have settled and then exiting - the error has occurred at each). I've tried watching the debug text to see if there is a correlation between the data displayed and when I can successfully close the demo without it crashing, but it is difficult to monitor exact values because they change so quickly.
Demos that don't seem to give me this error, no matter how many times I close them, are:
appBenchmarks (obviously, since it is just the console window)
appBspDemo
appBulletDino
appCollisionInterfaceDemo
appContinuousConvexCollision
appGjkConvexCastDemo
appHelloWorld (obviously, since it is just the console window)
appiffCheck (obviously)
appMiniCL_VectorAdd (obviously)
appRaytracer
appSimplexDemo
appTerrainDemo (freezes when I go to run it, but after I wait a while, will close fine, even though it stays frozen until I do)
Has anyone else experienced a similar issue?
Thanks!
--Leezer
Some Demos Crash on Exit
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Some Demos Crash on Exit
There are likely problems related to our interaction with Glut, and not cleaning up. I haven't seen any crash when exiting using 'q'.
Do you have a callstack for the crash, using a debug build?
We likely move away from Glut for Windows in a future release.
Thanks,
Erwin
Do you have a callstack for the crash, using a debug build?
We likely move away from Glut for Windows in a future release.
Thanks,
Erwin
-
- Posts: 22
- Joined: Mon Nov 09, 2009 5:06 am
Re: Some Demos Crash on Exit
...Well, when the crash occurs in appBasicDemo, here's what's in the callstack:
nvoglnt.dll!6952e894()
[Frames below may be incorrect and/or missing, no symbols loaded for nvoglnt.dll]
nvoglnt.dll!69629743()
nvoglnt.dll!696296fc()
nvoglnt.dll!69598323()
nvoglnt.dll!6965b8dc()
nvoglnt.dll!69628c51()
nvoglnt.dll!697316de()
nvoglnt.dll!69716a97()
nvoglnt.dll!697160f2()
nvoglnt.dll!69608896()
kernel32.dll!7c8097d0()
nvoglnt.dll!69608ad8()
nvoglnt.dll!6999f8f5()
ntdll.dll!7c90118a()
ntdll.dll!7c923ada()
user32.dll!7e429ed9()
ntdll.dll!7c910435()
ntdll.dll!7c91043e()
user32.dll!7e429ed9()
ntdll.dll!7c923c88()
kernel32.dll!7c81caae()
user32.dll!7e429ed9()
ntdll.dll!7c9622e8()
ntdll.dll!7c9623e0()
ntdll.dll!7c9623bc()
> DebugBasicDemo.exe!_CrtIsValidHeapPointer(const void * pUserData=0x0047602c) Line 2072
ntdll.dll!7c91005d()
user32.dll!7e429ed9()
ntdll.dll!7c90eb99()
kernel32.dll!7c80e6cb()
kernel32.dll!7c80e4fc()
kernel32.dll!7c81cb26()
DebugBasicDemo.exe!__crtExitProcess(int status=0) Line 684
DebugBasicDemo.exe!doexit(int code=0, int quick=0, int retcaller=0) Line 596 + 0x9 bytes
DebugBasicDemo.exe!exit(int code=0) Line 398 + 0xd bytes
DebugBasicDemo.exe!DemoApplication::keyboardCallback(unsigned char key='„', int x=2089824936, int y=1241676) Line 340
0012f268()
ntdll.dll!7c90327a()
ntdll.dll!7c92aa0f()
ntdll.dll!7c92770a()
ntdll.dll!7c927784()
ntdll.dll!7c90d9ba()
ntdll.dll!7c90e4a5()
user32.dll!7e4318d1()
nvoglnt.dll!69629743()
nvoglnt.dll!696296fc()
nvoglnt.dll!69598323()
nvoglnt.dll!6965b8dc()
nvoglnt.dll!69628c51()
nvoglnt.dll!697316de()
nvoglnt.dll!69716a97()
nvoglnt.dll!697160f2()
nvoglnt.dll!69608896()
kernel32.dll!7c8097d0()
nvoglnt.dll!69608ad8()
nvoglnt.dll!6999f8f5()
ntdll.dll!7c90118a()
ntdll.dll!7c923ada()
user32.dll!7e429ed9()
ntdll.dll!7c910435()
ntdll.dll!7c91043e()
user32.dll!7e429ed9()
ntdll.dll!7c923c88()
kernel32.dll!7c81caae()
user32.dll!7e429ed9()
ntdll.dll!7c9622e8()
ntdll.dll!7c9623e0()
ntdll.dll!7c9623bc()
The bottom of the stack keeps going, but consists of repetitions of the portion that I colored in blue.
Another weird thing is that the problem has stopped for the particular demo that I am currently editing (ConcavePhysicsDemo.cpp). I'm not even sure what I did to "fix" the issue - I modified a keyboard callback (changed 'g' to 'e') and suddenly the problem went away (i.e. ConcavePhysicsDemo.cpp no longer crashes when I hit 'q' or exit out of the program window). But when I changed the keyboard callback back to the way it was, the program still no longer crashed on exit. Odd stuff...
--Leezer
nvoglnt.dll!6952e894()
[Frames below may be incorrect and/or missing, no symbols loaded for nvoglnt.dll]
nvoglnt.dll!69629743()
nvoglnt.dll!696296fc()
nvoglnt.dll!69598323()
nvoglnt.dll!6965b8dc()
nvoglnt.dll!69628c51()
nvoglnt.dll!697316de()
nvoglnt.dll!69716a97()
nvoglnt.dll!697160f2()
nvoglnt.dll!69608896()
kernel32.dll!7c8097d0()
nvoglnt.dll!69608ad8()
nvoglnt.dll!6999f8f5()
ntdll.dll!7c90118a()
ntdll.dll!7c923ada()
user32.dll!7e429ed9()
ntdll.dll!7c910435()
ntdll.dll!7c91043e()
user32.dll!7e429ed9()
ntdll.dll!7c923c88()
kernel32.dll!7c81caae()
user32.dll!7e429ed9()
ntdll.dll!7c9622e8()
ntdll.dll!7c9623e0()
ntdll.dll!7c9623bc()
> DebugBasicDemo.exe!_CrtIsValidHeapPointer(const void * pUserData=0x0047602c) Line 2072
ntdll.dll!7c91005d()
user32.dll!7e429ed9()
ntdll.dll!7c90eb99()
kernel32.dll!7c80e6cb()
kernel32.dll!7c80e4fc()
kernel32.dll!7c81cb26()
DebugBasicDemo.exe!__crtExitProcess(int status=0) Line 684
DebugBasicDemo.exe!doexit(int code=0, int quick=0, int retcaller=0) Line 596 + 0x9 bytes
DebugBasicDemo.exe!exit(int code=0) Line 398 + 0xd bytes
DebugBasicDemo.exe!DemoApplication::keyboardCallback(unsigned char key='„', int x=2089824936, int y=1241676) Line 340
0012f268()
ntdll.dll!7c90327a()
ntdll.dll!7c92aa0f()
ntdll.dll!7c92770a()
ntdll.dll!7c927784()
ntdll.dll!7c90d9ba()
ntdll.dll!7c90e4a5()
user32.dll!7e4318d1()
nvoglnt.dll!69629743()
nvoglnt.dll!696296fc()
nvoglnt.dll!69598323()
nvoglnt.dll!6965b8dc()
nvoglnt.dll!69628c51()
nvoglnt.dll!697316de()
nvoglnt.dll!69716a97()
nvoglnt.dll!697160f2()
nvoglnt.dll!69608896()
kernel32.dll!7c8097d0()
nvoglnt.dll!69608ad8()
nvoglnt.dll!6999f8f5()
ntdll.dll!7c90118a()
ntdll.dll!7c923ada()
user32.dll!7e429ed9()
ntdll.dll!7c910435()
ntdll.dll!7c91043e()
user32.dll!7e429ed9()
ntdll.dll!7c923c88()
kernel32.dll!7c81caae()
user32.dll!7e429ed9()
ntdll.dll!7c9622e8()
ntdll.dll!7c9623e0()
ntdll.dll!7c9623bc()
The bottom of the stack keeps going, but consists of repetitions of the portion that I colored in blue.
Another weird thing is that the problem has stopped for the particular demo that I am currently editing (ConcavePhysicsDemo.cpp). I'm not even sure what I did to "fix" the issue - I modified a keyboard callback (changed 'g' to 'e') and suddenly the problem went away (i.e. ConcavePhysicsDemo.cpp no longer crashes when I hit 'q' or exit out of the program window). But when I changed the keyboard callback back to the way it was, the program still no longer crashed on exit. Odd stuff...
--Leezer