Note that there are some explanatory texts on larger screens.

plurals
  1. POCore Graphics Pattern crashes (only on the device)
    primarykey
    data
    text
    <p>I have a Core graphics Pattern that works perfectly on the simulator, but it crashes on the device:</p> <pre><code>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); } </code></pre> <p>The pattern size is 25*25 and it's filling the whole rect with <code>drawRect</code>. I know that sometimes with high requirement graphics apps tend to crash on the device and no the simulator, but I'm not sure if that's the case.</p> <p>I've created some simpler patterns and they do work ok in both the simulator and the device.</p> <p>Anyone?</p> <p><strong>EDIT</strong>: by the way, there is nothing on the console but the following in the editor area:</p> <pre><code>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] ------------------&gt; 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 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload