godot-csharp-visualstudio icon indicating copy to clipboard operation
godot-csharp-visualstudio copied to clipboard

Editor crash or disconnect with Play in Editor, every other time

Open dandy-step opened this issue 3 years ago • 3 comments

Using the workaround described in #10 to get the build options to show, using Play in Editor will work the first time, triggering a build in the editor and launching the game, as expected.

However, by closing the game window, changing a script, and repeating Play in Editor, immediately after either Visual Studio will complain about disconnecting from the editor ("No Godot editor instance connected") or the editor itself will hard crash, while the game window itself launches just fine. Seems to be 100% reproducible. If it complains about a disconnect, doing Play in Editor again will get it to work as expected, but the same thing happens with the next build.

Happens in any project, including simple one-script tests. Nothing weird in the output console in Visual Studio, and no consistent error in the Godot console or logs, it usually just silently fails, but I'll include a couple. New to Godot and don't really know how to debug this, so would appreciate some help.

2021-09-09 02_14_46

2021-09-05 20_57_14

dandy-step avatar Sep 09 '21 01:09 dandy-step

Problems with "Play in Editor" randomly disconnecting from/crashing the Godot editor Confirm this bug.

GeorgeS2019 avatar Jan 18 '22 19:01 GeorgeS2019

Not necessary it is totally related to this issue. This happens often for me too. Adding here to speed up feedback cycle leading to a more robust VS2022 experience.

GeorgeS2019 avatar Feb 04 '22 12:02 GeorgeS2019

Yes, I believe it to be related as well. I'm not sure what happened (I think it was after a Godot or VS update), but I stopped getting reliable silent editor crashes after the game window launches, and now instead I get the Exception popups as described in #6, (along with "No Godot editor instance connected") errors - and it's seemingly random, whereas with this it was reliable, every single time.

As described, I'll still get a silent editor crash once in a while. When it doesn't crash, it will eventually work after a few attempts, but it's infuriating to not be able to reliably launch into a debug session, especially when this has been going on for months and getting the extension to work at all requires a janky workaround (at least in VS19, I don't know how it is in the more recent VS22 extension)

dandy-step avatar Feb 04 '22 15:02 dandy-step