I also believed it was preventing me from publishing to testflight but its not. Go look in AppConnect, the build is there..
Ignore and move on for now I guess.
Post
Replies
Boosts
Views
Activity
Here are a few things I found that helped.
I have 3 MOCs. The Private(root/parent) then two, one for UI and one for data Sync engine( no tracking). I did as SiWeiLiFox posted and no longer used NSPrivateQueueConcurrencyType on my SyncingMoc and Private(root/parent) Moc. This solved the Random excbadaccess I would get on
[[self managedObjectContext] refreshAllObjects];
or when running
if (![moc save:&error])
the frustrating thing about the one above is that it crashes before it runs the moc save so you cant even catch the error.
It can also lead to data loss because the error might not show and all data changes after these errors are on the data stack might never be committed to the disk so they are lost upon app restart.
The biggest thing I found was passing objects to Views for editing, then using the object.ManageObjectContext to save the object. The object.moc is a weak reference and GC in ios 14 really likes to throw the moc away.
I migrated my UI to a shared instance of the MOC and combed the code over and over again for the references to object.moc and the app is more stable than it was before ios14. I'm not sure what blog I picked up the habit of using object.moc but its apparently a bad one.
Good luck to all with these issues, I hope some of these tips help others.
We are seeing this as well. The only thing we really changed was we built the code against ios 14 and released it to the users. Raygun is reporting lots of crashes, but only a few users are reporting them to us. I checked and we have PerformBlackandWait around the MOC save calls. We have Parent and Child MOC so the app can sync data to the cloud etc.
The crashes happen on the parent MOC Save. We also get errors like
Exception EXCBADACCESS, Code 190968208, Subcode 8 Attempted to dereference garbage pointer 0x50b61f190.
The file “MyAppDatabase.sqlite” couldn’t be opened.
An error occurred while saving.
We are going to revert back to xcode 11.7 until apple can fix this.