FBX importer script lacks try/except handling (integer overflow for read-in values) #54586

Closed
opened 2018-04-12 20:48:38 +02:00 by Phil Stopford · 4 comments

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.

**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.
Author

Added subscriber: @phil.stopford

Added subscriber: @phil.stopford

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2019-03-14 15:31:45 +01:00

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.

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.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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#54586
No description provided.