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

Allow compiling orchestrator as doubles. #450

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fire
Copy link
Contributor

@fire fire commented Jun 28, 2024

Fixes #447 - Currently hard set to doubles for testing, needs a better design for how to release.

@fire
Copy link
Contributor Author

fire commented Jun 29, 2024

@Naros Would you know how to get more debug symbols? The unsymbolated crash makes it hard to debug.

@Naros
Copy link
Member

Naros commented Jun 29, 2024

Can you roll the branch forward to the lastest main and see if that fixes it @fire ?

Sorry, I see you have all the GH-421 fixes; so with Godot 4.3 that should be all that's needed. Let me build the PR and Editor with doubles to see if I can see whats going on.

UPDATE
I assume by crashes, you're seeing this right as the editor starts, it crashes out:

Godot Engine v4.3.beta.custom_build.811ce36c6 (2024-06-28 13:55:14 UTC) - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 545.92 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3080 Ti

Editing project: E:/GitHub/godot-orchestrator/project

Actually that was because local build wasn't applying double-precision on the GDExtension, rebuilding again ⏲️

Here's the failure reason:

image

@fire
Copy link
Contributor Author

fire commented Jun 30, 2024

Made an issue godotengine/godot-cpp#1512.

Also, I noticed that execution of the game doesn't crash.

@Naros
Copy link
Member

Naros commented Jun 30, 2024

Ya the execution/runtime code doesn't use Curve2D, it's only used for rendering the GraphEdit connection lines, which is an EditorPlugin only code path, so that makes complete sense.

It's still bizarre why Curve2D.add_point causes this issue, as I haven't seen this before. I did check the extension_api hash and compared that to what I saw in the generated files, it seems to align other than there is an alternative hash for this function call that I don't see on others 🤷 . Hopefully David can give some more insight on the godot-cpp issue.

@Naros
Copy link
Member

Naros commented Jun 30, 2024

@fire I wonder if it would make sense to also do what is suggested here:
godotengine/godot-cpp#1145

I like the idea of using GODOT_ prefixes for godot specific bits to separate settings specifically from things that are Orchestrator only. WDYT?

@fire
Copy link
Contributor Author

fire commented Jun 30, 2024

I think it's a good idea, but I am not stuck to it.

Edited:

Do you want me to apply those changes?

@Naros
Copy link
Member

Naros commented Jun 30, 2024

If you don't mind, I'd appreciate it 👍

@Naros
Copy link
Member

Naros commented Aug 16, 2024

Hi @fire so I was coming back to this PR to get it merged, and now I'm not so sure the issue is (at least a Godot one).

In debugging, what I notice is that the hash passed into ClassDB::get_method_with_compatibility is 4175465202; however, the value that Godot expects is 3343370600. When I check gdextension_compat_hashes for Curve2D, I see this:

	mappings.insert("Curve2D", {
#ifdef REAL_T_IS_DOUBLE
		{ "add_point", 529706502, 3343370600 },
#else
		{ "add_point", 2437345566, 4175465202 },
#endif
	});

Given that when REAL_T_IS_DOUBLE isn't set in the engine, the value that we're passing into the ClassDB method matches, so this would lead me to think that godot-cpp is either (a) not handling doubles or (b) we aren't setting this in our build correctly.

Actually, 4175465202 is what is in the extension_api.json even when pulled from a double-based editor build, so maybe the issue is with the exporting of the extension_api.

Actually, my mistake, I accidentally dumped the API from the wrong executable 🫨
I should have followed the entire discussion in the other thread :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow orchestrator to work on precision=double
2 participants