Skip to content

Conversation

@aaronfranke
Copy link
Member

I had a bad [enum ...] in my documentation XML. This was crashing the C# bindings generator, because the code was running p_target_itype->is_intentionally_ignored without checking if p_target_itype is null or not.

Note that these functions have code paths for dealing with a null p_target_itype, so it seems to not be a case where we can simply have guard clauses. In most of the functions calling is_intentionally_ignored the code already checked for a null p_target_itype and used a different code path, but this was missing only for the error case of enums.

I've marked this as cherrypick for 4.3 and 4.4. The bug seems to also exist in 4.2 and earlier but the code is a bit different so the cherrypick can't be done automatically, and I don't know if it's worth the effort for such an old branch.

@aaronfranke aaronfranke added this to the 4.5 milestone Jul 4, 2025
@aaronfranke aaronfranke requested a review from a team as a code owner July 4, 2025 03:56
@aaronfranke aaronfranke added topic:dotnet crash cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release labels Jul 4, 2025
Copy link
Member

@raulsntos raulsntos left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks!

@Repiteo Repiteo merged commit 320484a into godotengine:master Jul 7, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jul 7, 2025

Thanks!

@aaronfranke aaronfranke deleted the csharp-crash-bad-enum branch July 7, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release crash topic:dotnet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants