FBX importer script lacks try/except handling (integer overflow for read-in values) #54586
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#54586
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Windows 10 Pro, GTX 1060 6 GB
Blender Version
Broken: 2.79b
Short description of error
Some FBX files result in an error being reported by the script because values lie outside the expected integer range. Rather than clamping and moving on, the exporter instead simply fails to handle the situation.
I have a few of these FBX files from modo that cause this line to throw the error :
ma.specular_hardness = ma_spec_hardness * 5.10 + 1.0
It's unguarded, so the overflow (caused by extremely large positive/negative values) is an issue.
One option would be to handle the exception by forcing the value of hardness in case of problems.
I ran into this for scenes that cannot be easily shared. I'm looking to find a test case, but wanted to report this in the interim in case it's deemed trivial to fix without a repro case.
Added subscriber: @phil.stopford
Added subscriber: @mont29
Changed status from 'Open' to: 'Archived'
Thanks for the report, but that is not a Blender issue. Making FBX IO code resilient to invalid data would be a huge task, would make that (highly complex) add-on even more complex, and... Blender is not intended to be used as a repair tool for broken files from other formats.