Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging a NULL CGContext under Cocoa/Carbon

During the execution of my program I'm getting the following output in the XCode debugging console:

<Error>: CGContextSetTextMatrix: invalid context 0x0

I have no idea where in the application this NULL-context is being passed to the OS. Anyone know of a good technique to hunt it down? Can I break into the application when something is written to stdout?

like image 931
fbrereto Avatar asked Dec 09 '09 18:12

fbrereto


1 Answers

Adding a breakpoint in the gdb console for CGPostError breaks when the OS writes a CG-related error to stderr.

like image 136
fbrereto Avatar answered Oct 30 '22 09:10

fbrereto