Page MenuHome

FBX importer script lacks try/except handling (integer overflow for read-in values)
Closed, InvalidPublic


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.



Event Timeline

Bastien Montagne (mont29) closed this task as Invalid.
Bastien Montagne (mont29) claimed this task.

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.