{"id":26094078,"url":"https://github.com/statismike/loader_saver","last_synced_at":"2026-04-16T20:46:31.829Z","repository":{"id":222366142,"uuid":"754750379","full_name":"StatisMike/loader_saver","owner":"StatisMike","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-13T19:30:21.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-09T12:49:37.958Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StatisMike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-08T17:41:25.000Z","updated_at":"2024-02-08T17:41:32.000Z","dependencies_parsed_at":"2024-02-13T20:48:55.118Z","dependency_job_id":null,"html_url":"https://github.com/StatisMike/loader_saver","commit_stats":null,"previous_names":["statismike/loader_saver"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StatisMike/loader_saver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StatisMike%2Floader_saver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StatisMike%2Floader_saver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StatisMike%2Floader_saver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StatisMike%2Floader_saver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StatisMike","download_url":"https://codeload.github.com/StatisMike/loader_saver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StatisMike%2Floader_saver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31904067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-09T12:49:43.903Z","updated_at":"2026-04-16T20:46:31.783Z","avatar_url":"https://github.com/StatisMike.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Resources _creepy_ user-independent multi-thread handling\n\nSo this little mock project aims to pinpoint the issues that arise after `gdext` introduced additional\nchecks to [cut off calls to `Gd` from other threads](https://github.com/godot-rust/gdext/pull/581).\n\n- Main course is the `ResourceFormatSaver` and `ResourceFormatLoader` created in `gdext`\n  - at the very least, `ResourceFormatLoader`, after registering it in `ResourceLoader` gets some calls\n  from secondary threads via Godot Editor itself - it seems to be non-opt out in Godot.\n  - methods in question are: \n    - ResourceFormatLoader::get_recognized_extensions (rust/src/saver_loader::17)\n    - ResourceFormatLoader::get_resource_type (rust/src/saver_loader::28)\n  - `ResourceFormatSaver` has been tried in-editor (via `InEditorNode` tool singleton), don't seem to be\n  called from another threads but I cannot guarantee it won't. \n  - [Issue](https://github.com/godot-rust/gdext/issues/597)\n- Secondary course is the `WithNested` and `Nested` custom Resources - I've tried to check for them being\n  initialized within other threads, but I cannot reproduce [this panic](https://discord.com/channels/723850269347283004/1206624719931969536)\n\n## Booting up the project without Editor\n\nAll methods are called from the main thread, as signified with `Thread: 1`\n\n```bash\n$godot --headless\nInitialize godot-rust (API v4.2.stable.official, runtime v4.2.stable.official)\nGodot Engine v4.2.stable.official.46dc27791 - https://godotengine.org\n\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::load\nThread: 1: Nested::init\nThread: 1: WithNested::init\nThread: 1: Nested::init\nThread: 1: WithNested::init\nThread: 1: Nested::init\n# @tool node is added as an autoload - can't test the saving from Editor level without it.\n# Probably causes segfault at the end of Editor run (dunno why?). It is also running on Scene\n# (@tool being additive - can't cause a node to NOT run in Scene)\nThread: 1: ToolNode::enter_tree\nThread: 1: Saving MockResource from EDITOR node\nThread: 1: ResourceFormatSaver::recognize\nThread: 1: ResourceFormatSaver::get_recognized_extensions\nThread: 1: ResourceFormatSaver::save\nThread: 1: Loading MockResource from EDITOR node\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::load\n# Test node at the main scene. To test the Saving and Loading using `save()` and `load()`\nThread: 1: TestNode::enter_tree\nThread: 1: Saving MockResource from SCENE node\nThread: 1: ResourceFormatSaver::recognize\nThread: 1: ResourceFormatSaver::get_recognized_extensions\nThread: 1: ResourceFormatSaver::save\nThread: 1: Loading MockResource from SCENE node\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::load\n```\n\n## Booting the project in Editor mode but without Editor\n\nA lot more is going on there, even if the main scene is not being ran. Segfault probably\ncaused by the InEditorNode.\n\nThe only method ran there from another thread is `ResourceFormatLoader::get_recognized_extensions`\n\n```bash\n$godot --headless -e --quit\nInitialize godot-rust (API v4.2.stable.official, runtime v4.2.stable.official)\nGodot Engine v4.2.stable.official.46dc27791 - https://godotengine.org\n \nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::handles_type\nWARNING: Custom cursor shape not supported by this display server.\n     at: cursor_set_custom_image (servers/display_server.cpp:505)\nThread: 1: ResourceFormatSaver::get_recognized_extensions\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: Nested::init\nThread: 1: WithNested::init\nThread: 1: Nested::init\nWARNING: Instantiated MockResource used as default value for TestNode's \"mock\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nWARNING: Instantiated WithNested used as default value for TestNode's \"nested\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nThread: 1: WithNested::init\nThread: 1: Nested::init\nWARNING: Instantiated Nested used as default value for WithNested's \"nested\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\n\n# The only appearance of `ResourceFormatLoader` method from other thread in this run mode!\n\nThread: 14: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::load\nThread: 1: Nested::init\nThread: 1: WithNested::init\nThread: 1: Nested::init\nThread: 1: WithNested::init\nThread: 1: Nested::init\nThread: 1: ToolNode::enter_tree\nThread: 1: Saving MockResource from EDITOR node\nThread: 1: ResourceFormatSaver::recognize\nThread: 1: ResourceFormatSaver::get_recognized_extensions\nThread: 1: ResourceFormatSaver::save\nThread: 1: ResourceFormatLoader::get_resource_type\nThread: 1: ResourceFormatLoader::get_resource_uid\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::get_dependencies\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: Loading MockResource from EDITOR node\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::load\nWARNING: Instantiated MockResource used as default value for TestNode's \"mock\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nWARNING: Instantiated MockResource used as default value for TestNode's \"mock\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nWARNING: Instantiated WithNested used as default value for TestNode's \"nested\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nWARNING: Instantiated WithNested used as default value for TestNode's \"nested\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nSegmentation fault (core dumped)\n```\n\n## Booting the project with Editor\n\nBoth methods are called there from another threads\n    - ResourceFormatLoader::get_recognized_extensions\n    - ResourceFormatLoader::get_resource_type\n\n```bash\n$godot -e\nInitialize godot-rust (API v4.2.stable.official, runtime v4.2.stable.official)\nGodot Engine v4.2.stable.official.46dc27791 - https://godotengine.org\n/lib/x86_64-linux-gnu/libxkbcommon.so.0: undefined symbol: xkb_utf32_to_keysym\n/lib/x86_64-linux-gnu/libxkbcommon.so.0: undefined symbol: xkb_keymap_key_get_mods_for_level\nOpenGL API 4.6 (Core Profile) Mesa 21.2.6 - Compatibility - Using Device: Intel - Mesa Intel(R) HD Graphics 520 (SKL GT2)\n \nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatSaver::get_recognized_extensions\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: Nested::init\nThread: 1: WithNested::init\nThread: 1: Nested::init\nWARNING: Instantiated MockResource used as default value for TestNode's \"mock\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nWARNING: Instantiated WithNested used as default value for TestNode's \"nested\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nThread: 1: WithNested::init\nThread: 1: Nested::init\nWARNING: Instantiated Nested used as default value for WithNested's \"nested\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nThread: 1: ResourceFormatLoader::get_recognized_extensions\n\n# Get recognized extensions as in above is run there\n\nThread: 16: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::load\nThread: 1: Nested::init\nThread: 1: WithNested::init\nThread: 1: Nested::init\nThread: 1: WithNested::init\nThread: 1: Nested::init\nThread: 1: ToolNode::enter_tree\nThread: 1: Saving MockResource from EDITOR node\nThread: 1: ResourceFormatSaver::recognize\nThread: 1: ResourceFormatSaver::get_recognized_extensions\nThread: 1: ResourceFormatSaver::save\nThread: 1: ResourceFormatLoader::get_resource_type\nThread: 1: ResourceFormatLoader::get_resource_uid\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::get_dependencies\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: Loading MockResource from EDITOR node\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::load\nWARNING: Instantiated MockResource used as default value for TestNode's \"mock\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nWARNING: Instantiated MockResource used as default value for TestNode's \"mock\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nWARNING: Instantiated WithNested used as default value for TestNode's \"nested\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nWARNING: Instantiated WithNested used as default value for TestNode's \"nested\" property.\n     at: class_get_default_property_value (core/object/class_db.cpp:1743)\nThread: 1: ResourceFormatLoader::handles_type\nThread: 1: ResourceFormatLoader::handles_type\n\n# Additionally, these are also ran (possibly caused by resources appearing in the\n# Godot Editor file browser)\nThread: 17: ResourceFormatLoader::get_resource_type\nThread: 17: ResourceFormatLoader::get_resource_type\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nThread: 1: ResourceFormatLoader::get_recognized_extensions\nSegmentation fault (core dumped)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatismike%2Floader_saver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatismike%2Floader_saver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatismike%2Floader_saver/lists"}