I don't understand. Aren't all these tools you mention (Zombies instrument, ASan, Main Thread Checker etc.) meant to be run in Xcode or Instruments? Or are you saying I should enable some compiler flag in my production build?
The thing that makes over-release issues (and most other memory crashes ) hard to debug is that the crash log you’re looking at is NOT why your app crashed.
I'm not sure I understand. Is it correct that the line in the crash log
myEntity.image = newImage
is trying to retain an image that was over-released or is being deallocated, but the thing that over-released it is possibly somewhere else?
What thread is myEntity.image accessed on?
I mentioned in my original post that it's called on the main thread, and I just checked again and can confirm it. Just to be sure, I'll put a
if !Thread.isMainThread {
preconditionFailure()
}
in the next app update, so there won't be a shadow of a doubt anymore. Though it will take a couple weeks before the update is published and the first crash reports will start coming in again.
This brings me to:
Seeing that code wouldn't actually help.
Even not if we assume that it all happens on the main thread? Could there be something else wrong with my code, or could this be a bug in how these images are created by Foundation / AppKit?
Topic:
UI Frameworks
SubTopic:
AppKit
Tags: