Skip to content
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

ForestDB: Assertion failure in -[MYBackgroundMonitor beginBackgroundTaskNamed:]() MYBackgroundMonitor.m:66 #1461

Closed
pahmed opened this issue Sep 26, 2016 · 5 comments
Milestone

Comments

@pahmed
Copy link

pahmed commented Sep 26, 2016

This crash happens with me a lot sometimes after sending the app to background

Assertion failure in -[MYBackgroundMonitor beginBackgroundTaskNamed:](), /Users/jenkins/jenkins/workspace/couchbase-lite-ios-builds/couchbase-lite-ios-community/vendor/MYUtilities/MYBackgroundMonitor.m:66

The backtrace is attached

forestdb_bg_crash.txt


  • Version: 1.3.1 (ForestDB)
  • Client OS: iOS 9
@snej
Copy link
Contributor

snej commented Sep 26, 2016

Hm, this was supposed to be fixed in 1.3; see #1152 and #1368.

@snej
Copy link
Contributor

snej commented Sep 26, 2016

* thread #1: tid = 0x62116, 0x232cfc5c libsystem_kernel.dylib`__pthread_kill + 8, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x232cfc5c libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x23375b46 libsystem_pthread.dylib`pthread_kill + 62
    frame #2: 0x232640c4 libsystem_c.dylib`abort + 108
    frame #3: 0x00928af6 xxxx`uncaught_exception_handler + 26
    frame #4: 0x23641e48 CoreFoundation`__handleUncaughtException + 644
    frame #5: 0x22dff086 libobjc.A.dylib`_objc_terminate() + 174
    frame #6: 0x22df0e16 libc++abi.dylib`std::__terminate(void (*)()) + 78
    frame #7: 0x22df08f6 libc++abi.dylib`__cxa_rethrow + 102
    frame #8: 0x22dfef46 libobjc.A.dylib`objc_exception_rethrow + 42
    frame #9: 0x2355024e CoreFoundation`CFRunLoopRunSpecific + 650
    frame #10: 0x2354ffbc CoreFoundation`CFRunLoopRunInMode + 108
    frame #11: 0x24b6caf8 GraphicsServices`GSEventRunModal + 160
    frame #12: 0x27c8a434 UIKit`UIApplicationMain + 144
  * frame #13: 0x001fabd0 xxxx`main(argc=1, argv=0x014c0b10) + 106 at main.m:15
    frame #14: 0x231fc872 libdyld.dylib`start + 2

This is an uncaught exception, most likely an assertion failure. Information about the exception should be logged to the console; can you please add any console warning/errors from the time of the crash?

@snej
Copy link
Contributor

snej commented Sep 29, 2016

Never mind, the assertion failure log is at the top of the bug report.

@djpongh djpongh added icebox and removed backlog labels Nov 17, 2016
@snej
Copy link
Contributor

snej commented Dec 16, 2016

#1521 looks like a dup of this.

@jprosevear
Copy link

This might be pretty straightforward, here is the template app comment from Apple:

(void)applicationDidEnterBackground:(UIApplication *)application {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

I believe this means applicationWillTerminate will get called twice, so the background task maybe started again while the previous invocation is still running, causing the assertion MYBackgroundMonitor.m.

@pasin pasin closed this as completed in 50cc50a Dec 19, 2016
@pasin pasin removed the icebox label Dec 19, 2016
@pasin pasin added this to the 1.4.0 milestone Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants