-
Notifications
You must be signed in to change notification settings - Fork 800
Closed
Labels
bugSomething isn't workingSomething isn't workingneeds-triageIssue needs to be triaged by the area ownersIssue needs to be triaged by the area owners
Description
Describe the bug
Minimal reproducer: https://github.com/paperchalice/DataRace-20251215 or DataRace-20251215-main.zip
The behavior is similar to data race but I'm not sure. Control flow will always enter the true branch after navigating back.
Why is this important?
This behavior is incorrect when debugging.
Steps to reproduce the bug
- Clone the repository.
- Target to .NET 10 (Default in this project).
- Add a break point at line 44 in
MainPage.xaml.cs - Debug project.
- Continue
- Click ClickMe.
- Click GoBack.
- Use step over to see the result when debugging.
You can repeat steps 5-8 to see result:
s_flag: False
s_flag: True
s_flag: True
...
Actual behavior
Control flow always step into if body, the Debug output is
s_flag: False
s_flag: True
s_flag: True
...
Expected behavior
Debugger will skip if body after first break point hit, Debug output should be:
s_flag: False
Screenshots
NuGet package version
WinUI 3 - Windows App SDK 1.8.3: 1.8.251106002
Windows version
Windows 11 (24H2): Build 26100
Additional context
Using VS 2026 18.1, only reproducible when targeting to .NET 10, behavior is correct when using lock statement or targeting to .NET 8.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds-triageIssue needs to be triaged by the area ownersIssue needs to be triaged by the area owners