dotnet / dotnet/maui

[ci-scan] Recurring: CreateTimerNonRepeatingDoesNotRepeat fails with NullReferenceException on macOS ARM64 (maui-pr)

Open
#35,910 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ci-scan
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 14h
Merged PRs (30d)
296

Description

Summary

DispatcherTests.CreateTimerNonRepeatingDoesNotRepeat fails with a NullReferenceException inside the timer callback's async state machine on osx.15.arm64.maui.open, breaking the latest main build.

Build Information

  • Pipeline: maui-pr (definition 302)
  • Build: 1459938
  • Branch: main
  • First seen: 2026-06-11
  • Occurrences: 1 in the last 10 builds (current build is red)

Affected Legs

  • macOS 15 ARM64 — Windows Helix Unit Tests (Debug) → Helix queue osx.15.arm64.maui.open
  • Work item: Microsoft.Maui.UnitTests.dll (ExitCode 1)

Error Message

CreateTimerNonRepeatingDoesNotRepeat [FAIL]
  System.NullReferenceException : Object reference not set to an instance of an object.
  Stack Trace:
    /_/src/Core/tests/UnitTests/Dispatching/DispatcherTests.cs(140,0):
      at Microsoft.Maui.UnitTests.Dispatching.DispatcherTests.<>c
           .<<CreateTimerNonRepeatingDoesNotRepeat>b__10_0>d.MoveNext()
    /_/src/Core/tests/UnitTests/TestClasses/DispatcherStub.cs(148,0):
      at Microsoft.Maui.UnitTests.DispatcherTest.<>c__DisplayClass1_0
           .<<Run>b__0>d.MoveNext()

Microsoft.Maui.UnitTests  Total: 834, Errors: 0, Failed: 1, Skipped: 3

Recommended Action

Investigate DispatcherTests.cs line 140 and DispatcherStub.cs line 148 in src/Core/tests/UnitTests/. The test verifies a non-repeating timer fires exactly once and stops. The NullReferenceException in the async callback suggests the dispatcher's internal timer state or task completion source is null when the callback fires — possibly a race condition or an object that was already disposed. Check recent changes to DispatcherStub (the test helper) or the IDispatcher timer implementation under src/Core/src/Dispatching/.

Generated by CI Failure Scanner · sonnet46 6M ·

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/Core/tests/UnitTests/Dispatching/DispatcherTests.cs at line 140 and src/Core/tests/UnitTests/TestClasses/DispatcherStub.cs at line 148, then inspect the timer implementation under src/Core/src/Dispatching/. Reproduce the failure on the osx.15.arm64.maui.open leg and check recent DispatcherStub changes. Done means CreateTimerNonRepeatingDoesNotRepeat fires exactly once without a NullReferenceException and the unit test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, macos
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.