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

Can't get method on CallableCustom "Delegate::Invoke" error when building/debugging .NET project #70026

Open
RIKDXHQ11 opened this issue Dec 13, 2022 · 32 comments

Comments

@RIKDXHQ11
Copy link

RIKDXHQ11 commented Dec 13, 2022

Godot version

4.0beta

System information

windows10,NVIDIA GeForce GTX 1660,Vulkan API 1.2.0

Issue description

GODOT BETA 7.0 C # version, when debugging for many times, suddenly stuck, the debugging progress bar did not respond, and then if the program was not forced to close in time, the entire operating system would crash.
But there is no error prompt,
After I restart the computer, a lot of errors will occur when I open the project:

  modules/mono/managed_callable.cpp:92 - Condition "delegate_handle.value == nullptr" is true.
  Can't get method on CallableCustom "Delegate::Invoke".
  core/object/object.cpp:1058 - Error calling from signal 'timeout' to callable: 'Node::': Method not found.
  modules/mono/managed_callable.cpp:92 - Condition "delegate_handle.value == nullptr" is true.
  Can't get method on CallableCustom "Delegate::Invoke".
  core/object/object.cpp:1058 - Error calling from signal 'timeout' to callable: 'Node::': Method not found.
  modules/mono/managed_callable.cpp:92 - Condition "delegate_handle.value == nullptr" is true.
  Can't get method on CallableCustom "Delegate::Invoke".
  core/object/object.cpp:1058 - Error calling from signal 'timeout' to callable: 'Node::': Method not found.
  modules/mono/managed_callable.cpp:92 - Condition "delegate_handle.value == nullptr" is true.
  Can't get method on CallableCustom "Delegate::Invoke".
  core/object/object.cpp:1058 - Error calling from signal 'timeout' to callable: 'Node::': Method not found.
  modules/mono/managed_callable.cpp:92 - Condition "delegate_handle.value == nullptr" is true.
  Can't get method on CallableCustom "Delegate::Invoke".
  core/object/object.cpp:1058 - Error calling from signal 'timeout' to callable: 'Node::': Method not found.
  modules/mono/managed_callable.cpp:92 - Condition "delegate_handle.value == nullptr" is true.
  Can't get method on CallableCustom "Delegate::Invoke".
  core/object/object.cpp:1058 - Error calling from signal 'timeout' to callable: 'Node::': Method not found.
  modules/mono/managed_callable.cpp:92 - Condition "delegate_handle.value == nullptr" is true.

Deleting the godot folder can solve the problem, but it will seriously affect my computer health and my spirit.
I'm going crazy.
Please solve this problem, otherwise it will become difficult to use, thank you.

Steps to reproduce

N/A

Minimal reproduction project

N/A

@Chaosus Chaosus added this to the 4.0 milestone Dec 16, 2022
@Chaosus Chaosus changed the title GODOT BETA 7.0 C # version, when debugging for many times, suddenly stuck. Can't get method on CallableCustom "Delegate::Invoke" error when building/debugging .NET project Dec 16, 2022
@matthew798
Copy link

matthew798 commented Dec 21, 2022

Just wanted to chime in and say that I am also facing this issue and it's blocking. I'm using the official build of beta 9. Not complaining or anything, I know it's beta :).

Is this related to, but not fixed by #69194? If so, do we know how to work around it for the time being?

@matthew798
Copy link

Just wanted to provide some more context:

This issue occurs for me only when a C# script marked as [Tool] is attached to a node, and the script loads 1 or more resources.

Here is the code that causes the error, in my case:

[Tool]
public partial class LevelManager : Node3D
{
	public override void _Ready()
	{
	    LoadBlocks();
		
	    if(_levelNode == null){
		_levelNode = new Node3D() {Name = "Level"};
		AddChild(_levelNode);
		if(Engine.IsEditorHint()){
			_levelNode.Owner = this;
		}
	    }
	    LoadLevel();
	}
        
        private void LoadBlocks(string path = "Prefabs/Blocks"){
	    _blockList.Clear();

	    var files = Directory.GetFiles(path, "*.tscn", SearchOption.AllDirectories);

	    foreach(String file in files){
		var filename = Path.GetFileNameWithoutExtension(file);
		_blockList[filename] = GD.Load<PackedScene>($"res://{path}/{filename}.tscn");
	    }
	}
}

If either the [Tool] attribute is removed or the LoadBlocks method is commented out, the issue does not occur. I hope this helps.

@ghost
Copy link

ghost commented Dec 29, 2022

I was running into this. In my case it seems to have been caused by using a .NET 7 SDK instead of .NET 6. dotnet defaults to using the latest installed SDK and I have both installed. Adding the following global.json file to the root of the project fixed the issue.

{
  "sdk": {
    "version": "6.0.404"
  }
}

Currently running Godot 4 Beta 10 on MacOS Ventura 13.0.1.

@gallsy
Copy link

gallsy commented Dec 30, 2022

{
  "sdk": {
    "version": "6.0.404"
  }
}

This unfortunately hasn't fixed it in my case. On the next build after launching I get the same error as above.
The messages from the terminal are:

Copying Godot Offline Packages...
Unloading assembly load context...
Assembly unloading is taking longer than expected...
Failed to unload assemblies. Possible causes: Strong GC handles, running threads, etc.
ERROR: .NET: Failed to unload assemblies.
   at: (modules/mono/mono_gd/gd_mono.cpp:504)
ERROR: Condition "delegate_handle.value == nullptr" is true.
   at: call (modules/mono/managed_callable.cpp:92)
ERROR: Can't get method on CallableCustom "Delegate::Invoke".
   at: (core/variant/callable.cpp:333)
ERROR: Error calling from signal 'timeout' to callable: 'Node::': Method not found.

I'm running:
4.0.beta10.mono (As far as I can tell this has affected every build since the .net 6 merge.)
Windows 10 pro x64

dotnet --info shows:
.NET SDKs installed:
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.401 [C:\Program Files\dotnet\sdk]
2.1.402 [C:\Program Files\dotnet\sdk]
2.1.526 [C:\Program Files\dotnet\sdk]
3.1.120 [C:\Program Files\dotnet\sdk]
3.1.201 [C:\Program Files\dotnet\sdk]
3.1.426 [C:\Program Files\dotnet\sdk]
5.0.104 [C:\Program Files\dotnet\sdk]
5.0.408 [C:\Program Files\dotnet\sdk]
6.0.112 [C:\Program Files\dotnet\sdk]
6.0.307 [C:\Program Files\dotnet\sdk]
6.0.400 [C:\Program Files\dotnet\sdk]
6.0.404 [C:\Program Files\dotnet\sdk]

@matthew798
Copy link

@gallsy can you confirm that you are running a [Tool] script and it loads a resource from disk?

@gallsy
Copy link

gallsy commented Dec 30, 2022

@matthew798 yes that's right.
The problem seems to be caused by my C# plugin using [Tool] and has multiple references to scenes via ResourceLoader.Load<PackedScene>("uid://whatever") and json files via

var fileStream = FileAccess.Open(filePath, FileAccess.ModeFlags.Read);
var fileText = fileStream.GetAsText();
fileStream.Dispose();

The only external dependency I'm using is Newtonsoft.Json.

@guessy42
Copy link

guessy42 commented Dec 30, 2022

Been hit by this myself in beta 9.0

I had some [Tool] scripts, but removing [Tool] did not fix the issue.

It appears to be being caused by assemblies not getting unloaded properly. From the godot console:

Unloading assembly load context...
Vulkan API 1.3.205 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1050 Ti

<some game logging stuff here>
Assembly unloading is taking longer than expected...
Failed to unload assemblies. Possible causes: Strong GC handles, running threads, etc.

The deluge of errors starts immediately thereafter.

