{"record":{"id":"e525098fd4bbc733","repo":"BabylonJS/Babylon.js","slug":"invalid-fbx-property-list-length-for-node-name","errorCode":null,"errorMessage":"Invalid FBX property list length for node '${name}' at offset ${offset}","messagePattern":"Invalid FBX property list length for node '(.+?)' at offset (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/dev/loaders/src/FBX/parsers/fbxBinaryParser.ts","lineNumber":86,"sourceCode":"    }\r\n\r\n    // Null sentinel: all header fields are zero\r\n    if (endOffset === 0) {\r\n        return null;\r\n    }\r\n    if (endOffset <= offset || endOffset > limit) {\r\n        throw new Error(`Invalid FBX node end offset ${endOffset} at offset ${offset}`);\r\n    }\r\n\r\n    const nameLen = bytes[offset + headerSize - 1];\r\n    ensureRange(bytes, offset + headerSize, nameLen, endOffset, \"FBX node name\");\r\n    const name = decodeASCII(bytes, offset + headerSize, nameLen);\r\n\r\n    let cursor = offset + headerSize + nameLen;\r\n    const propertiesStart = cursor;\r\n    const propertiesEnd = propertiesStart + propertyListLen;\r\n    if (propertiesEnd > endOffset) {\r\n        throw new Error(`Invalid FBX property list length for node '${name}' at offset ${offset}`);\r\n    }\r\n\r\n    // Parse properties\r\n    const properties: FBXProperty[] = [];\r\n    for (let i = 0; i < numProperties; i++) {\r\n        const result = parseProperty(view, bytes, cursor, propertiesEnd);\r\n        properties.push(result.property);\r\n        cursor = result.nextOffset;\r\n    }\r\n    if (cursor !== propertiesEnd) {\r\n        throw new Error(`Invalid FBX property list length for node '${name}' at offset ${offset}`);\r\n    }\r\n\r\n    // Parse nested child nodes (between end of properties and endOffset)\r\n    const children: FBXNode[] = [];\r\n    if (cursor < endOffset) {\r\n        while (cursor < endOffset) {\r\n            const child = parseNode(view, bytes, cursor, is64Bit, endOffset);\r","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/loaders/src/FBX/parsers/fbxBinaryParser.ts#L68-L104","documentation":"After the node header and name, the property list spans propertyListLen bytes; the parser computes propertiesEnd = propertiesStart + propertyListLen and requires it not to exceed the node's endOffset. If the declared property list length overruns the node record, the header fields are inconsistent and the file is malformed.","triggerScenarios":"parseNode (via `result`/`child`) reading a node whose propertyListLen field pushes propertiesEnd past endOffset — corrupt length field, wrong header layout (32/64-bit mismatch), or garbage interpreted as a length.","commonSituations":"Corrupted or truncated downloads; exporters writing 64-bit headers with 32-bit lengths or vice versa; hand-crafted/fuzzed FBX files used as fixtures.","solutions":["Re-download or re-export the FBX — the length field is inconsistent with the record size","Verify header layout: confirm version ≥7500 correctly switches to 64-bit endOffset/offset fields","Hexdump the node record at the reported offset and compare field values against the FBX binary spec","Reject the file up front with a checksum/size sanity check before parsing"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// sanity check a few top-level node records before full parse\nconst view = new DataView(buffer);\nlet off = 27;\nconst end = buffer.byteLength;\nwhile (off < end) {\n  const endOffset = view.getUint32(off, true); // 32-bit layout\n  if (endOffset === 0) break;\n  if (endOffset <= off || endOffset > end) throw new Error(\"Corrupt top-level FBX record\");\n  off = endOffset;\n}","typeGuard":null,"tryCatchPattern":"try {\n  const doc = parseBinaryFBX(buffer);\n} catch (e) {\n  if (/Invalid FBX property list length/.test(e.message)) {\n    console.error(\"Node property list overruns its record — corrupt or non-conformant FBX; re-export\");\n  } else throw e;\n}","preventionTips":["Reject files failing a checksum or size check before parse","Prefer FBX from mainstream exporters; convert non-standard files through FBX Converter","Fuzz/fixture-test the parser against malformed inputs in CI","Log the failing node name + offset included in the message for triage"],"tags":["fbx","binary","corrupt","property-list","bounds"],"backgroundTag":"fbx-corrupt-record","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}