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

GDExtension: _ready, _enter_tree, _process, etc. not being called anymore #82377

Closed
minoaut opened this issue Sep 26, 2023 · 6 comments
Closed
Assignees
Milestone

Comments

@minoaut
Copy link

minoaut commented Sep 26, 2023

Godot version

v4.2.dev.custom_build [7e67b49]

System information

Ubuntu 23.04 Lunar Lobster

Issue description

After the latest Godot rebuild from git none of these virtual functions are called anymore:
void _ready() override;
void _enter_tree() override;
void _exit_tree() override;
void _process(double delta) override;
void _physics_process(double delta) override;

My project is borked, won't even start anymore. I'll include simple sample code below. I suppose all GDExtension code is affected.

Is this related to #80284? If yes how can I turn reloading of GDExtensions off?

Steps to reproduce

  • unzip sample code
  • cd gdextension_notifications_not_called
  • make
  • godot -e
  • godot

expected output:
TestMesh::TestMesh()
TestMesh::_enter_tree()
TestMesh::_ready()
TestMesh::_process()
TestMesh::_physics_process()
...

actual output:
TestMesh::TestMesh()

Minimal reproduction project

gdextension_notifications_not_called.zip

@akien-mga akien-mga added this to the 4.2 milestone Sep 26, 2023
@akien-mga akien-mga changed the title [Regression] GDExtension: _ready, _enter_tree, _process, etc. not being called anymore GDExtension: _ready, _enter_tree, _process, etc. not being called anymore Sep 26, 2023
@dsnopek
Copy link
Contributor

dsnopek commented Sep 26, 2023

Which commit of godot-cpp are you using? You need to use godotengine/godot-cpp@bf2f9e2 in order for it to be compatible with the latest Godot master.

I've definitely tested _ready and _process together with the hot reloading PRs, and they should be working fine.

@dsnopek
Copy link
Contributor

dsnopek commented Sep 26, 2023

I just checked in the MRP attached to this issue, and it's using godotengine/godot-cpp@c44c3d5 (one commit behind master) which is probably the source of the problem.

I also quickly retested with one of my test projects and the latest master of both Godot and godot-cpp, and _process and _ready were working fine!

@minoaut
Copy link
Author

minoaut commented Sep 26, 2023

I only ever fetch from latest Godot master. The latest commit was 7e67b49. It's in the godot version above.
I thought too I must have done something wrong, but there was nothing I changed except from pulling the latest Godot. The sample code seemed to confirm there is an issue, so here I am :).

@dsnopek
Copy link
Contributor

dsnopek commented Sep 26, 2023

I only ever fetch from latest Godot master. The latest commit was 7e67b49. It's in the godot version above.

I'm talking about godot-cpp master. In your MRP, you've got godot-cpp at godotengine/godot-cpp@c44c3d5 whereas you need to use godotengine/godot-cpp@bf2f9e2 for it to be compatible with Godot master.

(At least at the moment, if another change is made to Godot master that requires a companion change to godot-cpp, then you may need a newer commit in the future.)

@minoaut
Copy link
Author

minoaut commented Sep 26, 2023

I pulled https://github.com/godotengine/godot-cpp fresh before I posted. But I see there's a new commit now. Let me try.

@minoaut
Copy link
Author

minoaut commented Sep 26, 2023

Yep, sample gets notifications again. Big project still crashes on Intel but runs now on NVIDIA at least. Different issue.
I guess I picked an unlucky time to upgrade. Thanks for your help.

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

3 participants