{"record":{"id":"c308b0b386f34f00","repo":"remotion-dev/remotion","slug":"the-freeze-prop-of-sequence-must-be-finite","errorCode":null,"errorMessage":"The \"freeze\" prop of <Sequence /> must be finite, but it is ${freeze}.","messagePattern":"The \"freeze\" prop of <Sequence /> must be finite, but it is (.+?)\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/core/src/Sequence.tsx","lineNumber":268,"sourceCode":"\t\t\t`The \"trimBefore\" prop of <Sequence /> must be finite, but it is ${trimBefore}.`,\n\t\t);\n\t}\n\n\tif (typeof freeze !== 'undefined' && freeze !== null) {\n\t\tif (typeof freeze !== 'number') {\n\t\t\tthrow new TypeError(\n\t\t\t\t`The \"freeze\" prop of <Sequence /> must be a number, but is of type ${typeof freeze}.`,\n\t\t\t);\n\t\t}\n\n\t\tif (Number.isNaN(freeze)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`The \"freeze\" prop of <Sequence /> must be a real number, but it is NaN.`,\n\t\t\t);\n\t\t}\n\n\t\tif (!Number.isFinite(freeze)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`The \"freeze\" prop of <Sequence /> must be finite, but it is ${freeze}.`,\n\t\t\t);\n\t\t}\n\t}\n\n\tconst absoluteFrame = useTimelinePosition();\n\tconst videoConfig = useVideoConfig();\n\tconst effectiveRelativeFrom = from - trimBefore;\n\tconst absoluteFrom =\n\t\t(parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;\n\n\tconst parentSequenceDuration = parentSequence\n\t\t? Math.min(\n\t\t\t\tparentSequence.durationInFrames - effectiveRelativeFrom,\n\t\t\t\tdurationInFrames,\n\t\t\t)\n\t\t: durationInFrames;\n\tconst actualDurationInFrames = Math.max(","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/Sequence.tsx#L250-L286","documentation":"Thrown when the freeze prop is Infinity or -Infinity. An infinite frame index cannot map to a real frame in the video, so Remotion rejects it to prevent runtime crashes downstream.","triggerScenarios":"freeze is set from an unbounded computation (e.g. frame count from an unloaded resource), or explicitly to Infinity.","commonSituations":"Defaulting freeze to a sentinel like Infinity; arithmetic overflow; spreading props from a config where freeze was set to Number.POSITIVE_INFINITY.","solutions":["Guard with Number.isFinite(freeze) before passing.","Clamp freeze to a valid frame range: freeze={Math.min(freeze, durationInFrames - 1)}.","Audit the source producing Infinity."],"exampleFix":"// before\n<Sequence freeze={computedFreeze} />\n\n// after\n<Sequence freeze={Number.isFinite(computedFreeze) ? Math.min(computedFreeze, durationInFrames - 1) : undefined} />","handlingStrategy":"validation","validationCode":"const freeze = Number.isFinite(rawFreeze)\n  ? Math.min(rawFreeze, durationInFrames - 1)\n  : undefined;","typeGuard":"const isFiniteFrame = (v: unknown): v is number =>\n  typeof v === 'number' && Number.isFinite(v);","tryCatchPattern":null,"preventionTips":["Clamp freeze to the composition's valid frame range.","Avoid Infinity as a default sentinel for numeric props."],"tags":["sequence","freeze","infinity","validation"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}