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

Godot 3.2.2.stable crashes when importing an empty Blender's FBX file #40959

Closed
ProgrammingLife opened this issue Aug 2, 2020 · 6 comments · Fixed by #47880
Closed

Godot 3.2.2.stable crashes when importing an empty Blender's FBX file #40959

ProgrammingLife opened this issue Aug 2, 2020 · 6 comments · Fixed by #47880

Comments

@ProgrammingLife
Copy link

ProgrammingLife commented Aug 2, 2020

Godot version:
Linux, Godot 3.2.2.stable, Blender 2.82

Steps to reproduce:

  1. In Blender: don't select any object and then: File -> Export -> check "selected objects" -> Export
  2. Change window to Godot and it immediately crashes with the message in the terminal:

Godot_v3.2.2-stable_x11.64: thirdparty/assimp/code/PostProcessing/ArmaturePopulate.cpp:171: static void Assimp::ArmaturePopulate::BuildBoneStack(aiNode*, const aiNode*, const aiScene*, const std::vector<aiBone*>&, std::map<aiBone*, aiNode*>&, std::vector<aiNode*>&): Assertion `!node_stack.empt

I know it's all because my fbx file is empty but I think it can be fixed, right? :)

@qarmin
Copy link
Contributor

qarmin commented Aug 2, 2020

Happens also in 4.0.dev.custom_build. 5d880bf

ERROR: _reimport_file: BUG: File queued for import, but can't be imported!
   At: editor/editor_file_system.cpp:1766.
ERROR: _reimport_file: Method failed.
   At: editor/editor_file_system.cpp:1767.
godot: thirdparty/assimp/code/PostProcessing/ArmaturePopulate.cpp:171: static void Assimp::ArmaturePopulate::BuildBoneStack(aiNode*, const aiNode*, const aiScene*, const std::vector<aiBone*>&, std::map<aiBone*, aiNode*>&, std::vector<aiNode*>&): Assertion `!node_stack.empty()' failed.
Przerwane (zrzut pamięci)

File - just remove .zip extension
untitled.fbx.zip

@qarmin qarmin added this to the 4.0 milestone Aug 2, 2020
@qarmin qarmin added the crash label Aug 2, 2020
@fire
Copy link
Member

fire commented Aug 2, 2020

Are you able to test your models with #39418 ? This is the next revision of the FBX importer. The fbx pr is waiting for the release of 3.2 stable before merging.

@qarmin
Copy link
Contributor

qarmin commented Aug 2, 2020

This fixes crash, but also introduced leak

Direct leak of 3760 byte(s) in 94 object(s) allocated from:
    #0 0x7ff46b02ef17 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.6+0xb1f17)
    #1 0x2504ef7 in ReadScope thirdparty/assimp_fbx/FBXBinaryTokenizer.cpp:364
    #2 0x2505585 in ReadScope thirdparty/assimp_fbx/FBXBinaryTokenizer.cpp:389
    #3 0x2505585 in ReadScope thirdparty/assimp_fbx/FBXBinaryTokenizer.cpp:389
    #4 0x25060c2 in Assimp::FBX::TokenizeBinary(std::vector<Assimp::FBX::Token const*, std::allocator<Assimp::FBX::Token const*> >&, char const*, unsigned long) thirdparty/assimp_fbx/FBXBinaryTokenizer.cpp:442
    #5 0x1e2563c in EditorSceneImporterFBX::import_scene(String const&, unsigned int, int, List<String, DefaultAllocator>*, Error*) modules/fbx/editor_scene_importer_fbx.cpp:133
    #6 0x3b5fb6e in ResourceImporterScene::import(String const&, String const&, Map<StringName, Variant, Comparator<StringName>, DefaultAllocator> const&, List<String, DefaultAllocator>*, List<String, DefaultAllocator>*, Variant*) editor/import/resource_importer_scene.cpp:1318
    #7 0x3255da4 in EditorFileSystem::_reimport_file(String const&) editor/editor_file_system.cpp:1798
    #8 0x325c780 in EditorFileSystem::reimport_files(Vector<String> const&) editor/editor_file_system.cpp:1996
    #9 0x3239d0e in EditorFileSystem::_update_scan_actions() editor/editor_file_system.cpp:589
    #10 0x3244efe in EditorFileSystem::_notification(int) editor/editor_file_system.cpp:1174
    #11 0x32635b7 in EditorFileSystem::_notificationv(int, bool) (/home/rafal/Pobrane/godot-feature-fbx_final_stage/bin/godot.x11.tools.64s+0x32635b7)
    #12 0x6d96f2f in Object::notification(int, bool) core/object.cpp:932
    #13 0x4a8cf86 in SceneTree::_notify_group_pause(StringName const&, int) scene/main/scene_tree.cpp:985
    #14 0x4a87d92 in SceneTree::idle(float) scene/main/scene_tree.cpp:525
    #15 0x143af52 in Main::iteration() main/main.cpp:2107
    #16 0x13bd359 in OS_X11::run() platform/x11/os_x11.cpp:3233
    #17 0x138f8a5 in main platform/x11/godot_x11.cpp:56
    #18 0x7ff46a4ee0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

