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

[Regression] Script classes instantiated manually in a variable can't call their own instance functions anymore #93715

Closed
reflexguru opened this issue Jun 28, 2024 · 2 comments

Comments

@reflexguru
Copy link

Tested versions

  • Reproducible in 4.3 beta 1 and 4.3 beta 2
  • Not reproducible in 4.3 dev 6 and 4.2.2 stable

System information

Linux - Freedesktop SDK 23.08 (Flatpak runtime) - Wayland - Vulkan (Mobile) - dedicated AMD Radeon RX 6700 XT (RADV NAVI22) () - 12th Gen Intel(R) Core(TM) i5-12400F (12 Threads)

Issue description

Starting from 4.3 beta 1, there's a weird issue that prevents the scripts instantiated in a variable from calling their own instance functions (method not found error). However, it "works" when you make the function static. Our project relies on that and doesn't work at all now.

While the functions can't be called in 4.3 beta 1 and newer, they can be printed to console just fine.

I have searched for a similar issue here, but with no results. If it's a duplicate, please close the issue.

Screenshots and minimal reproduction project are attached below

4.3 dev 6, works fine:
Screenshot from 2024-06-28 22-40-32

4.3 beta 2:
Screenshot from 2024-06-28 22-40-59

Steps to reproduce

  • Create a class that extends the GDScript class with abstract methods for _ready, _process, _physics_process, etc
  • Try calling _ready from _init as an example
  • Try assigning it to a variable of your object
  • See it break in 4.3 beta 1 or newer versions

Minimal reproduction project (MRP)

gd-bug-reproduction.zip

This project is built in 4.2.2 stable, so you can test it in 4.2.x as well

@matheusmdx
Copy link
Contributor

Tested on latest master [811ce36] and this issue was already fixed, probably was the same problem from #92610 and was fixed by #92609

@reflexguru
Copy link
Author

tested in beta 3, works fine now

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

4 participants