Debugging a crash "Godot Engine Editor has stopped working"

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Diet Estus

I am working on a 2D action platformer. Periodically on player death, my game crashes and I am met with an error:

enter image description here

The only error I see in the editor is a _get_socket_error, which I believe just indicates that debugger disconnected from the project. Nothing informative there.

The crash happens very infrequently, but always (or almost always) on player death. I cannot discern a pattern of what causes it, however. It has been plaguing me for months.

I am able to open Visual Studio’s just-in-time debugger from the error pictured above. This is what I see:

Can anyone recommend how to go about debugging my project using the information present in the Visual Studio debugger?

I am at a loss as to how to debug, since I cannot reliable reproduce the issue. I am starting to feel desperate for a solution and would genuinely appreciate any help at all.

I am not very familiar with debugging or using Visual Studio, but I would be happy to learn if it could help me purge this periodic crash.

I’ve read up on debugging for heap corruption in general, but none of it seemed to help. I’ve been searching for memory leaks in my code, but I don’t see any, and both static and dynamic memory usage seems consistent when I watch it using Godot’s built-in debugging monitors.