app crash - can't find the cause

Since the last app update i have multiple crashes, but don't know, what the cause of the crash is. I can't reproduce the crashes.
Can anyone give a hint, please?

Crash.log attached:


The mentioned "BestellungArtikel.swift"-file can't be the cause. It is only a data class:

Answered by DTS Engineer in 670443022
Code Block
Last Exception Backtrace:
0 CoreFoundation … __exceptionPreprocess + 220 (NSException.m:199)
1 libobjc.A.dylib … objc_exception_throw + 60 (objc-exception.mm:565)
2 CoreFoundation … +[NSException raise:format:arguments:] + 100 (NSException.m:146)
3 Foundation … -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 132…
4 BaseBoard … __40-[BSAction sendResponse:withCompletion:]_block_invoke + 616 (BSAction.m:446)


The presence of the Last Exception Backtrace indicates that the app crashed because something threw a language exception that went unhandled. Looking up the backtrace to frame 4 its clear that this was done by the OS itself. Looking all the way up that backtrace there’s only one frame (frame 21) that contains your code, and that’s simply main calling UIApplicationMain, which is unlikely to be the cause (-:

It’s likely that this assertion failure would have generated a helpful message in the system log. Unfortunately the crash report doesn’t capture that log, and you can’t reproduce the problem, so it’s hard to work out what that log might be.

Looking at the code for -[BSAction sendResponse:withCompletion:] I suspect that this might be caused by you calling a UIApplication completion handler more than once. Consider this frame:

Code Block
7 BaseBoard -[BSAction sendResponse:withCompletion:] + 140 (BSAction.m:444)
8 UIKitServices -[UISFetchContentInBackgroundAction sendResponse:] + 104 (UISFetchContentInBackgroundAct…
9 UIKitCore __91-[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:compl…


Frame 8 suggests that your app was in the process of handling a background fetch event when this happened. So, my advice is that you examine how your background fetch code deals with the completion handler that it’s passed, making sure that it’s called once and only once.

Oh, and if you can capture a sysdiagnose log from a user who’s having this problem you could look in the enclosed system log for the helpful message I mentioned.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Accepted Answer
Code Block
Last Exception Backtrace:
0 CoreFoundation … __exceptionPreprocess + 220 (NSException.m:199)
1 libobjc.A.dylib … objc_exception_throw + 60 (objc-exception.mm:565)
2 CoreFoundation … +[NSException raise:format:arguments:] + 100 (NSException.m:146)
3 Foundation … -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 132…
4 BaseBoard … __40-[BSAction sendResponse:withCompletion:]_block_invoke + 616 (BSAction.m:446)


The presence of the Last Exception Backtrace indicates that the app crashed because something threw a language exception that went unhandled. Looking up the backtrace to frame 4 its clear that this was done by the OS itself. Looking all the way up that backtrace there’s only one frame (frame 21) that contains your code, and that’s simply main calling UIApplicationMain, which is unlikely to be the cause (-:

It’s likely that this assertion failure would have generated a helpful message in the system log. Unfortunately the crash report doesn’t capture that log, and you can’t reproduce the problem, so it’s hard to work out what that log might be.

Looking at the code for -[BSAction sendResponse:withCompletion:] I suspect that this might be caused by you calling a UIApplication completion handler more than once. Consider this frame:

Code Block
7 BaseBoard -[BSAction sendResponse:withCompletion:] + 140 (BSAction.m:444)
8 UIKitServices -[UISFetchContentInBackgroundAction sendResponse:] + 104 (UISFetchContentInBackgroundAct…
9 UIKitCore __91-[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:compl…


Frame 8 suggests that your app was in the process of handling a background fetch event when this happened. So, my advice is that you examine how your background fetch code deals with the completion handler that it’s passed, making sure that it’s called once and only once.

Oh, and if you can capture a sysdiagnose log from a user who’s having this problem you could look in the enclosed system log for the helpful message I mentioned.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Thanks for pointing this out!
I noticed that it could happen that the completion handler is called twice. But in the simulator it works without problems.
I will release an update of the app and hope that this was the reason.
app crash - can't find the cause
 
 
Q