0

I'm getting the below error when I hit some breakpoints. The error makes sense but it's not telling me which function is being offensive. My question is where does this dialog pull the method name from such that I'm getting this null reference string instead? (If I follow the suggestion and disable property evaluation, the problem goes away, but I would rather keep this feature enabled as it's a huge convenience.)

Error text:

Evaluating the function System.NullReferenceException.NullReferenceException timed out and needed to be aborted in an unsafe way. This may have corrupted the target process.

enter image description here

BenjiFB
  • 4,545
  • 10
  • 46
  • 53
  • Like the information you got, how about the result if you disable that Debugging option "Enable propert evaluation and other implicit function calls"? Do you get any detailed messages? Please also enable the Exception settings windows, debug your app again. – Jack Zhai May 22 '18 at 06:14
  • I updated the question to clarify that disabling property eval does address the problem but that's not an ideal solution. "Please also enable the Exception settings windows, debug your app again." I'm not sure what you mean. Can you clarify how this would be done? – BenjiFB May 22 '18 at 12:32
  • The default managed debugging engine in VS2017 is a feeble chunk of code. I'd assume that in this case it falters on trying to find the variable that is null. As long as you don't need to debug .netcore code, you'd be much ahead with the previous engine, it is much more stable. Tools > Options > Debugging > General, tick "Use Managed Compatibility Mode". And do use the proper vehicle to report VS2017 bugs, SO isn't. Use Help > Send Feedback > Report a Problem. – Hans Passant May 22 '18 at 13:11
  • 1
    I get this error all the time, it basically kills all my debugging process. No solution so far. It's obviously a BUG in Visual Studio. I reported it, but for many years it has not been fixed, I truly believe that no one reads these reports, no one gives a damn. – monstro Jun 27 '18 at 12:51
  • Related posts - [Debugging issue in Visual Studio 2017](https://stackoverflow.com/q/48020427/465053) & [Visual Studio 2017 Debug Error: To prevent an unsafe abort when evaluating the function *.toString all threads where allowed to run](https://stackoverflow.com/q/52187355/465053) – RBT Nov 18 '19 at 10:57

0 Answers0