{"record":{"id":"1249520c19291268","repo":"BabylonJS/Babylon.js","slug":"nothing-else-parsed-so-far","errorCode":null,"errorMessage":"Nothing else parsed so far","messagePattern":"Nothing else parsed so far","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/dev/core/src/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.ts","lineNumber":69,"sourceCode":"            texture._files = files;\r\n            texture._buffer = buffer;\r\n        }\r\n\r\n        const lastDot = rootUrl.lastIndexOf(\".\");\r\n        const extension = forcedExtension ? forcedExtension : lastDot > -1 ? rootUrl.substring(lastDot).toLowerCase() : \"\";\r\n\r\n        // TODO: use texture loader to load env files?\r\n        if (extension === \".env\") {\r\n            const onloaddata = (data: ArrayBufferView) => {\r\n                const info = GetEnvInfo(data)!;\r\n                texture.width = info.width;\r\n                texture.height = info.width;\r\n\r\n                UploadEnvSpherical(texture, info);\r\n\r\n                const specularInfo = info.specular;\r\n                if (!specularInfo) {\r\n                    throw new Error(`Nothing else parsed so far`);\r\n                }\r\n\r\n                texture._lodGenerationScale = specularInfo.lodGenerationScale;\r\n                const imageData = CreateRadianceImageDataArrayBufferViews(data, info);\r\n\r\n                texture.format = Constants.TEXTUREFORMAT_RGBA;\r\n                texture.type = Constants.TEXTURETYPE_UNSIGNED_BYTE;\r\n                texture.generateMipMaps = true;\r\n                texture.getEngine().updateTextureSamplingMode(Texture.TRILINEAR_SAMPLINGMODE, texture);\r\n                texture._isRGBD = true;\r\n                texture.invertY = true;\r\n\r\n                this._engine.loadCubeTextureWithMips(\r\n                    texture._hardwareTexture!.underlyingResource,\r\n                    imageData,\r\n                    false,\r\n                    texture._useSRGBBuffer,\r\n                    () => {\r","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/core/src/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.ts#L51-L87","documentation":"When loading a .env (environment/DDSTI) cube texture in the native engine, the parsed header must contain a specular section (radiance/LOD data). If info.specular is missing after parsing, the loader throws 'Nothing else parsed so far' because the file contains only the spherical harmonics part and no specular mip chain.","triggerScenarios":"Calling NativeEngine's createCubeTexture / loadCubeTexture with an .env file (or buffer) whose parsed info has no specular block — i.e. a prefiltered-less env file, a truncated/corrupt file, or a JSON payload where the specular data was stripped.","commonSituations":"Env files exported without prefiltered/specular mips (e.g. minimal IBL exports from older tooling); files truncated in transit or partially downloaded; hand-crafted env JSON missing the 'specular' key; version mismatch between the exporter and the native loader expectations.","solutions":["Re-export the .env file with prefiltered radiance/specular data enabled (full IBL export, not spherical-harmonics-only)","Verify the file is complete (check size/hash vs. source; re-download if truncated)","Inspect the env JSON: it must contain a 'specular' object with lodGenerationScale and mip data — regenerate with Babylon's env exporter (https://sandbox.babylonjs.com) if missing","If only diffuse lighting is needed, use a different loader path or upgrade the runtime so it can handle specular-less env files"],"exampleFix":"// before\nscene.environmentTexture = new EnvironmentTexture('/assets/old-sphere.env'); // missing specular data\n// after\n// Re-export with prefiltered mips, then verify before use:\nconst buffer = await fetch('/assets/new-sphere.env').then(r => r.arrayBuffer());\nconst info = JSON.parse(new TextDecoder().decode(new Uint8Array(buffer, 0, headerLen)));\nif (!info.specular) throw new Error('env file lacks specular data; re-export');","handlingStrategy":"validation","validationCode":"async function validateEnvFile(url: string): Promise<void> {\n  const buf = new Uint8Array(await (await fetch(url)).arrayBuffer());\n  const jsonLen = new DataView(buf.buffer).getUint32(0, true);\n  const info = JSON.parse(new TextDecoder().decode(buf.subarray(4, 4 + jsonLen)));\n  if (!info.specular) throw new Error(`env file ${url} has no specular data; re-export with prefiltered mips`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  const tex = engine.createCubeTexture('/assets/sky.env', scene, [], false);\n} catch (e) {\n  if (String(e.message).includes('Nothing else parsed so far')) {\n    // fall back to a plain cube texture or a known-good env file\n  } else { throw e; }\n}","preventionTips":["Always export .env files with prefiltered radiance (specular) data enabled","Checksum-verify env assets in CI to catch truncated downloads","Spot-parse the env JSON header at load time before handing it to the engine","Pin exporter and runtime versions so env format expectations match"],"tags":["env-file","texture","parsing","native-engine","ibl"],"backgroundTag":"env-file-missing-specular-data","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}