In my case, I can cause this to happen by:

  1. Starting up the editor
  2. You can build/run the project as much as you like without issue here
  3. Make a change to the code that forces script recompilation
  4. Something somewhere will kick up an exception in ScriptManagerBridge.TryReloadRegisteredScriptWithClass to do with adding a type to a dictionary that already contains that given key, always a generic class:
  modules/mono/glue/runtime_interop.cpp:1223 - System.ArgumentException: An item with the same key has already been added. Key: DisplayControlCollection`2[PawnSystem.Pawn,ClientControllerSystem.PawnUIControl]
     at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
     at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
     at Godot.Bridge.ScriptManagerBridge.ScriptTypeBiMap.Add(IntPtr scriptPtr, Type scriptType) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.types.cs:line 23
     at Godot.Bridge.ScriptManagerBridge.TryReloadRegisteredScriptWithClass(IntPtr scriptPtr) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs:line 545
  1. Project can still run etc as many times as you like
  2. At the next script recompilation, the assembly fails to unload as described above and it all goes to hell

Curiously, only building from visual studio code (as opposed to the godot editor) sees the issue with TryReloadRegisteredScriptWithClass and generic classes kick off immediately. The second time you build from VSCode, either the deluge begins in the godot editor or it just outright freezes, but so long as you don't need to edit scenes you can still work and run the project just fine from visual studio code.

@guessy42
Copy link

Quick update, I've had some luck tracking this down!

The cause - in my case - appeared to be, as the 'failed to unload assemblies' message mentioned, strong GC handles. Specifically, static variables that would persist between reloads and potentially have handles to things that should have been deleted.

The quick tl;dr, manage your static variables responsibly. I had a few things static that really didn't need to be, and after refactoring I can no longer reproduce the error as I mentioned previously.

@matthew798
Copy link

@guessy42 Interesting. I'd be curious to see what the before and after of your refactoring look like. I don't see how a static variable would cause an issue here. Also, I don't have any static variables in my script.

@guessy42
Copy link

@guessy42 Interesting. I'd be curious to see what the before and after of your refactoring look like. I don't see how a static variable would cause an issue here. Also, I don't have any static variables in my script.

It could also be static events, or really anything that creates a strong handle that stops the assembly from being unloaded. To be honest, I'm not 100% sure what all the possible causes for stopping assemblies unloading even are.

This is the original, problematic script: https://pastebin.com/Ey7XQtGH
This is the fixed one: https://pastebin.com/PjG67QEr

It's pretty much moving static variables to singleton instance variables and adding more cleanup / safeguards. Awaiters is an autoload.

In hindsight the use of static variables in that script was honestly bound to cause problems but, well, that's hindsight.

@TomNCatz
Copy link

TomNCatz commented Jan 31, 2023

I don't know if my circumstances match everyone else's, but I am seeing this issue in beta 16 as well.

I have found that if I hit "Build" manually before hitting the play button I do not seem to get the errors. Also, I noticed that if I do not hit "Build" before hitting play, even if I have mistakes in my code that should prevent compile it still runs the app. I do not need to hit "Build" every time before I hit play if I have not made code changes. I suspect there is an issue causing the build to either not happen or not complete in time when you just press play.

As a note, this holds true whether I am compiling for .net6.0 or .net7.0

@XenokNyx
Copy link

XenokNyx commented Feb 1, 2023

@TomNCatz I was having the same problem with a project that worked in beta 15 but not 16, I was able to fix it (in beta 17) by deleting the "temp" folder at "Project Dir"/.godot/mono/

@MagmaGuy
Copy link

MagmaGuy commented Feb 2, 2023

@TomNCatz I was having the same problem with a project that worked in beta 15 but not 16, I was able to fix it (in beta 17) by deleting the "temp" folder at "Project Dir"/.godot/mono/

Running 4.0 beta 17 mono edition, ran into the same issue, this solution also worked for me.

@tjp1205
Copy link

tjp1205 commented Feb 24, 2023

I am now on version rc.3, after deleting the temp folder, the issue would still occur after some code changes and rebuilding.

@YuriSizov YuriSizov modified the milestones: 4.0, 4.1 Feb 27, 2023
@nobbele
Copy link
Contributor

nobbele commented Feb 27, 2023

I'm also getting this in RC.6, happens quite randomly (but frequent) when building (or playing)

@DomiStyle
Copy link

This still happens in stable.

It happens almost every single time I make a change to a C# script, no matter how simple the project is.
Just rotating a cube is enough to cause this.

@magian1127
Copy link
Contributor

Unloading assembly load context...
Assembly unloading is taking longer than expected...
Failed to unload assemblies. Possible causes: Strong GC handles, running threads, etc.
ERROR: Condition "delegate_handle.value == nullptr" is true.
   at: ManagedCallable::call (modules\mono\managed_callable.cpp:92)
ERROR: Can't get method on CallableCustom "Delegate::Invoke".
   at: (core\variant\callable.cpp:377)

I found a temporary solution.
Modify GodotPlugins\Main.cs
Change the return false to return true in line 270.
Rework "--generate-mono-glue".

Do not use += and Callable.Form() for signal connections to the EditorPlugin.
Using the

.Connect(EditorSelection.SignalName.SelectionChanged, new Callable (this, DevHelper.MethodName.XXX))

@emowen4
Copy link

emowen4 commented Mar 19, 2023

I am also facing this problem in 4.0 Stable. The MRP is simply setting and using any static fields in a Godot-based class's static constructor.

My temporary solution is to make sure all static fields and properties are not be set in ModuleInitializer and static constructors of any classes that extends Godot classes, such as Node, Control, etc..

EDIT:
"All static fields and properties" includes the ones in any user-written classes, no matter whether the class extends Godot.Node.

@RedworkDE
Copy link
Member

Does anyone here have an MPR for their way of causing the assembly to fail to unload?
Because there are various vague things that cause issues here but nobody has actually posted a project that can be used to test things.

@DomiStyle
Copy link

@RedworkDE It happens pretty much in any project for me once I make a single change to a C# script, but here's a really simple project:

GodotTimeoutIssue.zip

Here's a short video on how I can trigger it:

godot4.mp4

@RedworkDE
Copy link
Member

Can't reproduce with that project, but the issue seems to limited to just the error spam, so that probably gets fixed by #75533 already.

@DomiStyle
Copy link

It's not just log spam for me unfortunately.

If I run the project one more time without restarting once the errors come up all script export variables will be reset to 0 in the editor which is a massive pain to resolve on larger projects.

@RedworkDE
Copy link
Member

You can try building from source with that PR and test if it fixes the issue problems for you, because the error spam is really just a symptom of the editor breaking beyond recovery and that is what the PR fixes.

If it does not (I never tried to figure out what exactly the consequences of continuing are) a lot more system information is need to even begin diagnosing these issues.

@DomiStyle
Copy link

@RedworkDE Just tried the PR and it seems like it does indeed resolve the issue.

I get this error now after every change in the C# project but it doesn't seem to affect anything:

Another resource is loaded from path 'res://Cube.cs' (possible cyclic resource inclusion).

@magian1127
Copy link
Contributor

JZGLtest.zip

After loading the plugin, click the arrow position on the screenshot.
Then add or remove [Export] in the cs file (the method attribute should also trigger), and finally rebuild the solution with VS.
Godot reported an error.
image

Then using #75533 will cause other problems.

@dannymate
Copy link

dannymate commented Jun 8, 2023

I updated to the 4.1 beta 1 and I'm still getting this issue. It's really preventing me from making progress. It happens very reliably for me. Basically I have the game running and then reload the scene twice and I'm locked out basically.

Essentially this comment

However I have to delete the projects .godot folder in the project before reopening the editor to fix the issue.

I'm on Fedora Silverblue 38, with VS Code. I haven't got any [Tool]s.

After the first reload (Step 4):

Details

  modules/mono/glue/runtime_interop.cpp:1325 - System.ArgumentException: An item with the same key has already been added. Key: Presenter`2[FundsModel,FundsView]
     at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
     at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
     at Godot.Bridge.ScriptManagerBridge.ScriptTypeBiMap.Add(IntPtr scriptPtr, Type scriptType) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.types.cs:line 23
     at Godot.Bridge.ScriptManagerBridge.TryReloadRegisteredScriptWithClass(IntPtr scriptPtr) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs:line 579
  modules/mono/glue/runtime_interop.cpp:1325 - System.ArgumentException: An item with the same key has already been added. Key: Presenter`2[UptimeModel,UptimeView]
     at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
     at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
     at Godot.Bridge.ScriptManagerBridge.ScriptTypeBiMap.Add(IntPtr scriptPtr, Type scriptType) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.types.cs:line 23
     at Godot.Bridge.ScriptManagerBridge.TryReloadRegisteredScriptWithClass(IntPtr scriptPtr) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs:line 579
  modules/mono/glue/runtime_interop.cpp:1325 - System.ArgumentException: An item with the same key has already been added. Key: ArrayPresenter`2[AppListModel,AppModel]
     at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
     at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
     at Godot.Bridge.ScriptManagerBridge.ScriptTypeBiMap.Add(IntPtr scriptPtr, Type scriptType) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.types.cs:line 23
     at Godot.Bridge.ScriptManagerBridge.TryReloadRegisteredScriptWithClass(IntPtr scriptPtr) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs:line 579
  modules/mono/glue/runtime_interop.cpp:1325 - System.ArgumentException: An item with the same key has already been added. Key: Presenter`2[AppListModel,IGridView]
     at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
     at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
     at Godot.Bridge.ScriptManagerBridge.ScriptTypeBiMap.Add(IntPtr scriptPtr, Type scriptType) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.types.cs:line 23
     at Godot.Bridge.ScriptManagerBridge.TryReloadRegisteredScriptWithClass(IntPtr scriptPtr) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs:line 579
  modules/mono/glue/runtime_interop.cpp:1325 - System.ArgumentException: An item with the same key has already been added. Key: ArrayPresenter`2[IdeaListModel,IdeaModel]
     at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
     at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
     at Godot.Bridge.ScriptManagerBridge.ScriptTypeBiMap.Add(IntPtr scriptPtr, Type scriptType) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.types.cs:line 23
     at Godot.Bridge.ScriptManagerBridge.TryReloadRegisteredScriptWithClass(IntPtr scriptPtr) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs:line 579
  modules/mono/glue/runtime_interop.cpp:1325 - System.ArgumentException: An item with the same key has already been added. Key: Presenter`2[IdeaListModel,IGridView]
     at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
     at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
     at Godot.Bridge.ScriptManagerBridge.ScriptTypeBiMap.Add(IntPtr scriptPtr, Type scriptType) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.types.cs:line 23
     at Godot.Bridge.ScriptManagerBridge.TryReloadRegisteredScriptWithClass(IntPtr scriptPtr) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs:line 579

The error seems to reference a parent class I have made:
public abstract partial class Presenter<M, V> : MarginContainer where M : Resource where V : class {}
public partial class FundsPresenter : Presenter<FundsModel, FundsView> {}
public partial class IdeaListPresenter : ArrayPresenter<IdeaListModel, IdeaModel> {}
etc.

Then I get this error on repeat on the second reload (Step 6):


.NET: Failed to unload assemblies. // This line doesn't repeat
modules/mono/managed_callable.cpp:92 - Condition "delegate_handle.value == nullptr" is true.
Can't get method on CallableCustom "Delegate::Invoke".
core/object/object.cpp:1080 - Error calling from signal 'timeout' to callable: 'Node::': Method not found.

I don't mind providing my entire project if it helps diagnose the problem, though it's quite messy. It just takes commenting and uncommenting a line to cause the issue. I'll do some more research and see if I can simplify the reproduction.

Edit: Well I created a simple reproduction. Let me get a write up of it and tidy it up then I'll post it.

Here it is, there's a readme in the project:
BugTest-70026.zip
Let me know if there's any issues. It's easier to recreate in my project but this should hopefully provide what's needed

@paochapro
Copy link

@dannymate In my case the issue in your reproduction appears in 4.1 beta 1, but running in 4.0 stable or 4.0.3 stable doesn't cause the issue for some reason. I guess 4.1 beta changes something? I also having this issue in my own project that appears in 4.0 stable and in 4.1 beta 1.

@dannymate
Copy link

dannymate commented Jun 11, 2023

Well from what I gather it seems the first error, with the dictionary entries, is related to ScriptManagerBridge.cs line 579 in which it tries to add the Type which is loaded from an assembly to a ScriptTypeBiMap object.

Inside the ScriptTypeBiMap it tries to add the Type as a key but it seems duplicated. I'm not sure why it's Presenter<FundsModel, FundsView> instead of FundsPresenter for example but it seems how it figures out the Type may be part of the problem.

Another thing that could help is adding checking for duplicated keys in ScriptTypeBiMap before adding to dictionary or using TryAdd.

I'm working off the assumption that the second error is a direct byproduct of the first error.

Edit: Unsure if this TODO is related: https://github.com/godotengine/godot/blob/37d1dfef9d81aade27ab0c56fc6b6f12f6a08045/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.types.cs#LL20C1-L21C1

@soenanda
Copy link

I'm experiencing the same problem in 4.0.3 stable and I have had this problem in previous versions (of Godot 4) as well. It even happens if I have an empty scene set as the main scene with nothing else (no scripts whatsoever) attached to it. Sometimes it happens when I start a new project. And sometimes I make a change to my C# class (just anything, really) and suddenly I'm getting that same repeating error and I have to restart Godot to make it disappear (only for it to come back when I hit play).

@N0zzy
Copy link

N0zzy commented Jun 22, 2023

this problem is present in version 4.0.3 of c#. problem is stable.

@dannymate
Copy link

dannymate commented Jul 7, 2023

Tested my project and MRP in 4.1 and still getting this issue.

There are some slight differences and improvements however.

  • The console doesn't get spammed anymore.
  • The first error, "An item with the same key...", actually appears when first running the game even before any changes are made. And the ".Net failed to load assemblies" shows after one change.
  • I don't always have to delete the .Godot folder but sometimes I do.
  • Any changes I make to a games code after this error occurs do get reflected now.
  • [GlobalClass] won't show up on build after this error occurs. Changes to a Resource, like adding an export, don't show in the editor after this error occurs.
  • Possibly some weird behaviour but could also be due to the update to 4.1.

Overall still a big issue for me and is getting in the way of developing my game.

@wp2000x
Copy link

wp2000x commented Jul 10, 2023

I have this problem too with my C# game+plugin project since 4.0 (but it got worser in 4.1). Before i just ignored it and it worked. But now in 4.1, when i build my project in Visual Studio, Godot starts to drop ".NET failed to unload assemblies" and delegate_handle errors, until i restart the engine. As a mitigation workaround for now i add the plugin instance child to GetEditorMainScreen() only when it really is pressed, so the errors start to drop only when i used the plugin, but its very annoying.

2023-07-10_19-34-46

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

No branches or pull requests