Skip to content

Conversation

@dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Sep 12, 2024

Fixes #1580

However, this shouldn't ever happen, if developers use the GDVIRTUAL*() macros, which will always call this with arguments metadata of the correct size.

@dsnopek dsnopek added bug This has been identified as a bug crash labels Sep 12, 2024
@dsnopek dsnopek added this to the 4.x milestone Sep 12, 2024
@dsnopek dsnopek requested a review from a team as a code owner September 12, 2024 14:13
@Ivorforce
Copy link
Member

Ivorforce commented Oct 16, 2024

If I understand it correctly, the handled failure case here would be a developer error. I would argue instead of silently failing, we should check for argument congruity before the loop and hard-fail on problems instead. Or at least, log an error if a problem is detected.

@dsnopek
Copy link
Collaborator Author

dsnopek commented Oct 29, 2024

Discussed at the GDExtension meeting: we agreed on adding a warning if the argument and argument metadata count don't match.

@dsnopek dsnopek force-pushed the classdb-add-virtual-method-arg-metadata-size branch from 0f93a61 to 1e169bb Compare October 29, 2024 18:22
@dsnopek
Copy link
Collaborator Author

dsnopek commented Oct 29, 2024

Added a warning as discussed at the meeting

Copy link
Contributor

@paddy-exe paddy-exe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dsnopek dsnopek merged commit 253e095 into godotengine:master Nov 5, 2024
12 checks passed
@dsnopek
Copy link
Collaborator Author

dsnopek commented Jan 27, 2025

Cherry-picked for 4.3 in PR #1695

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add_virtual_method with parameter crashes engine when loading editor

3 participants