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

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

Open
brcontainer opened this issue Nov 23, 2024 · 8 comments · May be fixed by #99695
Open

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

brcontainer opened this issue Nov 23, 2024 · 8 comments · May be fixed by #99695

Comments

@brcontainer
Copy link

brcontainer commented Nov 23, 2024

Tested versions

  • Reproducible in:
  • NOT reproducible in:

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
Copy link
Author

brcontainer commented Nov 23, 2024

The possible cause of the problem was this commit: aa40773

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
Copy link
Member

AThousandShips commented Nov 23, 2024

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);

@brcontainer
Copy link
Author

@AThousandShips Thanks for the quick reply. I actually hadn't seen the editor_node.h file. 👍

@peterdang1502
Copy link

@brcontainer @AThousandShips I'm trying to get started with contributing to open source projects, do you guys mind if I take a look at this one?

@AThousandShips
Copy link
Member

Go right ahead

@peterdang1502
Copy link

I was able to reproduce in only v4.4.dev4.official and v4.4.dev5.official, but not v4.4.dev3.official like mentioned above. But considering the breaking change was merged after the above v4.4.dev3.official commit, I don't think it should have been reproducable.

@brcontainer
Copy link
Author

@peterdang1502 Hi! At "dev" (or even during the "beta" phase) it's normal for some things to break, so the steps are important, and that is why these phases exist.

I just didn't send a pull request to fix it, because I don't have the ability to configure the build environment at the moment to ensure that this will actually solve the problem.

If you can compile on your machine, following the instructions: https://docs.godotengine.org/en/stable/contributing/development/compiling/, you will be able to confirm whether adjusting the line

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

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

will solve the problem or if you need something else, and then you can send a pull request. 👍

@peterdang1502
Copy link

@brcontainer hi thank you for your help! I was able to confirm the change worked and have put up a PR earlier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Unassessed
3 participants