Skip to content

Conversation

@endel
Copy link
Member

@endel endel commented Oct 24, 2025

WIP barebones platforms/godot structure to experiment with GDExtension for Godot 4+.

Following this user guide: https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_c_example.html

The extension is currently not loading in Godot. It's SEGFAULTING with the following:

handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.5.1.stable.official (f62fdbde15035c5576dad93e586201f4d41ef0cb)
Dumping the backtrace. Please include this when reporting the bug on: https://github.com/godotengine/godot/issues
[1] 1   libsystem_platform.dylib            0x000000018c5e2a24 _sigtramp + 56
[2] GDExtensionEditorHelp::load_xml_buffer(unsigned char const*, int)
[3] GDExtensionEditorHelp::load_xml_buffer(unsigned char const*, int)
[4] GDExtension::_register_extension_class_method(void*, void const*, GDExtensionClassMethodInfo const*) (in Godot) + 448
[5] 5   libcolyseus_godot.macos.debug.dylib 0x00000001125298b4 bind_method_0_with_ret + 344
[6] 6   libcolyseus_godot.macos.debug.dylib 0x0000000112528f98 register_colyseus_client + 416
[7] 7   libcolyseus_godot.macos.debug.dylib 0x0000000112528c84 colyseus_initialize + 48
[8] GDExtensionManager::initialize_extensions(GDExtension::InitializationLevel) (in Godot) + 92
[9] Main::setup2(bool) (in Godot) + 17884
[10] Main::setup(char const*, int, char**, bool) (in Godot) + 96336
[11] OS_MacOS_NSApp::start_main() (in Godot) + 52

@endel
Copy link
Member Author

endel commented Oct 24, 2025

Fixed the segfault errors, now it's somewhat working - still lots of dead/bad code and pending improvements, but it's a valid proof of concept...

Screen.Recording.2025-10-23.at.23.37.07.mov

@endel endel marked this pull request as ready for review October 24, 2025 02:27
@endel endel changed the title wip godot experiment (not working yet) wip godot experiment Oct 24, 2025
@imperiumplay
Copy link
Collaborator

SEGFAULTING is because of c code or the export?

@endel
Copy link
Member Author

endel commented Oct 24, 2025

The SEGFAULT was my fault, I was doing bad calls for the Godot bindings 🙈

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.

3 participants