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 using Ref<InputEvent> #1100

Closed
redsett opened this issue Apr 27, 2023 · 3 comments
Closed

Crash when using Ref<InputEvent> #1100

redsett opened this issue Apr 27, 2023 · 3 comments
Labels
bug This has been identified as a bug crash topic:gdextension This relates to the new Godot 4 extension implementation
Milestone

Comments

@redsett
Copy link

redsett commented Apr 27, 2023

Platform = Windows
Godot version = 4.0.2-stable
godot-cpp version = feaba55

Issue:
I'm trying to override _unhandled_input, but it crashes when trying to resolve the Ref<>.
void _unhandled_input(const Ref<InputEvent> &p_event) override { }

image

Reverting this commit fixes it. But I'm sure that something else breaks. :)
feaba55

@zhehangd @akien-mga

@dsnopek
Copy link
Collaborator

dsnopek commented Apr 27, 2023

Related to PR #1045

@WiggleWizard
Copy link

For those who need a work around right now and are looking to capture _gui_input()...I found it feasible to simply make your own method in your custom Node that takes a Ref<InputEvent> then override _gui_input in GDScript and call your method. Could likely be applied to the other method overrides that require a Ref<>& that are crashing.

@Calinou Calinou added bug This has been identified as a bug crash topic:gdextension This relates to the new Godot 4 extension implementation labels Apr 29, 2023
@Calinou Calinou changed the title [GDExtension] Crash when using Ref<InputEvent> Crash when using Ref<InputEvent> Apr 29, 2023
@dsnopek
Copy link
Collaborator

dsnopek commented Jun 8, 2023

This should be fixed by godotengine/godot#77410 and #1123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This has been identified as a bug crash topic:gdextension This relates to the new Godot 4 extension implementation
Projects
None yet
Development

No branches or pull requests

5 participants