{"record":{"id":"d3395dc05c7afce2","repo":"BabylonJS/Babylon.js","slug":"extensioncontext-pointer-is-missing","errorCode":null,"errorMessage":"${extensionContext}: Pointer is missing","messagePattern":"(.+?): Pointer is missing","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.pure.ts","lineNumber":84,"sourceCode":"    ): Nullable<Promise<void>> {\r\n        const extension = channel.target.extensions?.KHR_animation_pointer as IKHRAnimationPointer;\r\n        if (!extension || !this._pathToObjectConverter) {\r\n            return null;\r\n        }\r\n\r\n        if (channel.target.path !== AnimationChannelTargetPath.POINTER) {\r\n            Logger.Warn(`${context}/target/path: Value (${channel.target.path}) must be (${AnimationChannelTargetPath.POINTER}) when using the ${this.name} extension`);\r\n        }\r\n\r\n        if (channel.target.node != undefined) {\r\n            Logger.Warn(`${context}/target/node: Value (${channel.target.node}) must not be present when using the ${this.name} extension`);\r\n        }\r\n\r\n        const extensionContext = `${context}/extensions/${this.name}`;\r\n\r\n        const pointer = extension.pointer;\r\n        if (!pointer) {\r\n            throw new Error(`${extensionContext}: Pointer is missing`);\r\n        }\r\n\r\n        try {\r\n            const obj = this._pathToObjectConverter.convert(pointer);\r\n            if (!obj.info.interpolation) {\r\n                throw new Error(`${extensionContext}/pointer: Interpolation is missing`);\r\n            }\r\n            return this._loader._loadAnimationChannelFromTargetInfoAsync(\r\n                context,\r\n                animationContext,\r\n                animation,\r\n                channel,\r\n                {\r\n                    object: obj.object,\r\n                    info: obj.info.interpolation,\r\n                },\r\n                onLoad\r\n            );\r","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.pure.ts#L66-L102","documentation":"KHR_animation_pointer channels must contain an extension object with a JSON-pointer string identifying the animated property. When extension.pointer is absent/empty, _loadAnimationChannelAsync throws immediately, since without the pointer no target property can be resolved.","triggerScenarios":"Loading a glTF 2.0 animation channel whose KHR_animation_pointer extension object lacks the 'pointer' property, or where pointer is an empty string.","commonSituations":"Hand-authored animation-pointer channels; exporters emitting the extension registration but dropping pointer on some channels; asset post-processing/minification stripping fields.","solutions":["Add the missing 'pointer' string (e.g. \"/materials/0/pbrMetallicRoughness/baseColorFactor\") to the channel extension","Re-export the asset so the animation pointer is written correctly","Remove channels that have no pointer target","Validate the glTF to detect malformed KHR_animation_pointer channels"],"exampleFix":"// before\n\"extensions\": { \"KHR_animation_pointer\": {} }\n// after\n\"extensions\": { \"KHR_animation_pointer\": { \"pointer\": \"/materials/0/pbrMetallicRoughness/baseColorFactor\" } }","handlingStrategy":"validation","validationCode":"for (const anim of asset.animations ?? []) {\n  for (const ch of anim.channels ?? []) {\n    const ext = ch.target?.extensions?.KHR_animation_pointer;\n    if (ext && typeof ext.pointer !== 'string') {\n      throw new Error(`Animation channel missing KHR_animation_pointer pointer`);\n    }\n  }\n}","typeGuard":"function hasPointer(ext: { pointer?: string }): ext is { pointer: string } {\n  return typeof ext.pointer === 'string' && ext.pointer.length > 0;\n}","tryCatchPattern":"try {\n  await BABYLON.SceneLoader.LoadAsync('./', 'anim.gltf', engine);\n} catch (e) {\n  if (e instanceof Error && e.message.includes('Pointer is missing')) {\n    console.error('Animation channel lacks KHR_animation_pointer pointer');\n  } else throw e;\n}","preventionTips":["Validate animation-pointer channels pre-load","Avoid asset post-processing that strips extension fields","Use exporters known to emit complete KHR_animation_pointer data"],"tags":["gltf","extension","animation","missing-field"],"backgroundTag":"missing-required-field","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}