ios - EXEC BAD ACCESS Error when calling a block (iPad only)? -


in recent days discovered application crashes on ipads inconsistently. try , found out why, installed crashlytics , obtained report on crash after user replicated it.

the error exec bad access error on main thread, , line in question is: __36-[cxscene showgenericpopupwithtext:]_block_invoke

looking @ method 'showgenericpopupwithtext:', can see indeed invoke block:

-(void)showgenericpopupwithtext:(nsstring *)text {     cxpopupmessagenode *message = [[cxpopupmessagenode alloc]initwithmessage:text];     [message setalpha:0.0f];     [self.spriteforstaticgeometry addchild:message];     [message setposition:cgpointmake(self.spriteforstaticgeometry.size.width/2 - (message.frame.size.width/2), self.spriteforstaticgeometry.size.height/2)];     skaction *fadein = [skaction fadeinwithduration:0.2];     skaction *wait = [skaction waitforduration:0.5];     skaction *fadeout = [skaction fadeoutwithduration:0.2];     skaction *show = [skaction sequence:@[fadein,wait,fadeout]];     [message runaction:show completion:^{         [self.spriteforstaticgeometry removechildreninarray:@[message]];     }]; } 

right @ end there, run action completion block removes cxpopupmessagenode object. (a subclass of skshapenode). assuming causing error occur.

however, happening on ipads, , doesn't occur @ on of iphones tested. what's more, can't replicate in simulator, don't know can fix error. might know or have insight onto causing crash?

thank time.

edit: additional information request:

crashlytics stack trace:

thread : crashed: com.apple.main-thread 0  spritekit                      0x26f9143a -[sklabelnode hash] + 701 1  spritekit                      0x26f9140d -[sklabelnode hash] + 656 2  corefoundation                 0x23b778d7 -[__nsseti member:] + 62 3  corefoundation                 0x23b6610d -[nsset containsobject:] + 28 4  corefoundation                 0x23b7a809 -[nsmutablearray removeobjectsinrange:inarray:range:] + 304 5  corefoundation                 0x23b7a663 -[nsmutablearray removeobjectsinarray:] + 154 6  spritekit                      0x26f7bb63 -[sknode removechildreninarray:] + 1590 7  astrokit                       0x00111873 __36-[cxscene showgenericpopupwithtext:]_block_invoke (cxscene.m:707) 8  spritekit                      0x26f31847 skcaction::didfinishwithtargetattime(skcsprite*, double) + 38 9  spritekit                      0x26f46475 skcsequence::cpp_updatewithtargetfortime(skcsprite*, double) + 148 10 spritekit                      0x26f9c6a9 skcsprite::update(double) + 144 11 spritekit                      0x26f9c767 skcsprite::update(double) + 334 12 spritekit                      0x26f9c767 skcsprite::update(double) + 334 13 spritekit                      0x26f4cec9 -[skscene _update:] + 200 14 spritekit                      0x26f6a8af -[skview(private) _update:] + 686 15 spritekit                      0x26f67a45 -[skview rendercallback:] + 748 16 spritekit                      0x26f6485d __29-[skview setuprendercallback]_block_invoke + 116 17 spritekit                      0x26f95fcd -[skdisplaylink _callbackfornextframe:] + 248 18 quartzcore                     0x26b3ad7b ca::display::displaylinkitem::dispatch() + 98 19 quartzcore                     0x26b3abe3 ca::display::displaylink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 366 20 iomobileframebuffer            0x2b3c182f iomobileframebuffervsyncnotifyfunc + 90 21 iokit                          0x24b6a51d iodispatchcalloutfromcfmessage + 256 22 corefoundation                 0x23bfcbe5 __cfmachportperform + 132 23 corefoundation                 0x23c0d023 __cfrunloop_is_calling_out_to_a_source1_perform_function__ + 34 24 corefoundation                 0x23c0cfbf __cfrunloopdosource1 + 346 25 corefoundation                 0x23c0b5e1 __cfrunlooprun + 1608 26 corefoundation                 0x23b58db1 cfrunlooprunspecific + 476 27 corefoundation                 0x23b58bc3 cfrunloopruninmode + 106 28 graphicsservices               0x2aebb051 gseventrunmodal + 136 29 uikit                          0x27124a31 uiapplicationmain + 1440 30 astrokit                       0x0011ccdb main (main.m:14) 31 libdyld.dylib                  0x31c11aaf start + 2 


Comments