{"record":{"id":"ebdf303b816cc7da","repo":"remotion-dev/remotion","slug":"keyword-must-contain-three-finite-numbers","errorCode":null,"errorMessage":"${keyword} must contain three finite numbers.","messagePattern":"(.+?) must contain three finite numbers\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/studio/src/helpers/cube-lut.ts","lineNumber":73,"sourceCode":"\t\t\ttype = keyword === 'LUT_1D_SIZE' ? '1d' : '3d';\n\t\t\tsize = numbers[0];\n\t\t\tconst maxSize = type === '1d' ? 65536 : 256;\n\t\t\tif (\n\t\t\t\tnumbers.length !== 1 ||\n\t\t\t\t!Number.isInteger(size) ||\n\t\t\t\tsize < 2 ||\n\t\t\t\tsize > maxSize\n\t\t\t) {\n\t\t\t\tthrow new Error(`${keyword} must be an integer from 2 to ${maxSize}.`);\n\t\t\t}\n\n\t\t\tdata = new Float32Array((type === '1d' ? size : size ** 3) * 3);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (keyword === 'DOMAIN_MIN' || keyword === 'DOMAIN_MAX') {\n\t\t\tif (numbers.length !== 3 || !numbers.every(Number.isFinite)) {\n\t\t\t\tthrow new Error(`${keyword} must contain three finite numbers.`);\n\t\t\t}\n\n\t\t\tif (keyword === 'DOMAIN_MIN') {\n\t\t\t\tdomainMin = [numbers[0], numbers[1], numbers[2]];\n\t\t\t} else {\n\t\t\t\tdomainMax = [numbers[0], numbers[1], numbers[2]];\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (keyword === 'LUT_1D_INPUT_RANGE' || keyword === 'LUT_3D_INPUT_RANGE') {\n\t\t\tif (\n\t\t\t\tnumbers.length !== 2 ||\n\t\t\t\t!numbers.every(Number.isFinite) ||\n\t\t\t\tnumbers[0] >= numbers[1]\n\t\t\t) {\n\t\t\t\tthrow new Error(`${keyword} must contain an increasing input range.`);","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/remotion-dev/remotion/blob/46a3a6bf13ca367376ff18bbb06dae2e87e0d068/packages/studio/src/helpers/cube-lut.ts#L55-L91","documentation":"DOMAIN_MIN and DOMAIN_MAX headers in a .cube file must each contain exactly three finite numbers defining the LUT input domain. parseCubeLut throws when the line has a different count of values or contains non-finite numbers (NaN/Infinity).","triggerScenarios":"Loading a .cube file with lines like 'DOMAIN_MIN 0 0' (two values), 'DOMAIN_MAX 0 0 0 0' (four values), or values parsing to NaN/Infinity (e.g. 'DOMAIN_MIN 0 0 inf').","commonSituations":"Non-standard LUTs exported with 2- or 4-component domain lines; corrupted files where a value was dropped; typos like 'Infinity' text in the header.","solutions":["Rewrite DOMAIN_MIN/DOMAIN_MAX lines to exactly three finite numbers, e.g. 'DOMAIN_MIN 0 0 0' and 'DOMAIN_MAX 1 1 1'.","Remove the DOMAIN lines entirely if the default 0–1 domain is intended (they are optional).","Re-export the LUT from a compliant tool.","Check the reported line for missing or corrupted numeric values."],"exampleFix":"// before\nDOMAIN_MIN 0 0\n// after\nDOMAIN_MIN 0 0 0","handlingStrategy":"validation","validationCode":"for (const line of text.split('\\n')) {\n  const m = line.match(/^DOMAIN_(MIN|MAX)\\s+(.*)$/);\n  if (m) {\n    const nums = m[2].trim().split(/\\s+/).map(Number);\n    if (nums.length !== 3 || !nums.every(Number.isFinite)) throw new Error(`Bad ${m[1]} on: ${line}`);\n  }\n}","typeGuard":"null","tryCatchPattern":"try {\n  parseCubeLut(text);\n} catch (err) {\n  if (err.message.includes('must contain three finite numbers')) {\n    // fix or drop the DOMAIN line (defaults apply)\n  }\n}","preventionTips":["Always write DOMAIN_MIN/MAX with exactly three finite numbers","Omit DOMAIN lines when the 0-1 default domain is fine","Validate header numerics before loading LUT files"],"tags":["lut","parsing","validation"],"backgroundTag":"invalid-argument-format","analyzedSha":"46a3a6bf13ca367376ff18bbb06dae2e87e0d068","analyzedAt":"2026-09-18T00:12:20.256Z","contentChangedAt":"2026-09-18T00:12:20.256Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}