Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

printf

macrumors regular
Original poster
Aug 27, 2008
105
0
I have a client who's having problems with my app crashing on their system. We are both running snow leopard, but I don't experience any problems. They sent me the crash report, but it's not really revealing much, so maybe someone could tell me a better way to figure out the problem as i don't have access to their system.

It looks like os x sends a message to my window callback, particularly to kEventControlDraw, as that's where I'm calling CGContextClearRect explicitely. And the rest is under the hood from there. Any ideas?

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

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   com.apple.CoreGraphics        	0x918f891c argb32_mark_constshape + 12
1   com.apple.CoreGraphics        	0x918f8704 argb32_mark + 580
2   libRIP.A.dylib                	0x904b249b ripl_BltShape + 2154
3   libRIP.A.dylib                	0x904af23f ripc_Render + 377
4   libRIP.A.dylib                	0x904ac46c ripc_DrawRects + 622
5   com.apple.CoreGraphics        	0x918f7220 CGContextFillRects + 159
6   com.apple.CoreGraphics        	0x918f6fa0 CGContextClearRect + 151
7   com.Projects.TestApp            0x00039d70 ToolWindowCallback + 1059
8   com.apple.HIToolbox           	0x9552f129 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1567
9   com.apple.HIToolbox           	0x9552e3f0 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411
10  com.apple.HIToolbox           	0x9552e24f SendEventToEventTargetWithOptions + 58
11  com.apple.HIToolbox           	0x9555615d HIView::SendDraw(short, OpaqueGrafPtr*, __HIShape const*, CGContext*) + 475
12  com.apple.HIToolbox           	0x95555ab1 HIView::RecursiveDrawComposited(__HIShape const*, unsigned long, HIView*, CGContext*, unsigned char, float) + 713
13  com.apple.HIToolbox           	0x95554ad7 HIView::DrawComposited(short, OpaqueGrafPtr*, __HIShape const*, unsigned long, HIView*, CGContext*) + 873
14  com.apple.HIToolbox           	0x9555489b HIView::DrawComposited(short, OpaqueGrafPtr*, __HIShape const*, unsigned long, HIView*, CGContext*) + 301
15  com.apple.HIToolbox           	0x9555471d HIView::Draw(short, OpaqueGrafPtr*, unsigned long) + 83
16  com.apple.HIToolbox           	0x9560512d Draw1Control + 80
17  com.Projects.TestApp            0x00039e0d ToolWindowCallback + 1216
18  com.apple.HIToolbox           	0x9552f129 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1567
19  com.apple.HIToolbox           	0x9552e3f0 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411
20  com.apple.HIToolbox           	0x9552e24f SendEventToEventTargetWithOptions + 58
21  com.apple.HIToolbox           	0x9555615d HIView::SendDraw(short, OpaqueGrafPtr*, __HIShape const*, CGContext*) + 475
22  com.apple.HIToolbox           	0x95555ab1 HIView::RecursiveDrawComposited(__HIShape const*, unsigned long, HIView*, CGContext*, unsigned char, float) + 713
23  com.apple.HIToolbox           	0x95554ad7 HIView::DrawComposited(short, OpaqueGrafPtr*, __HIShape const*, unsigned long, HIView*, CGContext*) + 873
24  com.apple.HIToolbox           	0x9555489b HIView::DrawComposited(short, OpaqueGrafPtr*, __HIShape const*, unsigned long, HIView*, CGContext*) + 301
25  com.apple.HIToolbox           	0x9555471d HIView::Draw(short, OpaqueGrafPtr*, unsigned long) + 83
26  com.apple.HIToolbox           	0x9560512d Draw1Control + 80
27  com.Projects.TestApp            0x00039e0d ToolWindowCallback + 1216
28  com.apple.HIToolbox           	0x9552f129 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1567
29  com.apple.HIToolbox           	0x9552e3f0 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411
30  com.apple.HIToolbox           	0x9552e24f SendEventToEventTargetWithOptions + 58
31  com.apple.HIToolbox           	0x9555615d HIView::SendDraw(short, OpaqueGrafPtr*, __HIShape const*, CGContext*) + 475
32  com.apple.HIToolbox           	0x95555ab1 HIView::RecursiveDrawComposited(__HIShape const*, unsigned long, HIView*, CGContext*, unsigned char, float) + 713
33  com.apple.HIToolbox           	0x95554ad7 HIView::DrawComposited(short, OpaqueGrafPtr*, __HIShape const*, unsigned long, HIView*, CGContext*) + 873
34  com.apple.HIToolbox           	0x9555489b HIView::DrawComposited(short, OpaqueGrafPtr*, __HIShape const*, unsigned long, HIView*, CGContext*) + 301
35  com.apple.HIToolbox           	0x9555471d HIView::Draw(short, OpaqueGrafPtr*, unsigned long) + 83
36  com.apple.HIToolbox           	0x9560512d Draw1Control + 80
 
Might help to have them send the console log as well.

What does your ToolWindowCallback() function look like?
 
Might help to have them send the console log as well.

What does your ToolWindowCallback() function look like?

The callback is pretty dense. About 1k lines and most of it's to functions that wrap the underlying logic. (this one's going to take me a while!) I'm guessing there's just a memory leak somewhere.

I'll admit, I'm not extremely familiar with OS X still. Where will they obtain the console log from?

And one more question. Is there some sort of configuration or setting on OS X that they might have turned on or off that might help me replicate their crash? I always thought that Mac OS's were generally the same, so it's bugging me that they have the problem, but I don't!
 
On a second look on that stack trace it appears that your callback function is doing something to cause a control to draw, which is calling your function again, thus an infinite recursive loop. Might want to look into that.

I'll admit, I'm not extremely familiar with OS X still. Where will they obtain the console log from?

/var/log/system.log
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.