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

Crash when calling methods C++ due to GDExtension API break between 4.0 and 4.0.2 #1107

Closed
RhapsodyInGeek opened this issue May 3, 2023 · 2 comments
Labels
archived bug This has been identified as a bug topic:gdextension This relates to the new Godot 4 extension implementation

Comments

@RhapsodyInGeek
Copy link

RhapsodyInGeek commented May 3, 2023

Game crashes when calling play() from an AnimationPlayer, AudioStreamPlayer3D, AudioStreamPlayer2D, or AudioStreamPlayer via a GDExtension Class. Log provides the following error:

USER ERROR: Hash mismatch for method 'AnimationPlayer.play'.
   at: gdextension_classdb_get_method_bind (core/extension/gdextension_interface.cpp:990)

This occurs in both mono and standard Godot 4.0.2 versions. It seems to have been introduced in 4.0.2, as the play() method functions properly in 4.0.1 and 4.0. The crash only happens when the method is called from C++; GDScript calls function normally with no apparent issues. I have not tested calling from C#.

Strangely enough, no other methods seemed to cause any issues with those nodes: only play(). Have not tested any other nodes that have a play() method.

@dsnopek
Copy link
Collaborator

dsnopek commented May 3, 2023

This is related to issue godotengine/godot#75779

Until this is resolved (if it's resolved - there is some discussion about that on the issue), you'll need to recompile your GDExtension using the latest godot-cpp on the 4.0 branch in order for it to work with Godot 4.0.2

@Calinou
Copy link
Member

Calinou commented May 3, 2023

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2023
@Calinou Calinou added bug This has been identified as a bug archived topic:gdextension This relates to the new Godot 4 extension implementation labels May 3, 2023
@Calinou Calinou pinned this issue May 3, 2023
@Calinou Calinou changed the title Crash when calling play() method from C++, AnimationPlayer, AudioStreamPlayer Crash when calling methods C++ due to GDExtension API break between 4.0 and 4.0.2 May 3, 2023
@akien-mga akien-mga unpinned this issue Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archived bug This has been identified as a bug topic:gdextension This relates to the new Godot 4 extension implementation
Projects
None yet
Development

No branches or pull requests

3 participants