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

Visual Studio 2019 crashes with mixed debugging (.Net Core) #1

Open
fobrs opened this issue Mar 31, 2020 · 5 comments
Open

Visual Studio 2019 crashes with mixed debugging (.Net Core) #1

fobrs opened this issue Mar 31, 2020 · 5 comments

Comments

@fobrs
Copy link

fobrs commented Mar 31, 2020

The latest version of Visual Studio 2019 (16.5.2) crashes when in a mixed debugging (.Net Core) session.

As soon as you want to look at a managed variable the crash occurs. So if you want to look at the value of _managedState, Visual Studio 2019 crashes.

image
Event Viewer shows:

Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x01548ca0
Faulting process id: 0x2914
Faulting application start time: 0x01d607a4b457b6d1
Faulting application path: E:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe
Faulting module path: unknown
Report Id: a0ae67a1-4bdf-4467-9c83-6c9549ac87a2
Faulting package full name: 
Faulting package-relative application ID:

And:

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
   at MCppEE.QueryAssemblyCompiler.GetIlasmNameInternal(MCppEE.Type, Boolean, Boolean)
   at MCppEE.QueryAssemblyCompiler.GetIlasmName(MCppEE.Type, Boolean)
   at MCppEE.QueryAssemblyCompiler.GetIlasmNameInternal(MCppEE.Type, Boolean, Boolean)
   at MCppEE.FunctionBuilder.GetFunctionDefinition()
   at MCppEE.CompilerEntryPoint.GetClrLocalVariableQuery(Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionContext, Microsoft.VisualStudio.Debugger.Clr.DkmClrInstructionAddress, Boolean)
   at Microsoft.VisualStudio.Debugger.EntryPoint.IDkmClrExpressionCompiler_GetClrLocalVariableQuery(IntPtr, IntPtr, IntPtr, Byte, IntPtr ByRef)

Apparently mixed .Net Core debugging is using .Net Framework!

@mjrousos
Copy link
Owner

mjrousos commented Apr 2, 2020

Thanks, @fobrs, for reporting the issue. I see it, as well. @tgani-msft, @wli3, @olgaark, any ideas whether this is a known issue or who we could loop in to dig deeper?

I can reproduce the issue. Inspecting a managed variable in a mixed-mode assembly while debugging type set to "Mixed (.NET Core)" crashes, as described here. I tested with 16.6 preview 1.

@tgani
Copy link

tgani commented Apr 2, 2020

@mjrousos, I think the best way is to file a bug and have the debugger team take a look (@caslan is the lead, I believe).

@eightcloud83
Copy link

eightcloud83 commented Apr 19, 2020

Crashed bug has been fixed @ 16.6 preivew 3,
but I still cannot "Watch" c++'s variable in .NetCore like in .NetFramework.

I'v reported another problem,
https://developercommunity.visualstudio.com/content/problem/996978/ccli-debug-watch-problem-in-net-core-31.html

If you have same broblem, you can vote the problem.

c++/cli in .net framework: no problem
0419 nf 1

c++/cli in .net core 3.1: can not watch the variable
0419 nc 1

@eightcloud83
Copy link

Yes! Fixed in16.7 preview 5.
image

donot forget to enable native debugging
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants