Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor crashes when replacing built C# dlls #77370

Closed
Avantir-Chaosfire opened this issue May 22, 2023 · 9 comments · Fixed by #77377
Closed

Editor crashes when replacing built C# dlls #77370

Avantir-Chaosfire opened this issue May 22, 2023 · 9 comments · Fixed by #77377

Comments

@Avantir-Chaosfire
Copy link
Contributor

Avantir-Chaosfire commented May 22, 2023

Godot version

5dc093b

System information

macOS 13.3.1

Issue description

Note: I first encountered this issue in 4.0.3-rc (didn't use Godot 4 versions before that) and reproduced it on the commit noted above. I did not have this issue on Godot 3.

When I started using Godot 4 and converted my C# Godot 3 project, I noticed it crashed when I tried to build. A lot of testing later, and I figured out that my editor crashes, exactly when:

  1. I build my project
  2. My project has changes (so the new dlls are different from the old ones)
  3. The editor believes (rightly or wrongly) that there are already built dlls in .godot/mono/temp/bin/Debug

This means building a new project does not crash (because there are no dlls to overwrite). A non-clean build afterwards does crash. However, cleaning the build manually (deleting .godot or any part of its substructure) only prevents the crash if the editor is closed. So, "build -> make change -> delete .godot -> build" crashes the editor, but "build -> make change -> delete .godot -> close and reopen editor -> build" does not crash the editor.

Crash image and full log attached:

Crash Message

Editor Crash Report.txt

Steps to reproduce

  1. Create a new project
  2. Create a new scene
  3. Attach a C# script to the root node
  4. Save
  5. Build
  6. Make a change to the C# script (e.g. add a comment)
  7. Build
  8. Editor crashes

Minimal reproduction project

MRP.zip

@RedworkDE
Copy link
Member

The crash is the same as #77343 / #68662; the underlying exceptions that ultimately triggers the crash may be different tho.

@Avantir-Chaosfire
Copy link
Contributor Author

I forgot to mention that even when the editor crashes, the dlls ARE built and updated correctly.

@Avantir-Chaosfire
Copy link
Contributor Author

Please reopen this issue. I was able to reproduce it on commit 3e88c4c, which is AFTER the commit that closed this issue.

@RedworkDE
Copy link
Member

I dug out a mac to check if the issue is OS specific, but I still can not reproduce any issues with the provided project and reproduction steps.

I was able to confirm that the send to debugger crash from your screen shot is indeed fixed on commit c670c43 (and yes I did confirm that I can trigger the crash on an older commit)

Please ensure that you are indeed running a build from a commit that includes that fix (the official dev3 build should do it, didn't test it specifically tho).

If the crash truly does persist, please post the output from dotnet --info, the full system info from #65902 (needs a build from todays master) and a new crash log.

@Avantir-Chaosfire
Copy link
Contributor Author

@RedworkDE Strange. I tested latest master again (95c8216) and it still crashes. No changes to the editor, just a normal mono build. Still get the crash upon modifying a script and building the project again.

% dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100
 Commit:    9e8b04bbff

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  11.0
 OS Platform: Darwin
 RID:         osx-x64
 Base Path:   /usr/local/share/dotnet/sdk/6.0.100/

Host (useful for support):
  Version: 6.0.0
  Commit:  4822e3c3aa

.NET SDKs installed:
  3.1.414 [/usr/local/share/dotnet/sdk]
  3.1.415 [/usr/local/share/dotnet/sdk]
  3.1.416 [/usr/local/share/dotnet/sdk]
  5.0.402 [/usr/local/share/dotnet/sdk]
  5.0.403 [/usr/local/share/dotnet/sdk]
  5.0.404 [/usr/local/share/dotnet/sdk]
  6.0.100 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.21 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.22 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.12 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.13 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.21 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.22 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.12 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

@RedworkDE
Copy link
Member

Still need an updated crash log (as text this time please) and godots terminal output, or there isn't really anything that can be said about this issue.

@Avantir-Chaosfire
Copy link
Contributor Author

@RedworkDE Interestingly, the crashing has become inconsistent... But it still happens frequently. Seems if the editor doesn't crash on first build, it won't on subsequent ones either.

Updated Crash Report.txt

Not pasting the crash report as plain text as it is simply too massive...

Godot terminal output (not sure if this just the project selector output, since it seems that launches a separate process...):

bin % ./godot.macos.editor.x86_64.mono
Godot Engine v4.1.dev.mono.custom_build - https://godotengine.org
OpenGL API 4.1 ATI-4.12.7 - Compatibility - Using Device: ATI Technologies Inc. - AMD Radeon Pro 5700 XT OpenGL Engine
 
Editing project: /Users/Eddie/Desktop/CC & Gaming/Godot/Projects/Test
bin % Godot Engine v4.1.dev.mono.custom_build - https://godotengine.org
Vulkan API 1.2.243 - Forward+ - Using Vulkan Device #0: AMD - AMD Radeon Pro 5700 XT
 
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:72)
Unloading assembly load context...
Assembly load context unloaded successfully.
Unloading assembly load context...
Assembly load context unloaded successfully.
ERROR: Attempt to disconnect a nonexistent connection from '@ConfirmationDialog@16959:<ConfirmationDialog#1125214378391>'. Signal: 'confirmed', callable: 'Delegate::Invoke'.
   at: _disconnect (core/object/object.cpp:1353)
ERROR: Attempt to disconnect a nonexistent connection from '<VBoxContainer#1125617031597>'. Signal: 'ready', callable: 'Delegate::Invoke'.
   at: _disconnect (core/object/object.cpp:1353)
ERROR: Attempt to disconnect a nonexistent connection from '@Button@16968:<Button#1126254565832>'. Signal: 'pressed', callable: 'Delegate::Invoke'.
   at: _disconnect (core/object/object.cpp:1353)
ERROR: Attempt to disconnect a nonexistent connection from '@PopupMenu@16967:<PopupMenu#1125885467061>'. Signal: 'id_pressed', callable: 'Delegate::Invoke'.
   at: _disconnect (core/object/object.cpp:1353)
ERROR: Attempt to disconnect a nonexistent connection from '<EditorSettings#-9223372010044783464>'. Signal: 'settings_changed', callable: 'Delegate::Invoke'.
   at: _disconnect (core/object/object.cpp:1353)
ERROR: Condition "!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)" is true. Returning: Variant()
   at: _EDITOR_GET (editor/editor_settings.cpp:1117)

@enxas
Copy link
Contributor

enxas commented Jun 7, 2023

@RedworkDE Could be related to this issue #69614

@RedworkDE
Copy link
Member

No, the errors you see at exit are #76708, and should not be related to any crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants