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

Crash while importing fbx file in 4.4-dev3 #98902

Closed
jamie-pate opened this issue Nov 6, 2024 · 5 comments
Closed

Crash while importing fbx file in 4.4-dev3 #98902

jamie-pate opened this issue Nov 6, 2024 · 5 comments

Comments

@jamie-pate
Copy link
Contributor

Tested versions

  • reproducible in 4.4-dev3
  • Not reproducible in 4.4-dev2

System information

Godot v4.4.dev3 - Ubuntu 22.04.5 LTS 22.04 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3050 Laptop GPU - 12th Gen Intel(R) Core(TM) i7-12700H (14 Threads)

Issue description

Editor output

EditorFileSystem: Importing file: res://makes-godot-4-4-dev3-crash.fbx
FBX path: res://makes-godot-4-4-dev3-crash.fbx
EditorFileSystem: Importing file: res://makes-godot-4-4-dev3-crash_0.png
EditorFileSystem: "res://makes-godot-4-4-dev3-crash_0.png" import took 7 ms.
Loading resource: res://makes-godot-4-4-dev3-crash_0.png
FBX: Total images: 1
Total materials: 1
FBX: Total skins: 1
FBX: Parsing mesh: 0
FBX: Total meshes: 1
FBX: Total lights: 0
FBX: Total cameras: 0
FBX: Total animations '1'.
FBX: Creating mesh for: unamed
Saving scene to: res://.godot/imported/makes-godot-4-4-dev3-crash.fbx-002f337880c2de989058e81dc3a2c321.scn
EditorFileSystem: "res://makes-godot-4-4-dev3-crash.fbx" import took 204 ms.
Using present mode: Enabled
Using present mode: Enabled
res://makes-godot-4-4-dev3-crash_0.png: Texture detected as used in 3D. Enabling mipmap generation and setting the texture compression mode to VRAM Compressed (S3TC/ETC/BPTC).
Using present mode: Enabled
Using present mode: Disabled
EditorFileSystem: Importing file: res://makes-godot-4-4-dev3-crash_0.png
etcpak: Encoding took 0 ms.
EditorFileSystem: "res://makes-godot-4-4-dev3-crash_0.png" import took 9 ms.
Using present mode: Enabled
Generated 'res://makes-godot-4-4-dev3-crash.fbx' preview in 209 usec
Loading resource: res://makes-godot-4-4-dev3-crash_0.png
bcdec: Decompression of a 256x1 DXT5 RGBA8 image with 0 mipmaps took 0 ms.
double free or corruption (!prev)
Aborted

Stack Trace:

Memory::free_static(void * p_ptr, bool p_pad_align) (/home/jpate/build/src/godot/core/os/memory.cpp:201)
CowData<unsigned char>::_unref(CowData<unsigned char> * const this) (/home/jpate/build/src/godot/core/templates/cowdata.h:270)
CowData<unsigned char>::~CowData(CowData<unsigned char> * const this) (/home/jpate/build/src/godot/core/templates/cowdata.h:478)
Vector<unsigned char>::~Vector(Vector<unsigned char> * const this) (/home/jpate/build/src/godot/core/templates/vector.h:291)
Image::~Image(Image * const this) (/home/jpate/build/src/godot/core/io/image.h:343)
memdelete<Image>(Image * p_class) (/home/jpate/build/src/godot/core/os/memory.h:140)
Ref<Image>::unref(Ref<Image> * const this) (/home/jpate/build/src/godot/core/object/ref_counted.h:215)
Ref<Image>::~Ref(Ref<Image> * const this) (/home/jpate/build/src/godot/core/object/ref_counted.h:228)
FBXDocument::_parse_materials(FBXDocument * const this, Ref<FBXState> p_state) (/home/jpate/build/src/godot/modules/fbx/fbx_document.cpp:1236)
FBXDocument::_parse_fbx_state(FBXDocument * const this, Ref<FBXState> p_state, const String & p_search_path) (/home/jpate/build/src/godot/modules/fbx/fbx_document.cpp:2181)
FBXDocument::_parse(FBXDocument * const this, Ref<FBXState> p_state, String p_path, Ref<FileAccess> p_file) (/home/jpate/build/src/godot/modules/fbx/fbx_document.cpp:2106)
FBXDocument::append_from_file(FBXDocument * const this, String p_path, Ref<GLTFState> p_state, uint32_t p_flags, String p_base_path) (/home/jpate/build/src/godot/core/object/ref_counted.h:209)
EditorSceneFormatImporterUFBX::import_scene(EditorSceneFormatImporterUFBX * const this, const String & p_path, uint32_t p_flags, const HashMap<StringName, Variant, HashMapHasherDefault, HashMapComparatorDefault<StringName>, DefaultTypedAllocator<HashMapElement<StringName, Variant> > > & p_options, List<String, DefaultAllocator> * r_missing_deps, Error * r_err) (/home/jpate/build/src/godot/modules/fbx/editor/editor_scene_importer_ufbx.cpp:81)
ResourceImporterScene::import(ResourceImporterScene * const this, const String & p_source_file, const String & p_save_path, const HashMap<StringName, Variant, HashMapHasherDefault, HashMapComparatorDefault<StringName>, DefaultTypedAllocator<HashMapElement<StringName, Variant> > > & p_options, List<String, DefaultAllocator> * r_platform_variants, List<String, DefaultAllocator> * r_gen_files, Variant * r_metadata) (/home/jpate/build/src/godot/editor/import/3d/resource_importer_scene.cpp:2974)
EditorFileSystem::_reimport_file(EditorFileSystem * const this, const String & p_file, const HashMap<StringName, Variant, HashMapHasherDefault, HashMapComparatorDefault<StringName>, DefaultTypedAllocator<HashMapElement<StringName, Variant> > > & p_custom_options, const String & p_custom_importer, Variant * p_generator_parameters, bool p_update_file_system) (/home/jpate/build/src/godot/editor/editor_file_system.cpp:2728)
EditorFileSystem::reimport_files(EditorFileSystem * const this, const Vector<String> & p_files) (/home/jpate/build/src/godot/editor/editor_file_system.cpp:3035)
EditorFileSystem::_update_scan_actions(EditorFileSystem * const this) (/home/jpate/build/src/godot/editor/editor_file_system.cpp:937)
EditorFileSystem::_notification(EditorFileSystem * const this, int p_what) (/home/jpate/build/src/godot/editor/editor_file_system.cpp:1667)
EditorFileSystem::_notificationv(EditorFileSystem * const this, int p_notification, bool p_reversed) (/home/jpate/build/src/godot/editor/editor_file_system.h:145)
Object::notification(Object * const this, int p_notification, bool p_reversed) (/home/jpate/build/src/godot/core/object/object.cpp:875)
SceneTree::_process_group(SceneTree * const this, SceneTree::ProcessGroup * p_group, bool p_physics) (/home/jpate/build/src/godot/scene/main/scene_tree.cpp:1020)
SceneTree::_process(SceneTree * const this, bool p_physics) (/home/jpate/build/src/godot/scene/main/scene_tree.cpp:1097)
SceneTree::process(SceneTree * const this, double p_time) (/home/jpate/build/src/godot/scene/main/scene_tree.cpp:580)
Main::iteration() (/home/jpate/build/src/godot/main/main.cpp:4380)
OS_LinuxBSD::run(OS_LinuxBSD * const this) (/home/jpate/build/src/godot/platform/linuxbsd/os_linuxbsd.cpp:962)
main(int argc, char ** argv) (/home/jpate/build/src/godot/platform/linuxbsd/godot_linuxbsd.cpp:85)

Steps to reproduce

Remove the .godot folder and then try to open the MRP project in the editor.

Minimal reproduction project (MRP)

fbx-import-crash1.zip

@jamie-pate
Copy link
Contributor Author

jamie-pate commented Nov 6, 2024

bad: [f4af820] Merge pull request #96309 from Geometror/fix-ge-cs-crash
.# good: [97ef3c8] Merge pull request #96780 from bruvzg/no_type_ed_settings
git bisect start 'HEAD' '97ef3c837'
.# good: [ff2b5a5] Merge pull request #97075 from KoBeWi/better_new_folder_(not_to_be_confused_with_new_better_folder)
git bisect good ff2b5a5
.# good: [f7c567e] Merge pull request #97447 from dsnopek/x11-focus-bugs-take-twenty-seven-million-and-seven
git bisect good f7c567e
.# good: [b2b13d4] Merge pull request #97581 from AThousandShips/owners_fix_3
git bisect good b2b13d4
.# bad: [24b4607] Merge pull request #97693 from bruvzg/ts_fb_silent
git bisect bad 24b4607
.# bad: [d71d954] Merge pull request #95784 from pafuent/adding_stream_peer_buffer_tests
git bisect bad d71d954
.# bad: [1fc8208] Merge pull request #97589 from pkowal1982/fix_97454
git bisect bad 1fc8208
.# good: [3fbd33a] Merge pull request #97229 from aryan-11825114/ctrl-x-visual-shader
git bisect good 3fbd33a
.# bad: [a53d0a3] Merge pull request #97503 from Repiteo/ci/merge_queue
git bisect bad a53d0a3
.# bad: [422306e] Merge pull request #97325 from BlueCube3310/bcdec
git bisect bad 422306e
.# bad: [2167157] Replace squish with bcdec for BC decompression
git bisect bad 2167157
.# first bad commit: [2167157] Replace squish with bcdec for BC decompression #97325 @BlueCube3310

@jamie-pate
Copy link
Contributor Author

I get this while trying to decode the following test image directly with bcdec:
256x1
256x1_test_image.zip

./test ./test_images/256x1_bc3.dds 
Successfully loaded ./test_images/256x1_bc3.dds
 w = 256, h = 1, format = BC3
Writing output to ./test_images/256x1_bc3.tga
malloc(): invalid size (unsorted)
Aborted

@fire
Copy link
Member

fire commented Nov 7, 2024

Do you think we can fix before 4.4. release? Don’t want to revert work.

@iOrange
Copy link

iOrange commented Nov 7, 2024

Looks like this was addressed here - a60195e

@akien-mga
Copy link
Member

Fixed by #97873.

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

No branches or pull requests

4 participants