Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug breakpoint step over throws an access violation exception #73389

Open
Jekops opened this issue May 8, 2024 · 0 comments
Open

Debug breakpoint step over throws an access violation exception #73389

Jekops opened this issue May 8, 2024 · 0 comments
Labels
Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@Jekops
Copy link

Jekops commented May 8, 2024

Debug breakpoint step over (F10) causes the debugger to immediately close without any catchable exception.
A console output access violation error message is visible.
The incident occurs only when the debug break point is hit.

Version Used:

Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.9.2
Windows 10 Pro
C# net 8.0 Console Application

Steps to Reproduce:

Here you can find a small solution to reproduce the issue.
ConsoleThread_Test1.zip

The application start an infinite background thread and stop it.

When a debug break point is set on line 74 or 75 (Manager.cs class file), after hit, performing a step over closes the debugger and output following message:
The program '[16356] ConsoleThread_Test1.exe' has exited with code 3221225477 (0xc0000005) 'Access violation'.

breakpoint location

The application works fine without the debug breakpoint in that precise code line.
The error do not occur if the line 75 (if (IsWorking)) is removed or the private backfield is used instead.
The error do not occur if the line 89 (foreach (BaseScene scene in m_Cache.Values)) is removed or m_Cache is used instead.

Here the Windows event viewer report about the incident:

Faulting application name: ConsoleThread_Test1.exe, version: 1.0.0.0, time stamp: 0x65a80000
Faulting module name: ntdll.dll, version: 10.0.19041.4239, time stamp: 0xad5435e9
Exception code: 0xc0000005
Fault offset: 0x0000000000031548

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

1 participant