: CGContextSaveGState: invalid context 0x0 : CGContextSetCompositeOperation: invalid context 0x0 : CGContextFillRects: invalid context 0x0 : CGContextRestoreGState: invalid context 0x0 : CGContextSetBlendMode: invalid context 0x0 : CGContextDrawImage: invalid context 0x0 : CGBitmapContextCreateImage: invalid context 0x0 : CGContextSaveGState: invalid context 0x0 : CGContextSetCompositeOperation: invalid context 0x0 : CGContextFillRects: invalid context 0x0 : CGContextRestoreGState: invalid context 0x0 : CGContextSetBlendMode: invalid context 0x0 : CGContextSetInterpolationQuality: invalid context 0x0 : CGContextDrawImage: invalid context 0x0 ・・・ とずら〜とでてきて、その場所が特定できずに途方に暮れた経験はありませんか? 私はあります。 どうやらこれはブレークポイントを仕掛けることが可能のようです。 xCode左のナビゲーションエディタを、ブレークポイントのタブに切り替えて、 左下の+ボタンを押して、add symbolic breakpointを選びます そしてSymbolに、CGPostErrorと入力してdone. これだけです。 あと実行すればきっとエラー個所でブレークします。 今回の例では、 あとはpoデバッガコマンドを使って、コンテキストのwidth,heightを調べたら0になってましたとさ。めでたしめでたし。
Objective-C - invalid contextの場所を特定する - Qiita [キータ] http://qiita.com/Ushio@github/items/a5f937e802cb97daeeab











