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

Orchestrator Signal and Functions are initialized with incorrect usage flags #255

Closed
Naros opened this issue Apr 16, 2024 · 1 comment · Fixed by #420
Closed

Orchestrator Signal and Functions are initialized with incorrect usage flags #255

Naros opened this issue Apr 16, 2024 · 1 comment · Fixed by #420
Labels
bug/confirmed Bug/regression has been confirmed. cherrypick:2.0 Requires cherry-pick to Orchestrator 2.0 kind/bug A bug or regression in expected behavior. requires/godot-fix Requires some upstream Godot change.
Milestone

Comments

@Naros
Copy link
Member

Naros commented Apr 16, 2024

Describe the bug

The PropertyInfo struct initializes the usage property as 7 rather than as PROPERTY_USAGE_DEFAULT, which is 6. This seems to be a disconnect between GDExtension's godot-cpp source and the upstream Godot Engine changes made in 2022.

Expected behavior

Signal and Function arguments and return values should be initialized with 6 (PROPERTY_USAGE_DEFAULT).

Actual behavior

Signal and Function arguments and return values should be initialized with 7 (PROPERTY_USAGE_DEFAULT + 1).

How to Reproduce?

Create any Signal or Function and look at its return value or method arguments.

Godot full version

4.2.1-stable

Orchestrator version

2.0.stable

Additional information

Orchestrator can prevent this bug by simply ensuring that the PropertyInfo usage property is initialized using the engine's PROPERTY_USAGE_DEFAULT value rather than relying on the struct's initial value.

We'll likely need to define a clean-up hook for existing Orchestrations to sanitize the OScriptFunction and OScriptSignal definitions. This should not affect standard method data from the serialized engine.

@Naros Naros added kind/bug A bug or regression in expected behavior. requires/godot-4.3 Requires Godot 4.3 bug/confirmed Bug/regression has been confirmed. cherrypick:2.0 Requires cherry-pick to Orchestrator 2.0 labels Apr 16, 2024
@Naros
Copy link
Member Author

Naros commented Apr 17, 2024

Fixed in godot-cpp as godotengine/godot-cpp#1440

This is being backported for Godot 4.1, 4.2, and fixed in Godot 4.3

@Naros Naros removed the requires/godot-4.3 Requires Godot 4.3 label Apr 17, 2024
@Naros Naros added this to the 2.1 milestone Apr 21, 2024
@Naros Naros added the requires/godot-fix Requires some upstream Godot change. label Apr 21, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/confirmed Bug/regression has been confirmed. cherrypick:2.0 Requires cherry-pick to Orchestrator 2.0 kind/bug A bug or regression in expected behavior. requires/godot-fix Requires some upstream Godot change.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant