Game Freeze on Launch

Ah, you are correct that was not the mono version. Oddly enough no issue building the game, however it still hangs on run even after a successful build, in either GLES3 or GLES2

Okay, so that confirms that there’s nothing special going wrong in our release packaging, it is the Godot engine that gets stuck at that specific point on your computer

If the mono related guess is right, then it means that Godot 4.0 might fix the situation as it uses the dotnet runtime and ditches mono.

I guess if you are willing to investigate you can modify the project settings in Godot editor to remove the custom cursor.

Sadly I don’t know of any good example C# Godot game to ask you to test. Making a simple C# project that just loads a single script and then does something might be enough to prove the problem is in Godot (assuming such a project would also fail to start on your computer).

The final step would be to gather enough coherent information about the problem to determine first if this is already reported to Godot and if not opening an issue here: Issues · godotengine/godot · GitHub

Would you happen to know where in the project they modify the cursor?

“Custom Image” seems to be it:

Was quite quick to find with the settings search option.

Ah, I was looking in the nodes like an idiot, what should I do, remove it?

Removing the cursor and the cursor loader cs did not in fact change anything, I’ll look for a C# example project to try

1 Like

A simple 2d platformer in C# in godot mono does not freeze on launch and runs as expected. Very strange, but this is the example I tested

Just would like to note, you can edit a post by using the pencil icon in the bottom right corner, which prevents clutter. Please try to use it to avoid double or triple posting! Thanks, and welcome to the forums!

So there is something special with Thrive. Something about the Thrive startup when the C# modules try to load is failing. Someone with technical skills could dig in more by creating blank scenes, removing Thrive autoloads etc. to determine if the case is literally the dll file loading fails or if some of our startup code causes the crash before any log messages are printed.

Definitely outside of my expertise but I would be willing to test whatever. Problems like these eat at my soul until I find a solution

  1. Can you look into the mono log and see if any error is logged there? You can also post your mono log here.
    The log folder is like C:/Users/Ajax/AppData/Roaming/Thrive/mono/mono_logs/
  2. Maybe when you are running Thrive in the git repo, you can try godot -v -d and see if any error was printed.
  1. The mono logs are empty.

  2. Running thrive with -v and -d produce the same results as what I pastedbinned before, it simply hangs after the locale files

I must clarify that I mean to open a terminal in the Thrive repo and run Godot -v -d, not the packaged version. And I wonder what hang means. If it just lost response, you can wait until it responds, or Godot native crash may print detailed crash reason.

An alternative could be to run Thrive in Godot Editor and see if it gives any error print.


Another question:

  1. The mono logs are empty.

The log folder is empty or the log itself is empty? Exported Thrive game will produce empty mono logs (empty log files), but if the log folder is empty, it says the Mono runtime isn’t loaded correctly at all.

If you get empty logs, try to run from the Thrive repo (like I said above), there should be something in the log. Like this (I ran godot -v -d --quit .):

Apologies for the unclear answer about the logs, it produces empty log files, not no files at all. As for the hang, I mean that the process stops responding, and never recovers even after an extended period of time (30+ mins).

I am confused on the request you are making on the running godot -v -d --quit, as there is no file in the clone of the repo that I can see, as it comes up with command not found in bash or powershell. I apologize if I am misunderstanding something simple.

Ah, never mind. Godot means the Godot.exe executable of the engine. It’s the very file that you use to open the Godot project manager. Hold shift and right click on the executable and you will find a ‘copy as path’ command. Then you can replace Godot with the path you copied. By doing this you open the engine with debug profile. It will then search for project files in the directory you open it.

Our setup instructions detail making an alias of the current godot engine executable named “godot.exe” this makes a lot of development tasks simpler when you can simply assume that running “godot.exe” will run the currently used mono version of Godot for Thrive.

After making a shortcut of the project manager and running it with the requested flags I have made a pastebin of the logs it output for the engine, but it still did not make any thrive logs if that was the intention.

Edit: It appears to have not detected the project when I ran it the first time, so I tried again with the path explicitly listed and run into the same issue as before, even with --quit the process still immediately hangs on the Thrive splash screen. However, this is the log from mono at the time.

Well, Mono log doesn’t tell much… (Because it is completely normal) The only suspicious point is that there being 69 lines of GC_MINOR between the init tasks and the quit tasks - which, I think, indicates that the Mono runtime is running but Godot or our code got stuck somewhere.

There’s one way to debug this: You can add a line throw new Exception(); after the Thrive version print (Thrive/StartupActions.cs at master · Revolutionary-Games/Thrive · GitHub) and see if Godot crashes with exception thrown. (Don’t forget to rebuild the solution after that) With this you may be able to find out exactly where the code goes wrong.

Godot Engine v3.5.1.stable.mono.official.6fed1ffa3 - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon RX 580 2048SP (POLARIS10, DRM 3.43.0, 5.4.0-139-generic, LLVM 12.0.1)
Async. shader compilation: OFF
/lib/x86_64-linux-gnu/libasound.so.2: undefined symbol: snd_dlpath
 
Mono: Log file is: '/home/ajax/.local/share/godot/mono/mono_logs/2023-02-12_20.40.52_23096.log'
This is Thrive version: 0.6.1.0-alpha (see below for exact build info)

Unhandled Exception:
System.Exception: Exception of type 'System.Exception' was thrown.
  at StartupActions..ctor () [0x0002c] in /home/ajax/Thrive/src/engine/StartupActions.cs:18 

Unhandled Exception:
System.Exception: Exception of type 'System.Exception' was thrown.
  at StartupActions..ctor () [0x0002c] in /home/ajax/Thrive/src/engine/StartupActions.cs:18 

APPEND:

Also you can have a look on your CPU usage. If it is about one CPU’s high (e.g. 25% when you have 4 cpus), it may indicate that Thrive or Godot sank into an endless loop somewhere.

Godot Engine v3.5.1.stable.mono.official (c) 2007-2022 Juan Linietsky, Ariel Manzur & Godot Contributors.
— GDScript language server started —
Switch Scene Tab
This is Thrive version: 0.6.1.0-alpha (see below for exact build info)
modules/mono/csharp_script.cpp:2327 - Exception thrown from constructor of temporary MonoObject:
modules/mono/mono_gd/gd_mono_utils.cpp:369 - System.Exception: Exception of type ‘System.Exception’ was thrown.

This is the exception thrown from adding the new line after the new build.

When running the game there is no noticeable spike in CPU usage, probably because it stops responding at all so I’d assume it’s not using any cycles.

Edit: Additionally here’s the build log output in case it’s useful

Edit 2: In the event running the project with -v -d --quit was the idea I tried it too but no change minus the log.txt in appdata showing the same readout as the cmd line I posted from before.

I run out of telent now… Maybe were the computer mine I could debug myself, or I might just reinstall my Windows (or just switch to Linux).