I am seeing this report in Bugsnag where the root ...
# coroutines
b
I am seeing this report in Bugsnag where the root exception is swallowed. Has anyone seen something similar before or have tips on how to best find the true root cause?
Copy code
0  libsystem_kernel.dylib  ___pthread_kill
1  libsystem_pthread.dylib _pthread_kill
2  libsystem_c.dylib       _abort
3  BaseBetaiOS             konan::abort() (BaseBetaiOS)
4  BaseBetaiOS             (anonymous namespace)::terminateWithUnhandledException(ObjHeader*)::$_1::operator()() const (BaseBetaiOS)
5  BaseBetaiOS             void (anonymous namespace)::$_0::operator()<(anonymous namespace)::terminateWithUnhandledException(ObjHeader*)::$_1>((anonymous namespace)::terminateWithUnhandledException(ObjHeader*)::$_1) (BaseBetaiOS)
6  BaseBetaiOS             (anonymous namespace)::terminateWithUnhandledException(ObjHeader*) (BaseBetaiOS)
7  BaseBetaiOS             (anonymous namespace)::processUnhandledException(ObjHeader*) (BaseBetaiOS)
8  BaseBetaiOS             kfun:kotlinx.coroutines#handleCoroutineException(kotlin.coroutines.CoroutineContext;kotlin.Throwable){} (BaseBetaiOS)
9  BaseBetaiOS             kfun:kotlinx.coroutines.StandaloneCoroutine.handleJobException#internal (BaseBetaiOS)
10 BaseBetaiOS             kfun:kotlinx.coroutines.JobSupport.finalizeFinishingState#internal (BaseBetaiOS)
11 BaseBetaiOS             kfun:kotlinx.coroutines.JobSupport.tryMakeCompleting#internal (BaseBetaiOS)
12 BaseBetaiOS             kfun:kotlinx.coroutines.JobSupport#makeCompletingOnce(kotlin.Any?){}kotlin.Any? (BaseBetaiOS)
13 BaseBetaiOS             kfun:kotlinx.coroutines.AbstractCoroutine#resumeWith(kotlin.Result<1:0>){} (BaseBetaiOS)
14 BaseBetaiOS             kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} (BaseBetaiOS)
15 BaseBetaiOS             kfun:kotlinx.coroutines.DispatchedTask#run(){} (BaseBetaiOS)
16 BaseBetaiOS             kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$693.$<bridge-UNN>invoke(){}#internal (BaseBetaiOS)
17 BaseBetaiOS             ___6f72672e6a6574627261696e732e6b6f746c696e783a6b6f746c696e782d636f726f7574696e65732d636f7265_knbridge762_block_invoke (BaseBetaiOS)
18 libdispatch.dylib       __dispatch_call_block_and_release
19 libdispatch.dylib       __dispatch_client_callout
20 libdispatch.dylib       __dispatch_root_queue_drain
21 libdispatch.dylib       __dispatch_worker_thread2
22 libsystem_pthread.dylib __pthread_wqthread
r
It looks like there's an uncaught exception in a
CoroutineScope
.
konan::abort()
indicates a fatal Kotlin exception. You can use something like NSExceptionKt or Kermit to log the Kotlin exception.
b
Wow, don't know how NXExceptionKt did not show up in my google search, but it's pretty much 100% perfect match for the problem I am running into. thank you! Looking forward to getting to identifying the root cause
made a small PR to update the readme https://github.com/rickclephas/NSExceptionKt/pull/5