1

シミュレーターでは完全に動作する Core グラフィックス パターンがありますが、デバイスではクラッシュします。

void MyDrawColoredPattern4 (void *info, CGContextRef context) {
   UIColor* colorClar = [UIColor colorWithRed: 0.57 green: 0.57 blue: 0.57 alpha: 1];
   UIColor* colorFosc = [UIColor colorWithRed: 0.15 green: 0.15 blue: 0.15 alpha: 1];

   CGColorRef dotColor = colorFosc.CGColor;
   CGColorRef shadowColor = colorClar.CGColor;

   CGContextMoveToPoint(context, 5, -0.5);
   CGContextAddLineToPoint(context, 1.1, 1.75);
   CGContextAddLineToPoint(context,1.1, 6.25);
   CGContextAddLineToPoint(context,5, 8.5);
   CGContextAddLineToPoint(context,8.9, 6.25);
   CGContextAddLineToPoint(context,8.9, 1.75);
   CGContextClosePath(context);

   CGContextMoveToPoint(context,16, 10.5);
   CGContextAddLineToPoint(context, 12.1, 12.75);
   CGContextAddLineToPoint(context,12.1, 17.25);
   CGContextAddLineToPoint(context,16, 19.5);
   CGContextAddLineToPoint(context,19.9, 17.25);
   CGContextAddLineToPoint(context,19.9, 12.75);
   CGContextClosePath(context);

   CGContextSetFillColorWithColor(context, dotColor);
   CGContextSetShadowWithColor(context, CGSizeMake(1, 1), 2, shadowColor);

   CGContextFillPath (context);
}

パターンのサイズは 25*25 で、四角形全体をdrawRect. 要件の高いグラフィックス アプリでは、シミュレーターではなくデバイスでクラッシュする傾向があることはわかっていますが、それが事実かどうかはわかりません。

いくつかの単純なパターンを作成しましたが、それらはシミュレーターとデバイスの両方で正常に動作します。

誰?

編集:ちなみに、コンソールには何もありませんが、エディター領域には次のものがあります。

libobjc.A.dylib`objc_msgSend:
0x37be7f68:  teq.w  r0, #0
0x37be7f6c:  beq    0x37be7faa               ; objc_msgSend + 66
0x37be7f6e:  push.w {r3, r4}
0x37be7f72:  ldr    r4, [r0]
0x37be7f74:  lsr.w  r9, r1, #2
0x37be7f78:  ldr    r3, [r4, #8]      ------------------> this line is highligthed in green.
0x37be7f7a:  add.w  r3, r3, #8
0x37be7f7e:  ldr    r12, [r3, #-8]
0x37be7f82:  and.w  r9, r9, r12
0x37be7f86:  ldr.w  r4, [r3, r9, lsl #2]
0x37be7f8a:  teq.w  r4, #0
0x37be7f8e:  add.w  r9, r9, #1
0x37be7f92:  beq    0x37be7fa6               ; objc_msgSend + 62
0x37be7f94:  ldr.w  r12, [r4]
0x37be7f98:  teq.w  r1, r12
0x37be7f9c:  bne    0x37be817e               ; objc_msgSendSuper_stret + 34
0x37be7f9e:  ldr.w  r12, [r4, #8]
0x37be7fa2:  pop    {r3, r4}
0x37be7fa4:  bx     r12
0x37be7fa6:  pop    {r3, r4}
0x37be7fa8:  b      0x37be7fb0               ; objc_msgSend_uncached
0x37be7faa:  mov.w  r1, #0
0x37be7fae:  bx     lr
4

0 に答える 0