Skip to content

Properties bound by _set(), _get(), _get_property_list() will lost name,hint,hint_string. #921

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

Closed
Daylily-Zeleen opened this issue Nov 11, 2022 · 5 comments · Fixed by #940
Labels
bug This has been identified as a bug regression
Milestone

Comments

@Daylily-Zeleen
Copy link
Contributor

Daylily-Zeleen commented Nov 11, 2022

The demo Example Node's properties:
image

I found that in GDExtension side, the PropertyInfo in _get_property_list() will be append successfully, all infomation are exist.
But in godot core, the StringName which reinterpret_cast from GDNativeStringNamePtr will be a empty string, and String which reinterpret_cast from GDNativeStringPtr usually throw a "read access violation" exception in String's constructor( it is not occur certainly, but almost certainly).
image

I'm pretty sure this is a bug introduced recently, I have been using _set(), _get(), _get_property_list() in GDExtension for some time.

@groud
Copy link
Member

groud commented Nov 28, 2022

Hmm, I've just stumbled upon this bug, but no crash on my side. It made it impossible for me to save some custom resources defined in a GDExtension with ResourceSaver.save.

@Daylily-Zeleen
Copy link
Contributor Author

Hmm, I've just stumbled upon this bug, but no crash on my side. It made it impossible for me to save some custom resources defined in a GDExtension with ResourceSaver.save.

Crash may be an another bug, but I can't spcify what is the reson. Usually happen with String and StringName.

@groud
Copy link
Member

groud commented Nov 28, 2022

I am wondering if #896 could have cause the issue. Have you updated godot-cpp just before opening this issue ? That would fit the timing. (The PR is from 20 days ago while the issue is 17 days old)

Edit: I definitely think this is it. See this diff: https://github.com/godotengine/godot-cpp/pull/896/files#diff-cb29153262065800fe4d2a03e07fe4cee9252eed9aaef30bf96fb1af265b7797L223-L227

@Daylily-Zeleen
Copy link
Contributor Author

Yes, this issue is happen after pulling #896. But I have not ablility to find out the reason from this diff. I hope someone can repair it.

@touilleMan
Copy link
Member

@Daylily-Zeleen can you test #940 and see if it fix your issue ?

@akien-mga akien-mga added bug This has been identified as a bug regression labels Nov 29, 2022
@akien-mga akien-mga added this to the 4.0 milestone Nov 29, 2022
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 regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants