New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Window manager crashes when I run the program I'm making. How do I debug?


Post Reply New Thread Subscribe

 
Thread Tools
god0fgod

 
god0fgod's Avatar
 
Member Since: Jun 24, 2008
Posts: 196
god0fgod is an unknown at this point
Mac Specs: Macbook White 2.13Ghz 160GB 10.6.4 (Buggy Version :() Snow Leopard

god0fgod is offline
Hello, I'm making a program which uses OpenGL, Python and Cocoa with PyObjC. I've made an additional part to my program which uses the same graphical code as everything else. When using it, the window manager crashes. It happens at two places. At one place, the fps drops rapidly before the crash happens. The other place has no fps drop noticeable; it simply crashes the window manager.

I have no idea how to debug this because all I have is an error report.

Can anyone make sense of the error report? (Same on each occasion) I believe it's a common problem in Snow Leopard 10.6.4 but nowhere I go explains what causes it and hence how to avoid it.

Thank you.

One of the error reports (Removed end to fit into post).

Code:
Process:         WindowServer [1009]
Path:            /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/WindowServer
Identifier:      WindowServer
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  launchd [1]

Date/Time:       2010-08-04 16:45:14.185 +0100
OS Version:      Mac OS X 10.6.4 (10F569)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   com.apple.GeForceGLDriver     	0x00000002000119a4 gldAttachDrawable + 2388
1   com.apple.GeForceGLDriver     	0x00000002000ce0c5 gldUpdateDispatch + 14581
2   com.apple.GeForceGLDriver     	0x00000002000ce1b6 gldUpdateDispatch + 14822
3   GLEngine                      	0x000000011291f146 glFlush_Exec + 133
4   com.apple.CoreGraphics        	0x00007fff802bc177 CGXGLAccelFinish + 154
5   com.apple.CoreGraphics        	0x00007fff802bb2e0 CGXReleaseDisplayDeviceSurface + 232
6   com.apple.CoreGraphics        	0x00007fff80469c02 CGXRedrawSpecifiedWindowsToDisplayAndRegion + 3663
7   com.apple.CoreGraphics        	0x00007fff802afb42 CGXUpdateMagicMirror + 641
8   com.apple.CoreGraphics        	0x00007fff8029092e CGXUpdateDisplay + 1308
9   com.apple.CoreGraphics        	0x00007fff8045cbc2 CGXFlushSurface + 732
10  com.apple.CoreGraphics        	0x00007fff8048440d _CGXFlushSurfaceInline + 231
11  com.apple.CoreGraphics        	0x00007fff803f366c _XFlushSurfaceInline + 205
12  com.apple.CoreGraphics        	0x00007fff802c31cd CGXServices_server + 108
13  com.apple.CoreGraphics        	0x00007fff802c2e8a connectionHandler + 220
14  com.apple.CoreGraphics        	0x00007fff802a4f2d CGXPostPortData + 175
15  com.apple.CoreGraphics        	0x00007fff802a4d37 CGXRunOneServerPass + 451
16  com.apple.CoreGraphics        	0x00007fff802a1e4d CGXRunOneServicesPass + 672
17  com.apple.CoreGraphics        	0x00007fff802aad4a CGXServerLoop + 139
18  com.apple.CoreGraphics        	0x00007fff80275856 CGXGetRootAdminCredentials + 0
19  WindowServer                  	0x0000000100000f29 main + 9
20  WindowServer                  	0x0000000100000f18 start + 52

Thread 1:  Dispatch queue: com.apple.libdispatch-manager
0   libSystem.B.dylib             	0x00007fff88c7408a kevent + 10
1   libSystem.B.dylib             	0x00007fff88c75f5d _dispatch_mgr_invoke + 154
2   libSystem.B.dylib             	0x00007fff88c75c34 _dispatch_queue_invoke + 185
3   libSystem.B.dylib             	0x00007fff88c7575e _dispatch_worker_thread2 + 252
4   libSystem.B.dylib             	0x00007fff88c75088 _pthread_wqthread + 353
5   libSystem.B.dylib             	0x00007fff88c74f25 start_wqthread + 13

Thread 2:
0   libSystem.B.dylib             	0x00007fff88c5b2fa mach_msg_trap + 10
1   libSystem.B.dylib             	0x00007fff88c5b96d mach_msg + 59
2   com.apple.CoreFoundation      	0x00007fff846173c2 __CFRunLoopRun + 1698
3   com.apple.CoreFoundation      	0x00007fff8461684f CFRunLoopRunSpecific + 575
4   com.apple.CoreFoundation      	0x00007fff846165d6 CFRunLoopRun + 70
5   com.apple.CoreGraphics        	0x00007fff8028773e eventThread + 470
6   libSystem.B.dylib             	0x00007fff88c94456 _pthread_start + 331
7   libSystem.B.dylib             	0x00007fff88c94309 thread_start + 13

Thread 3:
0   libSystem.B.dylib             	0x00007fff88c5b2fa mach_msg_trap + 10
1   libSystem.B.dylib             	0x00007fff88c5b96d mach_msg + 59
2   com.apple.QuartzCore          	0x00007fff8317abe2 CA::Render::Server::server_thread(void*) + 177
3   com.apple.QuartzCore          	0x00007fff8317ab22 thread_fun + 34
4   libSystem.B.dylib             	0x00007fff88c94456 _pthread_start + 331
5   libSystem.B.dylib             	0x00007fff88c94309 thread_start + 13

Thread 4:
0   libSystem.B.dylib             	0x00007fff88c95eb6 __semwait_signal + 10
1   libSystem.B.dylib             	0x00007fff88c99cd1 _pthread_cond_wait + 1286
2   com.apple.CoreGraphics        	0x00007fff8036082a layer_blit_work_queue_thread + 714
3   com.apple.CoreGraphics        	0x00007fff80360a9c layer_blit_work_queue_server + 156
4   libSystem.B.dylib             	0x00007fff88c94456 _pthread_start + 331
5   libSystem.B.dylib             	0x00007fff88c94309 thread_start + 13

Thread 5:
0   libSystem.B.dylib             	0x00007fff88c74eaa __workq_kernreturn + 10
1   libSystem.B.dylib             	0x00007fff88c752bc _pthread_wqthread + 917
2   libSystem.B.dylib             	0x00007fff88c74f25 start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x00000000e00002c2  rbx: 0x0000000112f65000  rcx: 0x00007fff88c5b2fa  rdx: 0x0000000012fa8000
  rdi: 0x00007fff5fbed310  rsi: 0x00007fff711475c0  rbp: 0x00007fff5fbee4a0  rsp: 0x00007fff5fbee4a0
   r8: 0x0000000000000e03   r9: 0x0000000000000000  r10: 0x00000000000010bc  r11: 0x0000000000000206
  r12: 0x0000000112fa8000  r13: 0x0000000000000003  r14: 0x00007fff5fbee4d0  r15: 0x00000001003f48d0
  rip: 0x00000002000119a4  rfl: 0x0000000000010246  cr2: 0x0000000000000000
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
"How do I debug?"

The old fashioned way. Get a clue where the crash is occurring. Only you can do that. Place some printf's in the code to narrow it down or step through the area of the code where you think the crash is happening.

That zero address looks suspicious. Perhaps you are passing an zero initialized variable that is suppose to be a call back function pointer. Can't say I know though.

CameraTime - Time lapse photography for novice and advanced users.

When asking questions, post the version of your software. You'll receive better answers.

Please post your results to the thread as it is good feedback.
QUOTE Thanks
god0fgod

 
god0fgod's Avatar
 
Member Since: Jun 24, 2008
Posts: 196
god0fgod is an unknown at this point
Mac Specs: Macbook White 2.13Ghz 160GB 10.6.4 (Buggy Version :() Snow Leopard

god0fgod is offline
This happens with my python code but my new python code could be passing values to my C++ or Objective-C code which could be problematic in certain conditions.

The problem is, the Terminal will crash. I'll have to print everything with NSLog so I can see things in the Console, afterwards.

Thank you for your answer. I suppose the hard way is the only way unless I can gather more details on the cause of the error.
QUOTE Thanks

Post Reply New Thread Subscribe


« Move files in a list... | Software »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
XCode Debugging From Source Code deanrayj OS X - Development and Darwin 0 04-25-2008 09:33 PM
Making Mac Run faster again tsuke OS X - Operating System 2 12-18-2007 04:39 AM
movie clip making / slideshow program included on Mac? JBPdog Switcher Hangout 2 07-09-2007 05:14 PM
Making Tshirts with Comic Life program jackies35 OS X - Apps and Games 1 06-09-2007 11:11 AM
Please help! Need a graph making program! Justin OS X - Apps and Games 1 01-21-2007 09:47 AM

All times are GMT -4. The time now is 02:11 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?