-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash during signOutAndRemoveLocalData:YES #424
Comments
@CapoChino thanks for the report!, Would it be possible to get the full crashlog? (all of the threads, + if possible, console logs). This seems to be breaking in NSFetchedResultsController (i'm not quite sure what might be causing this, though). Thank you! |
Hi Jorge, I've been having trouble using NSFetchedResultsController ("FRC") with Simperium. So I decided to take out the FRC and do a more simple pull-to-refresh scheme. This will reload the table data from the database. This approach seems to be more stable. Perhaps this issue was caused by a bug in my FRC implementation as all the entities were deleted by Simperium. It's OK with me to close this bug. I'll let you know if I integrate FRC again and have issues. Thanks, |
@CapoChino That's not good.. the FRC itself was triggering entity deletions?. We did experience a DeadLock between FRC and the NSManagedObjectContext architecture we were using (addressed in #376), but so far, we haven't seen a FRC nuking entities. Were you running code, explicitly, against the MOC? (or it was a simple FRC integration with the MainMOC + a NSFetchRequest instance?). Thank you! |
@jleandroperez I didn't initially realize this was related to FRC because at the point in my app where I sign out, there is no live FRC. Perhaps the problem was I didn't clean up the FRC when the view went away, and so some notification subscriptions were still active.. Anyway, no my FRC was not changing or deleting model objects. It appears in the crash here it was trying to respond to the deletes performed by Simperium during the sign-out. My FRC implementation wasn't quite straightforward though, which is probably why I had bugs in it. The issue is that my FRC was used to manage 1 section in a table containing 2 or 3 sections. The other sections were not managed by the FRC. The number of those sections and the rows therein were interdependent. They were also dependent on a GPS location callback happening, which is asynchronous. This made my table (with FRC) hard (for me) to get right. |
@CapoChino Sorry about the late reply on this one!. I've been unable to repro this crash. From what you mention, it sounds highly likely that there was a memory leak somehow, and the FRC was getting a notification, when there should have never been a FRC active. If anything, please, let us know. Thank you! |
Hi,
I'm dusting off my Simperium integration in hopes that the bug I was hitting a fews months ago (#250) has been fixed. I'm using the develop branch. (Should I use master instead?)
I called signOutAndRemoveLocalData as follows:
[theSimperium signOutAndRemoveLocalData:YES completion:^{
NSLog(@"Finished logging out.");
isSigningOut = NO;
[self updateInterface];
}];
It's worked fine several times, but just now it crashed. I don't know if it will reproduce. Following is the trace. Let me know if there's anything else you need.
Thank you!
Cheers,
Casey
objc_msgSend + 23, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) frame #0: 0x000000010bd35017 libobjc.A.dylib
objc_msgSend + 23frame Obj-C framework defines categories on NSDate and NSString without prefixes #1: 0x00000001097428bd CoreData
__77-[NSFetchedResultsController(PrivateMethods) _managedObjectContextDidChange:]_block_invoke + 2045 frame #2: 0x0000000109673f06 CoreData
developerSubmittedBlockToNSManagedObjectContextPerform + 198frame Python versions < 2.6 #3: 0x0000000109673de1 CoreData
-[NSManagedObjectContext performBlockAndWait:] + 241 frame #4: 0x00000001097420a7 CoreData
-[NSFetchedResultsController(PrivateMethods) _managedObjectContextDidChange:] + 119frame OSX fails to authenticate #5: 0x000000010c671cec CoreFoundation
__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12 frame #6: 0x000000010c5718a4 CoreFoundation
_CFXNotificationPost + 2484frame Table Cell Redraw Issue #7: 0x000000010aeb06b8 Foundation
-[NSNotificationCenter postNotificationName:object:userInfo:] + 66 frame #8: 0x0000000109659c96 CoreData
-[NSManagedObjectContext(_NSInternalNotificationHandling) _postObjectsDidChangeNotificationWithUserInfo:] + 70frame Synchronization status #9: 0x00000001096e2d1e CoreData
-[NSManagedObjectContext(_NSInternalChangeProcessing) _createAndPostChangeNotification:withDeletions:withUpdates:withRefreshes:] + 334 frame #10: 0x00000001096553d1 CoreData
-[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 2897frame iOS: Deleting object (tree) gives 409 errors and doesn't sync #11: 0x00000001096588f3 CoreData`-[NSManagedObjectContext save:] + 131
-[SPCoreDataStorage deleteAllObjectsForBucketName:](self=0x00007ff862107020, _cmd=0x00000001087a7ca3, bucketName=0x00007ff860dfa420) + 1078 at SPCoreDataStorage.m:315 frame #13: 0x00000001085d5061 MyApp
-[SPBucket deleteAllObjects](self=0x00007ff862410c00, _cmd=0x00000001087a2556) + 113 at SPBucket.m:116frame Relationships Must Be Marked As Optional #14: 0x000000010c5ebe80 CoreFoundation
-[NSArray makeObjectsPerformSelector:] + 224 frame #15: 0x0000000108579891 MyApp
-[Simperium _finishSignout:completion:](self=0x00007ff860fddcf0, _cmd=0x00000001087a253b, remove=true, completion=0x00007ff862623ee0) + 449 at Simperium.m:610frame Simperium crashes on 10.7.4!! #16: 0x00000001085795eb MyApp
__50-[Simperium signOutAndRemoveLocalData:completion:]_block_invoke370(.block_descriptor=<unavailable>) + 59 at Simperium.m:600 frame #17: 0x000000010c049ba6 libdispatch.dylib
_dispatch_call_block_and_release + 12frame iOS: Storing Plain Text Password in NSUserDefaults #18: 0x000000010c0677f4 libdispatch.dylib
_dispatch_client_callout + 8 frame #19: 0x000000010c0508fb libdispatch.dylib
_dispatch_main_queue_callback_4CF + 949frame Please add error messages to the create/authenticate methods in SPAuthenticationManager #20: 0x000000010c609fe9 CoreFoundation
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 frame #21: 0x000000010c5cceeb CoreFoundation
__CFRunLoopRun + 2043frame Crash when the Simperium object deallocates #22: 0x000000010c5cc486 CoreFoundation
CFRunLoopRunSpecific + 470 frame #23: 0x000000010e6959f0 GraphicsServices
GSEventRunModal + 161frame iOS/Mac: Verbose logging is always on #24: 0x0000000109bfb420 UIKit
UIApplicationMain + 1282 frame #25: 0x0000000108496d77 MyApp
main(argc=1, argv=0x00007fff5776a318) + 71 at main.m:14frame Fix bug when creating object using ruby library #26: 0x000000010c09c145 libdyld.dylib`start + 1
The text was updated successfully, but these errors were encountered: