0

For the last few weeks I have been trying to solve a crash which manifested itself seemingly at random. I believe it coincides with a build being created with xcode 12.4 from 12.3. My sync operation started crashing with an EXC_BAD_ACCESS crash in memory.

I'm using an NSOperationQueue. I've tried using zombie objects but because the error is in a block I cannot see them.

My threads look like this:

App thread state while crashing

And the queue view says developerSubmittedBlockToNSManagedObjectContextPerform.

Does anyone have advice for what could be causing the issue? Or alternative ways to track it down? Thanks

2
  • Perhaps TSAN: developer.apple.com/documentation/xcode/… Commented Apr 19, 2021 at 16:23
  • Thank you, I hadn't read about this tool before. I'll give it a try Commented Apr 19, 2021 at 16:39

1 Answer 1

0

For anyone who might have a similar problem, we eventually tracked the issue down to a core data problem with our database links.

There were some missing inverse reletionships between our database entities. The leading theory is that because the relationships dont exist the system will deallocate the context. This will then throw the unhelpful threading issue.

These relationships have been in this state for years and we think that in a recent excode update, the memory managment system may have been updated which exposed the issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.