ios - EXC_BAD_ACCESS in main on iPad only -


when test app on ipad can consistently , reliably crash. when does, exc_bad_access error in main, , root cause far obvious. have tried following steps try shed more light on it:

  1. i have enabled zombies. doesn't seem have had affect @ in output, makes me think not zombie issue (but wrong).
  2. i have add exception breakpoint, when app crashes, exception breakpoint doesn't kick in, , standard green arrow next line 16 of main.
  3. i have run analyzer , corrected few minor error revealed there. still, no effect.
  4. i have confirmed same problem occurring 2 of testers receive build via test flight.
  5. i have performed 'clean' 'clean build folder'

here whats weird. when test on ipad app crashes consistently. when test in simulator not crash no matter do. if zombie @ loss how discover object need retained better. further, if test on iphone, app not crash.

where crash occurs: in app, have number of sprite nodes display information, when touch 1 of them (actually, touching child sprite made cancel button), supposed happen remove cancel button's parent parent with:

[[self parent] removefromparent]; 

pic of call stack:

enter image description here

there nothing in console in main xcode window, in console of device (from organizer window:

apr 10 08:50:39 roberts-ipad com.apple.debugserver-310.2[596] <warning>: 69 +0.000164 sec [0254/060b]: far -> 788 apr 10 08:50:39 roberts-ipad com.apple.debugserver-310.2[596] <warning>: 70 +0.000079 sec [0254/060b]: esr -> 796 apr 10 08:50:39 roberts-ipad com.apple.debugserver-310.2[596] <warning>: 71 +0.000081 sec [0254/060b]: exception -> 800 apr 10 08:50:42 roberts-ipad backboardd[31] <error>: hid: 'passive' connection 'bubble fit' access protected services denied. apr 10 08:50:43 roberts-ipad backboardd[31] <warning>: coreanimation: updates deferred long apr 10 08:50:57 roberts-ipad lockdownd[25] <notice>: 01cdc000 _select_socket: receive secure message timeout! apr 10 08:50:57 roberts-ipad lockdownd[25] <notice>: 01cdc000 _receive_message: walk away - non-ssl 1 

up until yesterday thought very, close shipping :p appreciate advice on how shed more light on root cause of exception is. thanks!

update: learncocos2d points out below, may have same spritekit bug links to. suggestion override removefromparent. tried this, produces error:

- (void)removefromparent {     [self removefromparent];     self = nil;      [super removefromparent]; } 

the error produces self cannot assigned outside of init. how should rewrite that?

as turns out, bug in spritekit, further discussed here:

sprite kit ios 7.1 crash on removefromparent

my fix override removefromparent, in skshapenode subclass contained children needed nil'ed before parent removed, thus:

- (void)removefromparent {     [self.addbutton removefromparent];     [self.cancelbutton removefromparent];     self.addbutton = nil;     self.cancelbutton = nil;      [super removefromparent]; } 

the children shape nodes properties of parent.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -