FBX addon fails on "blen_read_shape" for fome fbx files #54354

Closed
opened 2018-03-18 20:10:36 +01:00 by Ilya · 6 comments

System Information
Win10 x64 GTX650

Blender Version
Blender 2.79a 2018-02-21 (steam release)

Short description of error
FBX import fails on "blen_read_shape" due to "elem_name_ensure_class(fbx_sdata, b'Geometry')" returns empty string.
3DsMax 2018 also fails to import, but instead of crashing, it's import shapes with empty names.
That means that FBX is corrupted, but with my small fix file imports correctly

Exact steps for others to reproduce the error
Here is file that fails [NSFW model] HANDS_threefinger.fbx
I wrote small fix that seems to work

# fallback when elem_name_ensure_class fails to get name (returns empty string, fbx_sdata = "\u0000\u0001SubDeformer")
if elem_name_utf8 == "":
        elem_name_utf8 = fbx_bcdata.props[1].split(b"\x00\x01")[0].decode("utf-8")
**System Information** Win10 x64 GTX650 **Blender Version** Blender 2.79a 2018-02-21 (steam release) **Short description of error** FBX import fails on "blen_read_shape" due to "elem_name_ensure_class(fbx_sdata, b'Geometry')" returns empty string. 3DsMax 2018 also fails to import, but instead of crashing, it's import shapes with empty names. That means that FBX is corrupted, but with my small fix file imports correctly **Exact steps for others to reproduce the error** Here is file that fails [NSFW model] [HANDS_threefinger.fbx](https://archive.blender.org/developer/F2459763/HANDS_threefinger.fbx) I wrote small fix that seems to work ``` # fallback when elem_name_ensure_class fails to get name (returns empty string, fbx_sdata = "\u0000\u0001SubDeformer") if elem_name_utf8 == "": elem_name_utf8 = fbx_bcdata.props[1].split(b"\x00\x01")[0].decode("utf-8") ```
Author

Added subscriber: @RED_EYE

Added subscriber: @RED_EYE
Member

Added subscribers: @mont29, @LazyDodo

Added subscribers: @mont29, @LazyDodo
Bastien Montagne was assigned by Ray molenkamp 2018-03-18 20:16:06 +01:00
Member

I'm not sure how much hackery we are willing to do to fix importing corrupted files, @mont29 will have to decide on this.

I'm not sure how much hackery we are willing to do to fix importing corrupted files, @mont29 will have to decide on this.
Author

This is just my temporary fix, there might be more elegant fix. I can't attach python debugger to find out what causing this behaviour

This is just my temporary fix, there might be more elegant fix. I can't attach python debugger to find out what causing this behaviour

This issue was referenced by 0f1b2e7ea7

This issue was referenced by 0f1b2e7ea7a5b957f39fd5e41ae96ae288323b25

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#54354
No description provided.