Project causes editor to hang (no errors, no logs)

Godot Version

Working in: [4.5.2][4.6.1]

Issue occurs in: [4.7][4.7.1][4.7.2][4.8 dev3][4.8 dev4]

Specs: Godot v4.7.2.stable.mono - macOS Tahoe (26.6.2) - Multi-window, 2 monitors - Metal (Forward+) - integrated Apple M1 Max (Apple7) - Apple M1 Max (10 threads) - 32.00 GiB memory - CoreAudio (44100 Hz, Stereo/mono)

Plugins:

  1. PhantomCamera v0.11.0.3
  2. Beehave v 2.9.3
  3. DebugDraw3D v4.4.1

Question

I have a project that I upgraded to 4.7 recently. After upgrading I found that the editor would hang frequently. The hangs are seemingly random and can occur between after two seconds or after two hours.They occur when the editor is idle, or when actively working on the project, however I found the most reliable way to cause a hang is to switch away from Godot to another program (my IDE or a web browser) then switch back to the editor. Staying in the editor can extend the time a little, but not by much.

What I’ve tried so far:

  • Looking in my OS console for any crash logs - My first instinct was to find any crash logs and try to pinpoint what was happening. For almost all incidents, no crash report is generated. However, I did get a couple of reports pointing to libcoreclr.dylib: part of the C# runtime.
  • Updating .NET - Starting with the simplest thing I could do.
  • Running my project in recovery mode - This worked. With the restrictions of recovery mode, no extensions or custom tools, my project never stopped once.
  • Using Editor.IsEngineHint() - I suspected that there was a possibility of an infinite loop somewhere in one of my tool scripts. After checking all my tool scripts, I confirmed that no infinite loops were there, but I decided to implement some code safeguards so that unnecessary calls to code wouldn’t be called in the editor.
  • Opening a scene without tool scripts - This also worked. Simple scenes wouldn’t cause the editor to hang.
  • Disabling or updating plugins and extensions - Because code guards didn’t work, I thought that the problem may lie within one of the plugins that I use. I tried disabling the two that were active: PhantomCamera and Beehave. Disabling them meant that my project could stay open even overnight! I decided to try updating them and re-enabling them (the versions listed above are after my updates), but that started the issue again. I then tried to see if the issue persisted with only one plugin enabled, but it turned out that having one or both plugins enabled would cause the editor to hang.
  • Building the engine/editor from source and debugging - I decided to try building the 4.7.2 editor from source so I could have a build with the debug symbols. I also thought that running the editor from an IDE could have it break on whatever error it was encountering. I successfully built the engine and ran it in VS Code, however the debugger did not pick up on when the editor did eventually hang. I also tried pausing execution during a hang to see if it would show me where it stopped. the debugger stopped in “command_queue_mt.h” on line 220, within function __wait_for_sync. I was not sure how to proceed from here and the call stack didn’t show anything related to my code or project scenes.
  • Running the project in verbose mode - I tried this at multiple points of my troubleshooting. Verbose mode does print all the extra information I expect, but only when the project is being loaded. If I were to open Godot, switch to a different app, and come back to find Godot frozen, the logs would be stopped at after the project opened.
  • Deleting the .godot folder - Tried this thinking that maybe there was a cache error somewhere. Unfortunately, the problem persisted.
  • Asking someone else to open the project - I’ve asked others to open my project to see if they get the same issue. In addition, I also did a fresh clone of the repo on a different computer just to see if I could replicate it there. Everyone I asked to keep an eye on this has had it freeze, and it froze on the fresh clone as well. The notable thing about this is that these other computers are running Windows 11, so it’s not an issue specific to my computer.

Currently trying:

  • Building a minimal reproduction project - Working on this in case it’s a bug.
  • Obtaining an error log of some sort - I did manage to get a log using 4.8 dev versions once, but couldn’t pinpoint any problems in it. If I can get it again I’ll update this post.

I’m not exactly sure what to do next. The most frustrating thing about this is that I don’t get any information on why this is occurring. My question for this would be: if Godot is freezing and not giving any errors or generating logs, how do I find where the problem is?