-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Exporting project in release configuration makes optinal Gd references empty without a debug build #664
Comments
Thanks for reporting and the detailed description!
Note that we currently do have a CI run that checks a Rust release build ( gdext/.github/workflows/full-ci.yml Lines 293 to 298 in e7cc362
And there is also gdext/itest/rust/src/object_tests/property_test.rs Lines 374 to 383 in 0b31e79
However, we don't involve the editor here. Does your problem only appear if you set an object from the editor, and then run it? Not if you set it programmatically? If yes, could you show the persisted scene file (with the other node attached) in both Release/Debug? |
I assume that it will only appear if I set the reference in the editor, as the nodes themselves are functioning properly so I could probably set any reference to any other node at run-time. I'll try to check this later though. Here's the scene file I used: [gd_scene format=3 uid="uid://vmll78trsph2"]
[node name="Node3D" type="Node3D"]
[node name="TestNode" type="TestNode" parent="." node_paths=PackedStringArray("other")]
value = 42
other = NodePath("../TestNode2")
[node name="TestNode2" type="TestNode" parent="." node_paths=PackedStringArray("other")]
value = 43
other = NodePath("../TestNode") I tried it in the editor manually and from the command line too with I checked your CI script and if I understand it properly then the |
Steps to reproduce
#[export] other: Option<Gd<Node>>
value. Print its value in the ready function.System information
Reproduced in a clean minimal project with Godot v4.2.1 on Windows, but I saw it in a normal project in v4.3-dev5 and on Linux too. Tried with gdext@e7cc36 (2024-04-15).
To make sure that it's only the
Option<Gd<Node>>
that doesn't get its value initialized I added another field with a primitive type like#[export] value: i32
set to non-zero value in the project and that indeed prints its proper value.Expected output
(From a release build where debug build was also present.)
Actual output
Note that the actual dll copied to the exported folder is the proper release configuration library. It just looks like that references are not initialized when the debug library is not present.
I have the feeling that it's expected to have a debug build of the godot-rust library always, as opening the project in the editor also shows missing components without it, however the export itself seem to be capable of handling the types and primitives of the library so I'd think that it's just malfunctioning right now. Also this may not be a normal use case in the editor, but in CI build pipelines it would be normal to have only a release build job, without any debug build artifacts.
Thank you very much
The text was updated successfully, but these errors were encountered: