Oh. Well, the other two threads don't look particularly crashed, either:

Thread 2:
#0      0x92b5f3ae in __semwait_signal
#1      0x92b8a326 in _pthread_cond_wait
#2      0x92b89d0d in pthread_cond_wait$UNIX2003
#3      0x94909b32 in glvmDoWork
#4      0x92b89095 in _pthread_start
#5      0x92b88f52 in thread_start

Thread 3:
#0      0x00002adc in -[MainView getFrameForTime:] at MainView.m:132
#1      0x0000292a in MyDisplayLinkCallback at MainView.m:88
#2      0x938c3d3f in CVDisplayLink::performIO
#3      0x938c42e1 in CVDisplayLink::runIOThread
#4      0x92b89095 in _pthread_start
#5      0x92b88f52 in thread_start

Thread 1 is displayed below.

Why does GDB attache to it and stop execution? If I hit continue, nothing happens: no NSLog output, no gdb prompt. When I hit pause, thread 1 and 3 seem to be corrupted (or at least missing symbol information).

Is there anything useful in this information:

[Session started at 2009-04-11 11:29:06 +1000.]
2009-04-11 11:29:06.307 FirstOpenGLtest[1053:10b] prepare
2009-04-11 11:29:06.382 FirstOpenGLtest[1053:10b] prepareOpenGL
2009-04-11 11:29:06.386 FirstOpenGLtest[1053:10b] reshaping
2009-04-11 11:29:06.387 FirstOpenGLtest[1053:10b] drawRect
2009-04-11 11:29:06.399 FirstOpenGLtest[1053:4c03] MyDisplayLinkCallback
2009-04-11 11:29:06.403 FirstOpenGLtest[1053:4c03] getFrameForTime
2009-04-11 11:29:06.415 FirstOpenGLtest[1053:4c03] MyDisplayLinkCallback
2009-04-11 11:29:06.416 FirstOpenGLtest[1053:4c03] getFrameForTime
2009-04-11 11:29:06.432 FirstOpenGLtest[1053:4c03] MyDisplayLinkCallback
2009-04-11 11:29:06.432 FirstOpenGLtest[1053:4c03] getFrameForTime
2009-04-11 11:29:06.447 FirstOpenGLtest[1053:10b] applicationDidFinishLaunching
2009-04-11 11:29:06.447 FirstOpenGLtest[1053:10b] start
2009-04-11 11:29:06.449 FirstOpenGLtest[1053:4c03] MyDisplayLinkCallback
2009-04-11 11:29:06.449 FirstOpenGLtest[1053:4c03] getFrameForTime
2009-04-11 11:29:06.449 FirstOpenGLtest[1053:4c03] ... red = 0.110000

[Session started at 2009-04-11 11:29:06 +1000.]
Loading program into debugger…
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".Program loaded.
sharedlibrary apply-load-rules all
Attaching to program: `/Users/brian/Documents/04Dev/FirstOpenGLtest/ FirstOpenGLtest/build/Debug/FirstOpenGLtest.app/Contents/MacOS/ FirstOpenGLtest', process 1053.
[Switching to process 1053 thread 0x4c03]


On 11/04/2009, at 11:22 , Greg Parker wrote:

On Apr 10, 2009, at 6:15 PM, Brian Bruinewoud wrote:
However, if I place any openGL code (even just glGetError) in the "// Add your drawing code here" location, the program crashes (NSLog calls work fine). Note that the openGL code isn't called until after applicationDidFinishLaunching so its not something like partially constructed/initialised objects...

The call stack is:
#0      0x92b581c6 in mach_msg_trap
#1      0x92b5f9bc in mach_msg
#2      0x90c270ae in CFRunLoopRunSpecific
#3      0x90c27cd8 in CFRunLoopRunInMode
#4      0x96e6f2c0 in RunCurrentEventLoopInMode
#5      0x96e6f0d9 in ReceiveNextEventCommon
#6      0x96e6ef4d in BlockUntilNextEventMatchingListInMode
#7      0x91e3dd7d in _DPSNextEvent
#8 0x91e3d630 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#9      0x91e3666b in -[NSApplication run]
#10     0x91e038a4 in NSApplicationMain
#11     0x0000250c in main at main.m:13

That's not a crash, that's the main thread's run loop waiting patiently for something to happen. Look through your other threads for the one that actually crashed. (If you get a crash log, the crashed thread is specially marked.)


--
Greg Parker     gpar...@apple.com      Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to