Description
CoreCLR MAUI template app fails to launch on iOS simulator with APP_LAUNCH_FAILURE (XHarness exit code 83). The app builds successfully but is immediately SIGKILL'd (signal 9) on simulator launch. Mono runtime apps launch fine on the same simulator.
Root Cause
The simulator watchdog handling differs between CoreCLR and Mono apps. For the CoreCLR test, `Xamarin.Hosting` reports "Simulator watchdogs are not disabled" and shuts down/reboots the simulator before launching. After reboot, the simulator goes to `Shutdown` state and the launch fails. For Mono apps, watchdogs are already disabled and the app launches directly without a reboot cycle.
Crash Sequence (from XHarness logs)
```
Xamarin.Hosting: Simulator watchdogs are not disabled for 'iPhone 11 Pro (iOS 18.5)'
Xamarin.Hosting: Shutting down simulator...
xcrun simctl shutdown 94004A3B-...
Xamarin.Hosting: Successfully disabled simulator watchdogs
Xamarin.Hosting: Launching simulator application
Xamarin.Hosting: Ready notification received
Xamarin.Hosting: Launching on iPhone 11 Pro (iOS 18.5) by executing:
xcrun simctl launch --console --terminate-running-process ... com.companyname.teste6b06bb...
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=405):
Unable to lookup in current state: Shutdown
error HE0042: Could not launch the app ... simctl returned exit code 149
```
Device Log (filtered by app)
```
getpwuid_r did not find a match for uid 501
Filtering the log data using "senderImagePath CONTAINS "Teste6b06bb801976599085""
Child process terminated with signal 9: Killed
Process 4759 already exited or busy: No process is associated with this object.
Killing process 4759 as it was cancelled
```
The app never produces any output — killed immediately at launch. No crash report or stack trace.
Comparison: Passing Mono Test vs Failing CoreCLR Test
|
Mono (Test8951 - passes) |
CoreCLR (Teste6b06bb - fails) |
| Watchdogs |
"already disabled" |
"not disabled" → shutdown/reboot |
| Simulator state |
Stays booted |
Goes to Shutdown |
| App launch |
Gets PID, runs normally |
SIGKILL'd (signal 9) immediately |
| simctl exit |
0 |
137 (SIGKILL) then 149 (Shutdown) |
Environment
- Xcode 26.4
- iOS Simulator: iPhone 11 Pro (iOS 18.5)
- SDK: 11.0.100-preview.4.26224.122
- XHarness: 11.0.0-prerelease.26107.1
- Build config: Release, CoreCLR (`-p:UseMonoRuntime=false`)
- Test: `AppleTemplateTests.RunOniOS_MauiRelease_CoreCLR`
Build Reference
PR dotnet/maui#35171, Build 1402884 — `RunOniOS_MauiRelease ARM64` job
Attached Logs
See attached XHarness logs from the failing test run.
Description
CoreCLR MAUI template app fails to launch on iOS simulator with
APP_LAUNCH_FAILURE(XHarness exit code 83). The app builds successfully but is immediately SIGKILL'd (signal 9) on simulator launch. Mono runtime apps launch fine on the same simulator.Root Cause
The simulator watchdog handling differs between CoreCLR and Mono apps. For the CoreCLR test, `Xamarin.Hosting` reports "Simulator watchdogs are not disabled" and shuts down/reboots the simulator before launching. After reboot, the simulator goes to `Shutdown` state and the launch fails. For Mono apps, watchdogs are already disabled and the app launches directly without a reboot cycle.
Crash Sequence (from XHarness logs)
```
Xamarin.Hosting: Simulator watchdogs are not disabled for 'iPhone 11 Pro (iOS 18.5)'
Xamarin.Hosting: Shutting down simulator...
xcrun simctl shutdown 94004A3B-...
Xamarin.Hosting: Successfully disabled simulator watchdogs
Xamarin.Hosting: Launching simulator application
Xamarin.Hosting: Ready notification received
Xamarin.Hosting: Launching on iPhone 11 Pro (iOS 18.5) by executing:
xcrun simctl launch --console --terminate-running-process ... com.companyname.teste6b06bb...
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=405):
Unable to lookup in current state: Shutdown
error HE0042: Could not launch the app ... simctl returned exit code 149
```
Device Log (filtered by app)
```
getpwuid_r did not find a match for uid 501
Filtering the log data using "senderImagePath CONTAINS "Teste6b06bb801976599085""
Child process terminated with signal 9: Killed
Process 4759 already exited or busy: No process is associated with this object.
Killing process 4759 as it was cancelled
```
The app never produces any output — killed immediately at launch. No crash report or stack trace.
Comparison: Passing Mono Test vs Failing CoreCLR Test
Environment
Build Reference
PR dotnet/maui#35171, Build 1402884 — `RunOniOS_MauiRelease ARM64` job
Attached Logs
See attached XHarness logs from the failing test run.