godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.33k stars 21.24k forks source link

Error calling deferred method: 'EditorNode::EditorNode::restart_editor' #99571

Open brcontainer opened 7 hours ago

brcontainer commented 7 hours ago

Tested versions

System information

Windows 10 - Godot v4.4-dev5 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050ti

Issue description

When upgrading the meshes using Project > Tools > Upgrade Meshs Surface..., I get the following error:

core/object/message_queue.cpp:222 - Error calling deferred method: 'EditorNode::EditorNode::restart_editor': Method expected 1 arguments, but called with 0.

Image

Then I tested it on a project created from scratch, and the same problem occurs.

Note that before running the new version of Godot I removed the AppData\Local\Godot and AppData\Roaming\Godot folders to ensure there were no conflicts. So the problem should not be related to saved configuration data.

Steps to reproduce

In Editor execute: Project > Tools > Upgrade Meshs Surface...

Minimal reproduction project (MRP)

n/a

brcontainer commented 4 hours ago

The possible cause of the problem was this commit: https://github.com/godotengine/godot/commit/aa4077338bfaeeb47e2722891c80636a25d43ada

I think you forgot to apply the adjustments to the following files:

I didn’t submit a pull request because I currently don’t have the means to build it and verify if anything else is missing. However, I hope this contribution is helpful.

AThousandShips commented 49 minutes ago

Only the first line needs changing, the others use the default argument correctly, it should just be changed to:

callable_mp(EditorNode::get_singleton(), &EditorNode::restart_editor).call_deferred(false);