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 error after building a C# class that inherits from RigidDynamicBody3D #65252

Closed
timshannon opened this issue Sep 2, 2022 · 6 comments
Closed

Comments

@timshannon
Copy link

Godot version

v4.0.alpha.mono.custom_build [8c7be63]

System information

Ubuntu 22.04

Issue description

When building a class that inherits from RigidDynamicBody3D, the editor starts throwing the following error over and over again:

Godot Engine v4.0.alpha.mono.custom_build (c) 2007-2022 Juan Linietsky, Ariel Manzur & Godot Contributors.
--- Debug adapter server started ---
--- GDScript language server started ---
Copying Godot Offline Packages...
  .NET: Failed to load project assembly.
  modules/mono/managed_callable.cpp:90 - Condition "delegate_handle.value == nullptr" is true.
  Can't get method on CallableCustom "Delegate::Invoke".
  core/object/object.cpp:1057 - Error calling from signal 'timeout' to callable: 'ManagedCallableMiddleman::': Method not found..
  modules/mono/managed_callable.cpp:90 - Condition "delegate_handle.value == nullptr" is true.
  Can't get method on CallableCustom "Delegate::Invoke".
  core/object/object.cpp:1057 - Error calling from signal 'timeout' to callable: 'ManagedCallableMiddleman::': Method not found..
  modules/mono/managed_callable.cpp:90 - Condition "delegate_handle.value == nullptr" is true.
  Can't get method on CallableCustom "Delegate::Invoke".
  core/object/object.cpp:1057 - Error calling from signal 'timeout' to callable: 'ManagedCallableMiddleman::': Method not found..

You cannot rebuild the project or do much of anything after that. The only way I can make the editor usable again is by deleting the .godot/mono folder.

Note, this is with the dotnet6 merge and using dotnet6 not mono, and the error seemed to start happening right at that merge.

Steps to reproduce

Either open the attached project and build it, or simple add the following class to an existing project:

using Godot;

public partial class SkinnedRigidBody : RigidDynamicBody3D
{


}

Minimal reproduction project

Bug.zip

@RedMser
Copy link
Contributor

RedMser commented Sep 2, 2022

Could be related to #64894? Class is called RigidBody3D again.

@timshannon
Copy link
Author

Ah, I didn't realize it was renamed again. That might be the issue, although my intellisense says that the name is still RigidDynamicBody3D. Maybe something is wrong with my build from source.

@timshannon
Copy link
Author

Yeah literally just git pulled from master, rebuilt, and I can't build my project with RigidBody3D:

 The type or namespace name 'RigidBody3D' could not be found (are you missing a using directive or an assembly reference?)

Here's how I'm building

scons -j$(nproc) p=linuxbsd target=release_debug use_lto=yes tools=yes module_mono_enabled=yes mono_glue=no 
bin/godot.linuxbsd.opt.tools.x86_64.mono --generate-mono-glue modules/mono/glue
scons -j$(nproc) p=linuxbsd target=release_debug use_lto=yes tools=yes module_mono_enabled=yes mono_glue=yes
scons -j$(nproc) p=linuxbsd target=release_debug use_lto=yes tools=no module_mono_enabled=yes mono_glue=yes
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir ./bin

@raulsntos
Copy link
Member

Those commands look outdated, they changed when we moved to .NET 6.0 in #64089. Take a look at the new instructions in the README.md.

  • The mono_glue argument has been removed.
  • There is no need to build the engine a second time.
  • You should use the --push-nupkgs-local argument to push the NuGet packages to your local repository (or you could do this step manually but I don't recommend it).

These are probably the commands you should be using (make sure you create the local NuGet repository first if you haven't done so yet):

scons -j$(nproc) p=linuxbsd target=release_debug use_lto=yes tools=yes module_mono_enabled=yes
bin/godot.linuxbsd.opt.tools.x86_64.mono --generate-mono-glue modules/mono/glue
scons -j$(nproc) p=linuxbsd target=release_debug use_lto=yes tools=no module_mono_enabled=yes
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir ./bin --push-nupkgs-local ~/MyLocalNugetSource

@timshannon
Copy link
Author

timshannon commented Sep 2, 2022

Ah, I thought the build_assemblies.py took care of the NuGet repository as well, I misunderstood.

@timshannon
Copy link
Author

Yep, confirmed. Definitely an issue with my build.

Apologies for adding noise, and thanks @raulsntos for the help.

@akien-mga akien-mga added archived and removed bug labels Sep 2, 2022
@akien-mga akien-mga removed this from the 4.0 milestone Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

5 participants