简体   繁体   中英

Why would this app crash 100% when running from Testflight, maybe 10% from Xcode

EDIT: I am going to repost a different version of this - I think I was focusing too hard on the fact it crashes in Testflight and not on the fact it crashes on iPhone but not iPad. (even from TF)

I'm having an annoying problem, and previous similar answers on SO aren't helping much.

I have a game (using Sprite Kit) which sometimes crash when a certain method finishes running. It does this 10% (or less) of the time when I run it on my iPhone 5s from Xcode, but if I upload to Testflight, it does it 100% of the time.

Xcode doesn't give me great debugging info, it shows a green breakpoint line in main.m on this line:

return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));

and on the left panel it says this happens in:

Thread 1:

Queue: com.apple.spritekit.renderQueue 0 SKCRenderer::preprocessSpriteImp(std::__1::vector >&, SKRenderQuadPool&, SKCSprite const*, _GLKMatrix4 const&, float, unsigned int&, bool)const

and I see an EXC_BAD_ACCESS (code=EXC_I386_GPFLT) in this line:

0x1015bc663: movq 16(%rbx), %rcx

I will attach a pic actually of the surrounding stuff

I am bad at debugging and I don't know what to do. One notable thing is that this never happens in the iPad version. I'm very confused as to why it would happen sometimes but not always.

Because of derived data app might not crash while running from xcode. Few bad access are hidden if zombies are enabled.Its all about memory reference and some thing which legally is dead but actually exists at memory location can hide a legitimate bad access.

Try deleting derived data and disable zombies you will get same bad access from xcode as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM