Fix WASM RuntimeError causing persistent display failures in mesh worker#1694
Draft
Copilot wants to merge 6 commits into
Draft
Fix WASM RuntimeError causing persistent display failures in mesh worker#1694Copilot wants to merge 6 commits into
Copilot wants to merge 6 commits into
Conversation
… IndexedDB entries Agent-Logs-Url: https://github.com/BarbourSmith/Abundance/sessions/c063747f-e615-4ab5-99b6-d770a9ce12a9 Co-authored-by: BarbourSmith <9359447+BarbourSmith@users.noreply.github.com>
Agent-Logs-Url: https://github.com/BarbourSmith/Abundance/sessions/c063747f-e615-4ab5-99b6-d770a9ce12a9 Co-authored-by: BarbourSmith <9359447+BarbourSmith@users.noreply.github.com>
…workers Agent-Logs-Url: https://github.com/BarbourSmith/Abundance/sessions/c063747f-e615-4ab5-99b6-d770a9ce12a9 Co-authored-by: BarbourSmith <9359447+BarbourSmith@users.noreply.github.com>
…T_DELAY_MS constant Agent-Logs-Url: https://github.com/BarbourSmith/Abundance/sessions/c063747f-e615-4ab5-99b6-d770a9ce12a9 Co-authored-by: BarbourSmith <9359447+BarbourSmith@users.noreply.github.com>
…view issues Agent-Logs-Url: https://github.com/BarbourSmith/Abundance/sessions/c063747f-e615-4ab5-99b6-d770a9ce12a9 Co-authored-by: BarbourSmith <9359447+BarbourSmith@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix index out of bounds display error
Fix WASM RuntimeError causing persistent display failures in mesh worker
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intermittent
RuntimeError: index out of boundsfrom replicad's WASM module would corrupt the mesh worker's WASM heap, causing all subsequent geometry renders to silently fall back to "No output to display" — only recoverable via page refresh.Root cause
geometryProvider.get()speculatively callsdeserializeDrawing()on all cached shapes. When called on Shape3D data, the WASM runtime can trap (RuntimeError: index out of bounds), leaving the module in an unrecoverable state. Every deserialization after that also fails.Changes
geometryProvider.tsWasmDeserializationError(exported) — thrown when bothdeserializeDrawinganddeserializeShapefail, giving callers a precise signal to act ondeleteShape()so geometry is recomputed on next request rather than failing indefinitelymeshWorker.tsWasmDeserializationError; detect WASM failures viainstanceof WasmDeserializationError || e instanceof WebAssembly.RuntimeErrorself.close()in afinallyblock (after fallback attempt) using named constantWORKER_RESTART_DELAY_MS = 100ms— workerpool then spins up a fresh worker with a clean WASM heapEffect: one render cycle shows the fallback; the next user action triggers a fresh worker that deserializes and renders correctly — no page refresh required.