Debugging a NULL CGContext under Cocoa/Carbon

这一生的挚爱 提交于 2019-12-03 05:59:47

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/1876017/debugging-a-null-cgcontext-under-cocoa-carbon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!