Inconsistent converter results despite green lights from validator

Hi all.

A few months back I wrote a converter tool ( to export MATLAB mesh data to GLB based off glTF-2.0 format specification. The focus is on static objects only - none of the other functionality is supported at present.

The question I have it as follows:

I notice that any .glb files exceeding 900-1000 kB in size will not open with Microsoft 3D viewer (without a specific error message) while if the same model is trimmed (by removing random vertices / faces) just to get the file size under the limit they will. There do not appear to be any topological errors, no singular vertices / edges etc, all normals are outward facing. I made sure all padding rules are followed and the correct byteLength sizes are recorded. Further, all of the “larger” files will load in Sample Viewer and pass all checks in Validator (on github…khronos…org) without a hitch. I simply assumed this had something to do with Microsoft Office itself but recently I tried loading one of the files in MeshLab and it stated that byteLength property was not a positive number (without saying which). After double-checking everything I once again failed to detect an error.

I wonder if anyone had similar issues, or might have suggestions as to where to look?

Would be happy to upload an example but as a new user I am not allowed, unfortunately.

Many thanks

Solved - this was a MATLAB-specific issue whereby json encoding of structures recorded very large numbers (byteLength in my case) in scientific notation by default.

Effectively, I had the upper limit of 999999 bytes for my buffer after which buffer byteLength would record as e.g. 1.000008E6 for the value of 1000008. Interestingly, this would get interpreted correctly by Validator but not some other software. I thought this might be of interest to the community.