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

Double precision Godot editor crashes #260

Open
dragonhunt02 opened this issue Feb 6, 2025 · 0 comments
Open

Double precision Godot editor crashes #260

dragonhunt02 opened this issue Feb 6, 2025 · 0 comments

Comments

@dragonhunt02
Copy link

dragonhunt02 commented Feb 6, 2025

Using a custom double precision Godot build. https://github.com/V-Sekai/world-godot/releases/tag/latest.v-sekai-editor-167

After adding asset/addons/godotopenxrtools to v-sekai-game project addons folder, editor crashes when loading project with error

*** stack smashing detected ***: terminated

This issue is not present on single precision builds of our editor.

I tried compiling this addon with a generated api dump at double precision

scons platform=android target=template_debug precision=double arch=x86_64 custom_api_file=thirdparty/godot_cpp_gdextension_api/extension_api.json build_profile=thirdparty/godot_cpp_build_profile/build_profile.json
scons platform=android target=template_release precision=double arch=x86_64 custom_api_file=thirdparty/godot_cpp_gdextension_api/extension_api.json build_profile=thirdparty/godot_cpp_build_profile/build_profile.json

however build fails with several warnings/errors

...
Compiling thirdparty/godot-cpp/gen/src/classes/ref_counted.cpp ...
Compiling thirdparty/godot-cpp/gen/src/classes/primitive_mesh.cpp ...
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:169:5: error: non-constant-expression cannot be narrowed from type 'godot::real_t' (aka 'double') to 'float' in initializer list [-Wc++11-narrowing]
                { quat.x, quat.y, quat.z, quat.w }, // orientation
                  ^~~~~~
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:169:5: note: insert an explicit cast to silence this issue
                { quat.x, quat.y, quat.z, quat.w }, // orientation
                  ^~~~~~
                  static_cast<float>( )
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:169:13: error: non-constant-expression cannot be narrowed from type 'godot::real_t' (aka 'double') to 'float' in initializer list [-Wc++11-narrowing]
                { quat.x, quat.y, quat.z, quat.w }, // orientation
                          ^~~~~~
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:169:13: note: insert an explicit cast to silence this issue
                { quat.x, quat.y, quat.z, quat.w }, // orientation
                          ^~~~~~
                          static_cast<float>( )
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:169:21: error: non-constant-expression cannot be narrowed from type 'godot::real_t' (aka 'double') to 'float' in initializer list [-Wc++11-narrowing]
                { quat.x, quat.y, quat.z, quat.w }, // orientation
                                  ^~~~~~
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:169:21: note: insert an explicit cast to silence this issue
                { quat.x, quat.y, quat.z, quat.w }, // orientation
                                  ^~~~~~
                                  static_cast<float>( )
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:169:29: error: non-constant-expression cannot be narrowed from type 'godot::real_t' (aka 'double') to 'float' in initializer list [-Wc++11-narrowing]
                { quat.x, quat.y, quat.z, quat.w }, // orientation
                                          ^~~~~~
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:169:29: note: insert an explicit cast to silence this issue
                { quat.x, quat.y, quat.z, quat.w }, // orientation
                                          ^~~~~~
                                          static_cast<float>( )
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:170:5: error: non-constant-expression cannot be narrowed from type 'godot::real_t' (aka 'double') to 'float' in initializer list [-Wc++11-narrowing]
                { pos.x, pos.y, pos.z }, // position
                  ^~~~~
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:170:5: note: insert an explicit cast to silence this issue
                { pos.x, pos.y, pos.z }, // position
                  ^~~~~
                  static_cast<float>( )
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:170:12: error: non-constant-expression cannot be narrowed from type 'godot::real_t' (aka 'double') to 'float' in initializer list [-Wc++11-narrowing]
                { pos.x, pos.y, pos.z }, // position
                         ^~~~~
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:170:12: note: insert an explicit cast to silence this issue
                { pos.x, pos.y, pos.z }, // position
                         ^~~~~
                         static_cast<float>( )
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:170:19: error: non-constant-expression cannot be narrowed from type 'godot::real_t' (aka 'double') to 'float' in initializer list [-Wc++11-narrowing]
                { pos.x, pos.y, pos.z }, // position
                                ^~~~~
plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.cpp:170:19: note: insert an explicit cast to silence this issue
                { pos.x, pos.y, pos.z }, // position
                                ^~~~~
                                static_cast<float>( )
7 errors generated.
scons: *** [plugin/src/main/cpp/extensions/openxr_fb_spatial_entity_extension_wrapper.os] Error 1
scons: building terminated because of errors.

See also #259

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

No branches or pull requests

1 participant