Skip to content

Issue with a GLB file (unable to open) #2914

@NathanaelA

Description

@NathanaelA

Describe the bug
I have a GLB (& GLTF) file that has invalid data in only one of the JSON fields. However the data in this field is creates a BADLY malformed JSON part of the file, but it is what the Unreal Engine exports in apparently rare cases. I jumped into the code on unreal and there is no checks against this on ANY of the number fields it exports, so it is reasonable to assume that this invalid data could show up in other fields when exporting GLB/GLTF files.

Effectively it breaks JSON parsing. In this specific case it spit out { "KHR_materials_ior": inf} this of course is totally broken JSON, it apparently was trying to output "infinity" , but even if it put "infinity" into the JSON it would still be invalid JSON. Manually using a HEX editor I changed this to "1.5" and the file loaded perfectly.

I'm not SURE if this is a wont-fix (since it really is NOT your problem) or if it is trivial to replace in your JSON parser if it sees inf in a value files to change it to "1.0" or something like that so that these files work.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions