godot icon indicating copy to clipboard operation
godot copied to clipboard

Mono version crashes on build (Ubuntu 21.04)

Open Teonyr opened this issue 3 years ago • 10 comments

Hey, I already searched open and closed issues but couldn't find something related to my problem. Mostly people had MSBuild missing or something. I have dotnet-sdk-3.1 (as well as 5.0) and mono-devel installed. Editor and project are setup to use visual studio code as external editor and MSBuild for building solution.

Godot version: v3.3.2.stable.mono.official

OS/device including version: OS: Ubuntu 21.04 x86_64 Kernel: 5.11.0-17-generic CPU: AMD Ryzen 7 3700X (16) @ 3.600G GPU: NVIDIA GeForce RTX 3080 Memory: 3035MiB / 32088MiB

Issue description: Mostly after editing a C# file, the editor crashes when rebuilding the solution. But this doesn't happen all the time. Sometimes (2/10) it won't crash.

Here is a --verbose output on pastebin: https://pastebin.com/rkA4u31W

Steps to reproduce: A:

  1. Open project
  2. Click on MSBuild
  3. Click >Build
  4. Click Rebuild

or

B:

  1. Open project
  2. Edit .cs file
  3. Click Play (>) or Build

Minimal reproduction project: MonoCrashRepro.zip

Teonyr avatar May 25 '21 16:05 Teonyr

I'm experiencing this same crashes with dotnet CLI as build tool. (and have since 3.2)

OS: Arch Linux x86_64
Kernel: 5.12.3-zen1-1-zen
CPU: AMD Ryzen 5 3600XT (12) @ 3.793GHz
GPU: AMD ATI Radeon RX 590 (Mesa 21.1.1-1)
Memory: 13102MiB / 16005MiB

valters-tomsons avatar May 25 '21 17:05 valters-tomsons

Here is a reproducible project.

mono-crashable.zip

valters-tomsons avatar Jun 12 '21 21:06 valters-tomsons

Here's a back-trace of a crash, hope it's useful.

* thread #1, name = 'Godot_v3.3.2-st', stop reason = signal SIGILL: illegal instruction operand
  * frame #0: 0x00000000039b78e9 Godot_v3.3.2-stable_mono_x11.64`GDMono::reload_scripts_domain() + 313
    frame #1: 0x00000000036a0061 Godot_v3.3.2-stable_mono_x11.64`CSharpLanguage::reload_assemblies(bool) + 1297
    frame #2: 0x00000000039aa1a5 Godot_v3.3.2-stable_mono_x11.64

valters-tomsons avatar Jun 26 '21 16:06 valters-tomsons

I have also been experiencing this on 3.3.2 Mono. Yesterday I had probably 10+ crashes over the span of 4 hours. Very frustrating. I don't recall having any crashing issues until I updated to 3.3, but I see others have had it since earlier.

Using MSBuild on Windows 10 Pro.

Edit: I should probably also add that in my case it doesn't seem to happen nearly as frequently as it does for @Teonyr. For me the crashes happen probably more like 1 in every 10-15 builds, but when you're deep into debugging something you can go through 10+ builds very quickly which still results in being a major annoyance.

Keelar avatar Jul 30 '21 21:07 Keelar

This is the error from OP's log:

Mono: Loading assembly GodotTools.ProjectEditor... 

ERROR: load: Loaded assembly missing from table. Did we not receive the load hook?

Can every one else reproducing this see the same error?

neikeq avatar Aug 03 '21 11:08 neikeq

Okay so I tried to reproduce it again to get the error and it does appear to be different in my case. The description of this issued just sounded identical to mine so I just assumed they were the same. For me it seems to be just the editor that crashes and I get absolutely zero errors in the console even when using --verbose. But the crash only happens while building. Do editor errors not print to the console? I also tried digging through the logs in AppData\Roaming\Godot to see if an error showed up in any of those and can't find anything whatsoever.

If this is indeed different I'll have to submit another issue but I'd like to actually find the error to report to make sure it's different.

Keelar avatar Aug 04 '21 04:08 Keelar

Can every one else reproducing this see the same error?

https://gist.github.com/valters-tomsons/e42c26a03affcc87c81fe610dacd6ba8

My logs do not seem to contain such error.

Also, I've noticed that I am not able to reproduce this issue in 2D scenes.

valters-tomsons avatar Aug 29 '21 20:08 valters-tomsons

Issue still reproducible in Godot 3.4 and 3.4.1-RC3

valters-tomsons avatar Dec 15 '21 17:12 valters-tomsons

Same here using 3.5.beta1, dotnet 5 and building using dotnet cli option

Pressing build or play is a Russian roulette.

Impractical to create a big project using C# because the editor crashes every 10min. Today only was 20+ crashes.

The crash reports files "mono_crash.0.XX.json" always point to "crashed" : true, in"thread_name" : "Godot".

brmassa avatar Jan 14 '22 23:01 brmassa

If anybody is interested, 4.0-mono builds do not seem to suffer from this issue.

valters-tomsons avatar May 01 '22 12:05 valters-tomsons