mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-11-09 07:23:14 +00:00
Lightning exports failed on Linux with: Lightning (Beta) export failed. Reason: Cannot read properties of undefined (reading '_resourceType') The crash is a PixiJS 8.14 WebGPU bug, not app code. On Linux Chromium `navigator.gpu` exists, so WebGPU initialization succeeds, but Pixi sizes its bind group from a WebGL probe (MAX_TEXTURE_IMAGE_UNITS = 32) that exceeds the WebGPU per-stage sampler limit (maxSamplersPerShaderStage = 16). BindGroupSystem._createBindGroup then throws on the first render, killing the export at 0 frames. Because it fails mid-render rather than during init, the existing backend fallback ladder never engages. `getDefaultLightningRenderBackend()` in backendPolicy.ts already returned "webgl" and was covered by a test, but it was never called from production code. Instead modernVideoExporter hardcoded `preferredRenderBackend: undefined`, which also discarded the caller's own preference (so the `?smokeRenderBackend=webgpu` override was silently dropped). `undefined` resolved to a WebGPU-first backend order. - modernVideoExporter: honor the caller's preferredRenderBackend and fall back to getDefaultLightningRenderBackend(). - modernFrameRenderer: make the unspecified case WebGL-first, matching the legacy frameRenderer. WebGPU stays available via an explicit preference, so the smoke-export override still works. - Add a regression test that stubs navigator.gpu and asserts the default resolves to webgl. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>