Skip to content

fix(editor): guard scene export against objects without geometry#313

Open
anton-pascal wants to merge 1 commit into
mainfrom
fix/sentry-export-manager-crash
Open

fix(editor): guard scene export against objects without geometry#313
anton-pascal wants to merge 1 commit into
mainfrom
fix/sentry-export-manager-crash

Conversation

@anton-pascal
Copy link
Copy Markdown
Contributor

Problem

Three.js exporters (OBJ/STL/GLTF) crash when traversing scene objects without valid geometry — Groups, Lights, Cameras, or meshes with disposed geometry cause Cannot read properties of undefined (reading 'count') and similar errors.

Sentry: EDITOR-6H (283 events), EDITOR-6G, EDITOR-79 — 428+ combined.

Fix

Add a prepareSceneForExport helper that:

  1. Deep-clones the scene group
  2. Traverses and removes objects without valid geometry/material
  3. Returns a clean export-safe scene

Also wraps each export format in try-catch for additional resilience.

Testing

  • Export a scene with mixed objects (meshes + lights + groups) → no crash
  • Exported file contains only valid geometry

Filters scene children to only include meshes with valid geometry
and materials before passing to Three.js exporters (OBJ/STL/GLTF).
Adds try-catch wrapper for resilience.

Fixes: MONOREPO-EDITOR-6H (283 events), EDITOR-6G, EDITOR-79
@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 17, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
pascal 🔴 Failed May 17, 2026, 4:09 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant