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

Automatically use property count in PropertyListHelper #92283

Merged
merged 1 commit into from
May 30, 2024

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented May 23, 2024

Now that PropertyListHelper has a getter for array size, it can be used instead of manually passing the count when getting property list.
Conflicts with #92282, this should be merged first.

@akien-mga
Copy link
Member

There's a segfault on CI, but no stacktrace. I'd suspect the added memdelete. Maybe it's only created conditionally?

@KoBeWi
Copy link
Member Author

KoBeWi commented May 23, 2024

There is a DEV_ASSERT for existence of array_length_getter, so it should always exist.

@KoBeWi KoBeWi force-pushed the code_simpleton branch 3 times, most recently from 173722b to b0ecbf6 Compare May 24, 2024 14:01
@KoBeWi
Copy link
Member Author

KoBeWi commented May 24, 2024

For some reason the additional checks have helped, but they shouldn't be necessary. It would be nice to know where the code crashed.

@KoBeWi
Copy link
Member Author

KoBeWi commented May 25, 2024

I think I know when can this happen. Constructors for static helpers can run without the class being instantiated, so the object is created and destroyed afterwards, but never initialized.

EDIT:
Improved the code.

@akien-mga akien-mga merged commit 4cd39c5 into godotengine:master May 30, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the code_simpleton branch May 30, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants