You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example app I get the following EXC_BAD_ACCESS error when I have created a person. You can reproduce it by creating a new person after logging in. After that you directly try to edit this record by clicking on it. The error is produced because the record is not yet inserted (as far as I can tell). After restarting the app (and probably trigger something that actually saves the record) the person can be clicked and therefore edited.
The method that triggers the EXC_BAD_ACCESS is: updateInterfaceForCurrentPerson
In the debugger a PO of self.person shows this:
(Person *) $1 = 0x07a2ffa0 <Person: 0x7a2ffa0> (entity: CDPerson; id: 0x9055ee0 x-coredata://05BD5986-FA3C-4F0D-9025-4A34FB52291D/CDPerson/tE9FFF278-49AE-4C11-8BE6-B29EC909B1A02 ; data: )
After a restart a PO of self.person shows this:
(Person *) $1 = 0x0f691360 <Person: 0xf691360> (entity: CDPerson; id: 0x7d9b8a0 x-coredata://05BD5986-FA3C-4F0D-9025-4A34FB52291D/CDPerson/p2 ; data: )
The text was updated successfully, but these errors were encountered:
I found the solution to this, the MagicalRecord supplied with the example is outdated. I updated the version with the current one and after changing 3 calls to method in FTASyncHandler.m:
[[NSManagedObjectContext MR_contextForCurrentThread] MR_saveErrorHandler:^(NSError *error){
into:
[[NSManagedObjectContext MR_contextForCurrentThread] MR_saveWithErrorCallback:^(NSError *error){
all was working correctly in the example!
Glad you got it working! It looks like you were getting temporary object IDs, which was fixed in Magical Record here: magicalpanda/MagicalRecord@0b00e39
It looks like Magical Record recently removed the MR_saveErrorHandler: method (magicalpanda/MagicalRecord@f7c4350) so FTASync needs updated to account for that.
In the example app I get the following EXC_BAD_ACCESS error when I have created a person. You can reproduce it by creating a new person after logging in. After that you directly try to edit this record by clicking on it. The error is produced because the record is not yet inserted (as far as I can tell). After restarting the app (and probably trigger something that actually saves the record) the person can be clicked and therefore edited.
The method that triggers the EXC_BAD_ACCESS is: updateInterfaceForCurrentPerson
In the debugger a PO of self.person shows this:
(Person *) $1 = 0x07a2ffa0 <Person: 0x7a2ffa0> (entity: CDPerson; id: 0x9055ee0 x-coredata://05BD5986-FA3C-4F0D-9025-4A34FB52291D/CDPerson/tE9FFF278-49AE-4C11-8BE6-B29EC909B1A02 ; data: )
After a restart a PO of self.person shows this:
(Person *) $1 = 0x0f691360 <Person: 0xf691360> (entity: CDPerson; id: 0x7d9b8a0 x-coredata://05BD5986-FA3C-4F0D-9025-4A34FB52291D/CDPerson/p2 ; data: )
The text was updated successfully, but these errors were encountered: