Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dotnet.exe has exited - Access violation

After upgrading .NET core from 2.0 to 2.1 I started getting following error when running the tests:

The program '[12372] dotnet.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.

When in debug mode VS just exits debug mode and prints the message above in the output -> Debug window.

The error happens when stepping over httpClient.SendAsync(...).

I think this might be the same issue.

Running the test via dotnet test shows:

The active test run was aborted. Reason: Process is terminating due to StackOverflowException.

Update

The issue was caused by a bad IoC mapping.

like image 984
Răzvan Flavius Panda Avatar asked Nov 30 '18 12:11

Răzvan Flavius Panda


1 Answers

In my case there was a hidden endless recursion. I was overriding the == operator and then within that override I was using the == operator without noticing the irony! As @jdweng suggests use breakpoints to drill down into the problem area. It can be well hidden!

like image 190
Chad Hedgcock Avatar answered Oct 19 '22 22:10

Chad Hedgcock