Direct leak of 3160 byte(s) in 79 object(s) allocated from:
    #0 0x7ff46b02ef17 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.6+0xb1f17)
    #1 0x2504ef7 in ReadScope thirdparty/assimp_fbx/FBXBinaryTokenizer.cpp:364
    #2 0x2505585 in ReadScope thirdparty/assimp_fbx/FBXBinaryTokenizer.cpp:389
    #3 0x2505585 in ReadScope thirdparty/assimp_fbx/FBXBinaryTokenizer.cpp:389
    #4 0x2505585 in ReadScope thirdparty/assimp_fbx/FBXBinaryTokenizer.cpp:389
    #5 0x25060c2 in Assimp::FBX::TokenizeBinary(std::vector<Assimp::FBX::Token const*, std::allocator<Assimp::FBX::Token const*> >&, char const*, unsigned long) thirdparty/assimp_fbx/FBXBinaryTokenizer.cpp:442
    #6 0x1e2563c in EditorSceneImporterFBX::import_scene(String const&, unsigned int, int, List<String, DefaultAllocator>*, Error*) modules/fbx/editor_scene_importer_fbx.cpp:133
    #7 0x3b5fb6e in ResourceImporterScene::import(String const&, String const&, Map<StringName, Variant, Comparator<StringName>, DefaultAllocator> const&, List<String, DefaultAllocator>*, List<String, DefaultAllocator>*, Variant*) editor/import/resource_importer_scene.cpp:1318
    #8 0x3255da4 in EditorFileSystem::_reimport_file(String const&) editor/editor_file_system.cpp:1798
    #9 0x325c780 in EditorFileSystem::reimport_files(Vector<String> const&) editor/editor_file_system.cpp:1996
    #10 0x3239d0e in EditorFileSystem::_update_scan_actions() editor/editor_file_system.cpp:589
    #11 0x3244efe in EditorFileSystem::_notification(int) editor/editor_file_system.cpp:1174
    #12 0x32635b7 in EditorFileSystem::_notificationv(int, bool) (/home/rafal/Pobrane/godot-feature-fbx_final_stage/bin/godot.x11.tools.64s+0x32635b7)
    #13 0x6d96f2f in Object::notification(int, bool) core/object.cpp:932
    #14 0x4a8cf86 in SceneTree::_notify_group_pause(StringName const&, int) scene/main/scene_tree.cpp:985
    #15 0x4a87d92 in SceneTree::idle(float) scene/main/scene_tree.cpp:525
    #16 0x143af52 in Main::iteration() main/main.cpp:2107
    #17 0x13bd359 in OS_X11::run() platform/x11/os_x11.cpp:3233
    #18 0x138f8a5 in main platform/x11/godot_x11.cpp:56
    #19 0x7ff46a4ee0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

@fire
Copy link
Member

fire commented Aug 2, 2020

@qarmin Can you separate the leak on #39418 as a message on the pr?

@RevoluPowered
Copy link
Contributor

RevoluPowered commented Apr 14, 2021

tested in #47880 the leak is gone for me, and an empty file imports, i think we should run another set of tests to be sure all leaks are gone! post merging

@akien-mga
Copy link
Member

Fixed by #47880.

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

Successfully merging a pull request may close this issue.

5 participants