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

[.NET] Use ObjectID when converting Variant to GodotObject #98034

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

raulsntos
Copy link
Member

@raulsntos raulsntos added bug topic:dotnet crash cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Oct 9, 2024
@raulsntos raulsntos added this to the 4.4 milestone Oct 9, 2024
@raulsntos raulsntos requested a review from a team as a code owner October 9, 2024 19:25
Copy link
Member

@paulloz paulloz 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, and seems fine throughout my testing 👍

Now, the big discussion is about how we feel about returning null here. For me, it's kinda problematic in NRT context, when working with an Array<Foo> (not Array<Foo?>), and still potentially be given a null value 🤔 But I guess the only alternative is keeping a potential InvalidCastException, which does not feel particularly good either.

@akien-mga akien-mga modified the milestones: 4.4, 4.5 Feb 24, 2025
@akien-mga akien-mga added cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release and removed cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Feb 24, 2025
@akien-mga akien-mga merged commit a414fed into godotengine:master Mar 4, 2025
19 checks passed
@akien-mga
Copy link
Member

Thanks!

@raulsntos raulsntos deleted the dotnet/variant-object-id branch March 4, 2025 03:18
@akien-mga
Copy link
Member

Cherry-picked for 4.4.1.

@akien-mga akien-mga removed the cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release label Mar 12, 2025
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 crash topic:dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C#: ChkCastAny InvalidCastException caused by freeing instances with references in Godot.Collections.Array<T>
3 participants