EXC_BAD_ACCESS after upgrading to iOS8 SpriteKit game

后端 未结 2 508
被撕碎了的回忆
被撕碎了的回忆 2021-01-22 18:26

SpriteKit game crashes with EXC_BAD_ACCESS after upgrading to iOS8. Happens at random time, for no apparent reason, after playing a while. Exception breakpoint, as well as enabl

2条回答
  •  星月不相逢
    2021-01-22 18:56

    So, apparently the problem was in removeFromParent.

    After changing:

    SKAction *remove = [SKAction removeFromParent];
    [self runAction:[SKAction sequence:@[wait, remove]]];
    

    to:

    [self runAction:wait completion:^{
        [self removeFromParent];
    }];
    

    the error has gone, but another one appeared:

    SpriteKit`SKCShapeSprite::getAccumulatedBounds()
    

    Please head to SpriteKit: EXC_BAD_ACCESS SpriteKit`SKCShapeSprite::getAccumulatedBounds() crash for details.

    UPDATE: It turned out that I got ahead of myself: error popped up again after several hours. Now I have two kinds of unsolvable issues, and thinking of rewriting the game from the ground up specifically for iOS8.

提交回复
热议问题