App immediately crashes after re-opening with no crash report

I am trying to diagnose a very strange application crash that occurs intermittently under the following conditions

  • App built in release and installed on iPhone
  • App is in the background (e.g. close the app and open a different app without fully force quitting it)

When these conditions are present, and I re-open the application by clicking on it's icon on the home screen, the app shows briefly on the screen and then immediately quits. This happens maybe 50% of the time when these conditions are present, but it does not create a crash report and there are no jetsam reports from the time of the crash either.

I was able to capture a sysdiagnose immediately after the crash (within 3 seconds), and I have reviewed the logs to help me determine a possible cause, but none of the logs seem to be causing it.

I am putting some potentially relevant log lines below, and I am attaching the logarchive.

Additionally, the entire application is open source here on github, and the crashing :( version of the app is available here on the app store. Note this crash does not happen in the macOS version.

Finally, I saw a previous thread that recommended adding atexit {abort()} to an app that doesn't produce a crash report, so I added that here before collecting these logs and I still don't get a crash report.

Here are some log lines may be relevant, but none of them provide a reason for app termination.

>>> MY APP IS OPENED

default	2025-01-25 13:16:11.060118 -0500	runningboardd	com.apple.runningboard	monitor	Calculated state for app<com.msdrigg.roam(95D1E2E9-9609-44D9-A30A-0C4AEA990A0D)>: running-active (role: UserInteractiveFocal) (endowments: <private>)
default	2025-01-25 13:16:11.060132 -0500	runningboardd	com.apple.runningboard	process	[app<com.msdrigg.roam(95D1E2E9-9609-44D9-A30A-0C4AEA990A0D)>:1758] Set jetsam priority to 100 [0] flag[1]
default	2025-01-25 13:16:11.060132 -0500	runningboardd	com.apple.runningboard	ttl	[app<com.msdrigg.roam(95D1E2E9-9609-44D9-A30A-0C4AEA990A0D)>:1758] Resuming task.
default	2025-01-25 13:16:11.060185 -0500	runningboardd	com.apple.runningboard	ttl	[app<com.msdrigg.roam(95D1E2E9-9609-44D9-A30A-0C4AEA990A0D)>:1758] Set darwin role to: UserInteractiveFocal
info	2025-01-25 13:16:11.062002 -0500	CommCenter	com.apple.CommCenter	ul	BundleID: com.msdrigg.roam is a foreground app

>>> XPC says something about XPC_ERROR_CONNECTION_INTERRUPTED

	com.apple.mDNSResponder	Default	[R9386->Q40264] Question assigned DNS service 125
default	2025-01-25 13:16:11.067097 -0500	Roam	com.apple.xpc	connection	[0x300b94900] Re-initialization successful; calling out to event handler with XPC_ERROR_CONNECTION_INTERRUPTED
default	2025-01-25 13:16:11.067152 -0500	Roam	com.apple.runningboard	monitor	Received state update for 1758 (app<com.msdrigg.roam(95D1E2E9-9609-44D9-A30A-0C4AEA990A0D)>, unknown-NotVisible
info	2025-01-25 13:16:11.068357 -0500	Roam	com.apple.coreaudio

>>>MY APP RUNS AND STARTS LOGGING ON ITS OWN

default	2025-01-25 13:16:11.109376 -0500	Roam	com.msdrigg.roam	ECPWebsocketClient	Clearing handlers
default	2025-01-25 13:16:11.109378 -0500	Roam	com.msdrigg.roam	ECPWebsocketClient	No longer in error b/c restarting
default	2025-01-25 13:16:11.109419 -0500	Roam	com.msdrigg.roam	ECPWebsocketClient	Ignoring state change because it is the same connecting at 2025-01-25 18:16:11 +0000

>>> XPC Connection invalidated

default	2025-01-25 13:16:11.146441 -0500	runningboardd	com.apple.runningboard	process	XPC connection invalidated: [app<com.msdrigg.roam(95D1E2E9-9609-44D9-A30A-0C4AEA990A0D)>:1758]

>>> Launchd reports app exit

default	2025-01-25 13:16:11.150861 -0500	launchd	user/501/UIKitApplication:com.msdrigg.roam[6159][rb-legacy] [1758]		exited due to SIGPIPE | sent by Roam[1758], ran for 4930203ms
default	2025-01-25 13:16:11.150876 -0500	launchd	user/501/UIKitApplication:com.msdrigg.roam[6159][rb-legacy] [1758]		service state: exited

Logs split due to size being too big :(

Answered by DTS Engineer in 822700022

The SIGPIPE is most definitely a ‘smoking gun’. I’ve talked about this before on DevForums but never assembled my thoughts into a coherent whole. That changes today! Check out Debugging Broken Pipes.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi msdrigg,

Looking at your logs, here are few potential causes you may have pay attention to:

Resource Handle and Assertion Issues (roam-crash.1.log)

trying to get apparently bogus resource handle 0

This usually happen because the system attempting to acquire and remove process related to background activities.

App Termination by SIGPIPE (roam-crash.2.log)

exited due to SIGPIPE | sent by Roam[1758], ran for 4930203ms

This typically occurs when the app attempts to interact with a communication channel, which may no longer available.

Network Issues (roam-crash.3.log)

This log captures potential wifi/internet connection issues.

Potential Bluetooth and Location Service Issues (roam-crash.4.log)

Error: Error Domain=RTErrorDomain Code=12 "Client is exceeding maximum call rate!"

I hope that help.

Accepted Answer

The SIGPIPE is most definitely a ‘smoking gun’. I’ve talked about this before on DevForums but never assembled my thoughts into a coherent whole. That changes today! Check out Debugging Broken Pipes.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

App immediately crashes after re-opening with no crash report
 
 
Q