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
I have a crash concerning the MYBackgroundMonitor project. I have no steps to reproduce, only a stacktrace :
-[MYBackgroundMonitor hasBackgroundTask]: message sent to deallocated instance 0x17484bd60
Thread 1Queue : com.apple.main-thread (serial)
#0 0x00000001856151c4 in forwarding () #1 0x000000018550e80c in _CF_forwarding_prep_0 () #2 0x00000001004400e0 in __56-[CBLRestReplicator(Backgrounding) okToEndBackgrounding]_block_invoke at couchbase-lite-ios/Source/CBLRestReplicator+Backgrounding.m:70 #3 0x00000001044c9258 in _dispatch_call_block_and_release () #4 0x00000001044c9218 in _dispatch_client_callout () #5 0x00000001044ce280 in _dispatch_main_queue_callback_4CF () #6 0x00000001855be810 in CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE () #7 0x00000001855bc3fc in __CFRunLoopRun () #8 0x00000001854ea2b8 in CFRunLoopRunSpecific () #9 0x0000000186f9e198 in GSEventRunModal () #10 0x000000018b5317fc in -[UIApplication _run] () #11 0x000000018b52c534 in UIApplicationMain () #13 0x00000001844cd5b8 in start ()
Enqueued from com.apple.root.default-qos.overcommit (Thread 58)Queue : com.apple.root.default-qos.overcommit (serial)
#0 0x00000001044d4b30 in _dispatch_queue_push () #1 0x0000000100440098 in -[CBLRestReplicator(Backgrounding) okToEndBackgrounding] at couchbase-lite-ios/Source/CBLRestReplicator+Backgrounding.m:69 #2 0x00000001003d57d0 in -[CBLRestReplicator updateActive] at couchbase-lite-ios/Source/CBLRestReplicator.m:521 #3 0x00000001003d674c in __45-[CBLRestReplicator fetchRemoteCheckpointDoc]_block_invoke at couchbase-lite-ios/Source/CBLRestReplicator.m:759 #4 0x00000001003ee214 in -[CBLRemoteRequest respondWithResult:error:] at couchbase-lite-ios/Source/CBLRemoteRequest.m:192 #5 0x00000001003efea0 in -[CBLRemoteJSONRequest didFinishLoading] at couchbase-lite-ios/Source/CBLRemoteRequest.m:600 #6 0x000000010041bfd0 in __57-[CBLRemoteSession URLSession:task:didCompleteWithError:]_block_invoke at couchbase-lite-ios/Source/CBLRemoteSession.m:329 #7 0x0000000186125048 in __NSThreadPerformPerform () #8 0x00000001855beb5c in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION () #9 0x00000001855be4a4 in __CFRunLoopDoSources0 () #10 0x00000001855bc0a4 in __CFRunLoopRun () #11 0x00000001854ea2b8 in CFRunLoopRunSpecific () #12 0x000000018602726c in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] () #13 0x00000001003d200c in -[CBL_RunLoopServer runServerThread] at couchbase-lite-ios/Source/CBL_Server.m:193 #14 0x0000000186124e68 in NSThread__start () #15 0x00000001846a5850 in _pthread_body () #16 0x00000001846a5760 in _pthread_start () #17 0x00000001846a2d94 in thread_start ()
CouchbaseLite (58)#0 0x0000000184056f80 in objc_opt::objc_stringhash_t::getIndex(char const*) const () #1 0x0000000184056ebc in objc_opt::objc_selopt_t::get(char const*) const () #2 0x0000000184056d64 in __sel_registerName(char const*, int, int) () #3 0x0000000184054450 in fixupMethodList(method_list_t*, bool, bool) () #4 0x0000000184053d3c in prepareMethodLists(objc_class*, method_list_t**, int, bool, bool) () #5 0x000000018404d350 in realizeClass(objc_class*) () #6 0x000000018404abec in _class_getNonMetaClass () #7 0x0000000184050c50 in lookUpImpOrForward () #8 0x000000018405b298 in _objc_msgSend_uncached () #9 0x00000001003d75dc in -[CBLRestPuller startChangeTracker] at couchbase-lite-ios/Source/CBLRestPuller.m:107 #10 0x00000001003d7498 in -[CBLRestPuller beginReplicating] at couchbase-lite-ios/Source/CBLRestPuller.m:94 #11 0x00000001003d6700 in __45-[CBLRestReplicator fetchRemoteCheckpointDoc]_block_invoke at couchbase-lite-ios/Source/CBLRestReplicator.m:757 #12 0x00000001003ee214 in -[CBLRemoteRequest respondWithResult:error:] at couchbase-lite-ios/Source/CBLRemoteRequest.m:192 #13 0x00000001003efea0 in -[CBLRemoteJSONRequest didFinishLoading] at couchbase-lite-ios/Source/CBLRemoteRequest.m:600 #14 0x000000010041bfd0 in __57-[CBLRemoteSession URLSession:task:didCompleteWithError:]_block_invoke at couchbase-lite-ios/Source/CBLRemoteSession.m:329 #15 0x0000000186125048 in __NSThreadPerformPerform () #16 0x00000001855beb5c in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION () #17 0x00000001855be4a4 in __CFRunLoopDoSources0 () #18 0x00000001855bc0a4 in __CFRunLoopRun () #19 0x00000001854ea2b8 in CFRunLoopRunSpecific () #20 0x000000018602726c in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] () #21 0x00000001003d200c in -[CBL_RunLoopServer runServerThread] at couchbase-lite-ios/Source/CBL_Server.m:193 #22 0x0000000186124e68 in NSThread__start () #23 0x00000001846a5850 in _pthread_body () #24 0x00000001846a5760 in _pthread_start () #25 0x00000001846a2d94 in thread_start ()
Version: 1.3.1
Client OS: IOS 10.2.1
The text was updated successfully, but these errors were encountered:
I haven't investigated the issue yet but in 1.4.0 @snej did some improvement and fixed some issues around backgrounding. You may try with 1.4.0 release and see if it helps the issue.
* There is a race condition between resetting _bgMonitor to nil in -endBackground on the replicator thread and accessing _bgMonitor in -okToEndBackgrounding on the main thread.
* The easiest way to fix this is to not resetting nil after stopping the bgMonitor given the fact that it could also be recreated again from the replicator thread in the -setupBackgrounding method.
#1677 #CBSE-4145
Hi,
I have a crash concerning the MYBackgroundMonitor project. I have no steps to reproduce, only a stacktrace :
-[MYBackgroundMonitor hasBackgroundTask]: message sent to deallocated instance 0x17484bd60
Thread 1Queue : com.apple.main-thread (serial)
#0 0x00000001856151c4 in forwarding ()
#1 0x000000018550e80c in _CF_forwarding_prep_0 ()
#2 0x00000001004400e0 in __56-[CBLRestReplicator(Backgrounding) okToEndBackgrounding]_block_invoke at couchbase-lite-ios/Source/CBLRestReplicator+Backgrounding.m:70
#3 0x00000001044c9258 in _dispatch_call_block_and_release ()
#4 0x00000001044c9218 in _dispatch_client_callout ()
#5 0x00000001044ce280 in _dispatch_main_queue_callback_4CF ()
#6 0x00000001855be810 in CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE ()
#7 0x00000001855bc3fc in __CFRunLoopRun ()
#8 0x00000001854ea2b8 in CFRunLoopRunSpecific ()
#9 0x0000000186f9e198 in GSEventRunModal ()
#10 0x000000018b5317fc in -[UIApplication _run] ()
#11 0x000000018b52c534 in UIApplicationMain ()
#13 0x00000001844cd5b8 in start ()
Enqueued from com.apple.root.default-qos.overcommit (Thread 58)Queue : com.apple.root.default-qos.overcommit (serial)
#0 0x00000001044d4b30 in _dispatch_queue_push ()
#1 0x0000000100440098 in -[CBLRestReplicator(Backgrounding) okToEndBackgrounding] at couchbase-lite-ios/Source/CBLRestReplicator+Backgrounding.m:69
#2 0x00000001003d57d0 in -[CBLRestReplicator updateActive] at couchbase-lite-ios/Source/CBLRestReplicator.m:521
#3 0x00000001003d674c in __45-[CBLRestReplicator fetchRemoteCheckpointDoc]_block_invoke at couchbase-lite-ios/Source/CBLRestReplicator.m:759
#4 0x00000001003ee214 in -[CBLRemoteRequest respondWithResult:error:] at couchbase-lite-ios/Source/CBLRemoteRequest.m:192
#5 0x00000001003efea0 in -[CBLRemoteJSONRequest didFinishLoading] at couchbase-lite-ios/Source/CBLRemoteRequest.m:600
#6 0x000000010041bfd0 in __57-[CBLRemoteSession URLSession:task:didCompleteWithError:]_block_invoke at couchbase-lite-ios/Source/CBLRemoteSession.m:329
#7 0x0000000186125048 in __NSThreadPerformPerform ()
#8 0x00000001855beb5c in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION ()
#9 0x00000001855be4a4 in __CFRunLoopDoSources0 ()
#10 0x00000001855bc0a4 in __CFRunLoopRun ()
#11 0x00000001854ea2b8 in CFRunLoopRunSpecific ()
#12 0x000000018602726c in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] ()
#13 0x00000001003d200c in -[CBL_RunLoopServer runServerThread] at couchbase-lite-ios/Source/CBL_Server.m:193
#14 0x0000000186124e68 in NSThread__start ()
#15 0x00000001846a5850 in _pthread_body ()
#16 0x00000001846a5760 in _pthread_start ()
#17 0x00000001846a2d94 in thread_start ()
CouchbaseLite (58)#0 0x0000000184056f80 in objc_opt::objc_stringhash_t::getIndex(char const*) const ()
#1 0x0000000184056ebc in objc_opt::objc_selopt_t::get(char const*) const ()
#2 0x0000000184056d64 in __sel_registerName(char const*, int, int) ()
#3 0x0000000184054450 in fixupMethodList(method_list_t*, bool, bool) ()
#4 0x0000000184053d3c in prepareMethodLists(objc_class*, method_list_t**, int, bool, bool) ()
#5 0x000000018404d350 in realizeClass(objc_class*) ()
#6 0x000000018404abec in _class_getNonMetaClass ()
#7 0x0000000184050c50 in lookUpImpOrForward ()
#8 0x000000018405b298 in _objc_msgSend_uncached ()
#9 0x00000001003d75dc in -[CBLRestPuller startChangeTracker] at couchbase-lite-ios/Source/CBLRestPuller.m:107
#10 0x00000001003d7498 in -[CBLRestPuller beginReplicating] at couchbase-lite-ios/Source/CBLRestPuller.m:94
#11 0x00000001003d6700 in __45-[CBLRestReplicator fetchRemoteCheckpointDoc]_block_invoke at couchbase-lite-ios/Source/CBLRestReplicator.m:757
#12 0x00000001003ee214 in -[CBLRemoteRequest respondWithResult:error:] at couchbase-lite-ios/Source/CBLRemoteRequest.m:192
#13 0x00000001003efea0 in -[CBLRemoteJSONRequest didFinishLoading] at couchbase-lite-ios/Source/CBLRemoteRequest.m:600
#14 0x000000010041bfd0 in __57-[CBLRemoteSession URLSession:task:didCompleteWithError:]_block_invoke at couchbase-lite-ios/Source/CBLRemoteSession.m:329
#15 0x0000000186125048 in __NSThreadPerformPerform ()
#16 0x00000001855beb5c in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION ()
#17 0x00000001855be4a4 in __CFRunLoopDoSources0 ()
#18 0x00000001855bc0a4 in __CFRunLoopRun ()
#19 0x00000001854ea2b8 in CFRunLoopRunSpecific ()
#20 0x000000018602726c in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] ()
#21 0x00000001003d200c in -[CBL_RunLoopServer runServerThread] at couchbase-lite-ios/Source/CBL_Server.m:193
#22 0x0000000186124e68 in NSThread__start ()
#23 0x00000001846a5850 in _pthread_body ()
#24 0x00000001846a5760 in _pthread_start ()
#25 0x00000001846a2d94 in thread_start ()
Version: 1.3.1
Client OS: IOS 10.2.1
The text was updated successfully, but these errors were encountered: