You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG: The fg::Parser::generateMeshIndices() function assignment accessor.count = positionAccessor.count; in line 895 is using stale data because the auto& accessor = asset.accessors.emplace_back(); changed the accessor vector and invalidates the previously read positionAccessor reference. In debug mode, all positionAccessor data becomes 0xdddddddd, which is a huge count and results in an allocation error when used later.
The text was updated successfully, but these errors were encountered:
Error in fg::Parser::generateMeshIndices() when assigning accessor.count from dead positionAccessor.count data.
Results in "bad allcoation" error when trying to allocate the given huge accessor.count data later.
Repro:
MSVS 2022 Debug 64 build.
Load the file https://github.com/KhronosGroup/glTF-Sample-Models/blob/main/2.0/TriangleWithoutIndices/glTF/TriangleWithoutIndices.gltf
with fastgltf::Options::GenerateMeshIndices enabled.
I used these settings
BUG: The
fg::Parser::generateMeshIndices()
function assignmentaccessor.count = positionAccessor.count;
in line 895 is using stale data because theauto& accessor = asset.accessors.emplace_back();
changed the accessor vector and invalidates the previously readpositionAccessor
reference. In debug mode, all positionAccessor data becomes 0xdddddddd, which is a huge count and results in an allocation error when used later.The text was updated successfully, but these errors were encountered: