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

WinformsControlsTest cannot be run under debugger in Visual Studio #64568

Closed
WPMGPRoSToTeMa opened this issue Jan 31, 2022 · 10 comments
Closed
Assignees
Labels
area-Diagnostics-coreclr blocking Marks issues that we want to fast track in order to unblock other important work
Milestone

Comments

@WPMGPRoSToTeMa
Copy link

WPMGPRoSToTeMa commented Jan 31, 2022

  • .NET Core Version:
    7.0.0-beta.22078.2

  • Have you experienced this same bug with .NET Framework?:
    No

Problem description:
WinformsControlsTest cannot be run under debugger using F5 in Visual Studio, the following error is shown:
A fatal error has occurred and debugging needs to be terminated. For more details, please see the Microsoft Help and Support web site. HRESULT=0x80070057. ErrorCode=0x0.
Fatal error when WinformsControlsTest runs under debugger in VS

It was found that this problem is caused by dotnet/winforms#6569 dotnet/winforms#6573.

WinformsControlsTest still can be run without debugger attached using Ctrl+F5. Debugging also doesn't work if attach the debugger later - breakpoints cannot be hit and there are no assemblies in Modules window.

Expected behavior:
It should be possible to run WinformsControlsTest with debugger attached in Visual Studio.

Minimal repro:

  1. Open the solution using start-vs.
  2. Choose WinformsControlsTest as the current project on the toolbar.
  3. Click Run or press F5.
@dreddy-work
Copy link
Member

Can you add call stack for this and see if this is something that need to be addressed by runtime?

@WPMGPRoSToTeMa
Copy link
Author

Can you add call stack for this and see if this is something that need to be addressed by runtime?

That's the only thing I see in the Output window:

The program '[3244] WinformsControlsTest.exe' has exited with code 4294967295 (0xffffffff).
The program '[3244] WinformsControlsTest.exe: Program Trace' has exited with code 0 (0x0).

@RussKie
Copy link
Member

RussKie commented Jan 31, 2022

dotnet/winforms#6573 is the one to blame. I tried the following steps:

  1. checkout 18f55098710a3bb0c06cc50756fde323f4af8b00
  2. .\restore.cmd
  3. .\start-vs.cmd
  4. F5 in VS <-- works
  5. checkout 059d14c3b74720a83b1e3fe1b02dcd26b9cb09bf
  6. .\restore.cmd
  7. F5 in VS <-- crash

@dotnet-issue-labeler dotnet-issue-labeler bot added area-Diagnostics-coreclr untriaged New issue has not been triaged by the area owner labels Jan 31, 2022
@RussKie RussKie transferred this issue from dotnet/winforms Jan 31, 2022
@ghost
Copy link

ghost commented Jan 31, 2022

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details
  • .NET Core Version:
    7.0.0-beta.22078.2

  • Have you experienced this same bug with .NET Framework?:
    No

Problem description:
WinformsControlsTest cannot be run under debugger using F5 in Visual Studio, the following error is shown:
Fatal error when WinformsControlsTest runs under debugger in VS

It was found that this problem is caused by dotnet/winforms#6569.

WinformsControlsTest still can be run without debugger attached using Ctrl+F5. Debugging also doesn't work if attach the debugger later - breakpoints cannot be hit and there are no assemblies in Modules window.

Expected behavior:
It should be possible to run WinformsControlsTest with debugger attached in Visual Studio.

Minimal repro:

  1. Open the solution using start-vs.
  2. Choose WinformsControlsTest as the current project on the toolbar.
  3. Click Run or press F5.
Author: WPMGPRoSToTeMa
Assignees: -
Labels:

area-Diagnostics-coreclr, untriaged

Milestone: -

@WPMGPRoSToTeMa
Copy link
Author

@RussKie thanks. Sorry, I was doing that without a VS restart and stopped at a good commit.

@dreddy-work dreddy-work added Regression blocking Marks issues that we want to fast track in order to unblock other important work and removed Regression labels Feb 1, 2022
@dreddy-work
Copy link
Member

Debugging tests are blocked here.

@tommcdon tommcdon added this to the 7.0.0 milestone Feb 1, 2022
@tommcdon tommcdon removed the untriaged New issue has not been triaged by the area owner label Feb 1, 2022
@tommcdon
Copy link
Member

tommcdon commented Feb 1, 2022

Thanks for the bug report - we have found the root cause and are working on a fix: #64523

@tommcdon tommcdon self-assigned this Feb 1, 2022
@tommcdon
Copy link
Member

tommcdon commented Feb 2, 2022

#64523 is merged, so this should be fixed on the next build

@RussKie
Copy link
Member

RussKie commented Feb 2, 2022

Awesome!

@tommcdon
Copy link
Member

tommcdon commented Feb 4, 2022

Closing via #64523
It looks like the fix has been merged into winforms on dotnet/winforms@ff8a062
Please let us know if there are any issues

@tommcdon tommcdon closed this as completed Feb 4, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Diagnostics-coreclr blocking Marks issues that we want to fast track in order to unblock other important work
Projects
None yet
Development

No branches or pull requests

4 participants