Skip to content

[CI] DotNetWatch CoreCLR Hot Reload crashes with Bad IL range #26470

Description

@dalexsoto

Failure signature

Xamarin.Tests.DotNetWatchTest.DotNetWatch using CoreCLR fails after applying a Hot Reload edit:

dotnet watch 🔥 C# and Razor changes applied
Unhandled exception. System.BadImageFormatException: Bad IL range.
   at HotReloadTestApp.Program.DoSomething(Int32 i)

The app builds and launches successfully, receives the edit, then crashes before the watched variable changes. The test reports Timed out waiting for the variable to change.

Confirmed monitored occurrences

PR / head Azure run / job Tests Worker
#26454 / b956034e64eae11ea91afcec93b11996be9adbe0 15086535 — dotnettests_ios 1 AcesShared 30
#26454 / same head 15086535 — dotnettests_maccatalyst 2 (sandbox off/on) AcesShared 21
#26454 / 918e83b75ed8152cb415cc7627e51ce69bc3124a 15088820 — dotnettests_ios 1 AcesShared 27
#26454 / same head 15088820 — dotnettests_maccatalyst 2 (sandbox off/on) AcesShared 9
#26454 / 3adbceca8e2a7ceb62aaf29c8d03633fd7d3fea2 15090225 — dotnettests_ios 1 AcesShared 6
#26454 / same head 15090225 — dotnettests_maccatalyst 2 (sandbox off/on) AcesShared 14
#26356 / ac84fef62c4a0babd9079876486d13e12f888133 15090832 — dotnettests_ios 1 AcesShared 67

Total: 10 confirmed test occurrences across 2 distinct monitored PRs, 4 heads, and 4 Azure runs.

First terminal occurrence: 2026-08-25T09:11:52Z. Latest terminal occurrence: 2026-08-25T17:06:44Z.

Classification and impact

Deterministic test/source-runtime failure. The same post-edit exception reproduces on iOS and Mac Catalyst, with and without Mac Catalyst sandboxing, across multiple heads and two dependency-update PRs. Builds and app launches succeed; the failure begins after Hot Reload applies the update. Unchanged retries are not appropriate.

This blocks the affected dotnettests_ios / dotnettests_maccatalyst jobs and can keep dependency-update PR CI red.

Investigation performed

Workaround

No validated workaround is known. The CoreCLR Hot Reload edit/runtime behavior requires investigation. Do not retry unchanged heads merely to see whether the deterministic crash clears.

Azure logs and artifacts are retention-limited.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIf an issue is a bug or a pull request a bug fix

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions