## [Bug] Unexpected Crash in Space Game — Firefox Window Turned White #191

Closed
opened 2026-05-22 19:28:52 +00:00 by enjin2310 · 1 comment

🧩 Summary

While playing the Space Game on SpikerSoft, the browser window suddenly turned completely white, followed by a Firefox crash. The crash occurred mid-session without any visible error message or recovery prompt.

🧪 Steps to Reproduce

  1. Launch the Space Game from the SpikerSoft platform.
  2. Play for several minutes (exact duration may vary).
  3. Observe that the game window freezes and turns white.
  4. Firefox subsequently crashes and closes automatically.

Expected Behavior

The game should run smoothly without causing browser instability or crashes.
If an error occurs, it should display a controlled message or reload prompt instead of freezing the entire window.

Actual Behavior

  • The game window turns white.
  • No error or warning is shown.
  • Firefox crashes completely, requiring manual restart.

📸 Evidence

Screenshot shows the browser in a white-screen state before the crash.

🧠 Possible Root Cause

  • Memory leak or GPU overload during canvas rendering.
  • Unhandled exception in the game’s JavaScript loop.
  • WebGL context loss not properly recovered.
  • Firefox-specific compatibility issue with the game’s rendering engine.
### 🧩 Summary While playing the **Space Game** on SpikerSoft, the browser window suddenly turned completely white, followed by a **Firefox crash**. The crash occurred mid-session without any visible error message or recovery prompt. ### 🧪 Steps to Reproduce 1. Launch the **Space Game** from the SpikerSoft platform. 2. Play for several minutes (exact duration may vary). 3. Observe that the game window freezes and turns white. 4. Firefox subsequently crashes and closes automatically. ### ✅ Expected Behavior The game should run smoothly without causing browser instability or crashes. If an error occurs, it should display a controlled message or reload prompt instead of freezing the entire window. ### ❌ Actual Behavior - The game window turns white. - No error or warning is shown. - Firefox crashes completely, requiring manual restart. ### 📸 Evidence Screenshot shows the browser in a white-screen state before the crash. ### 🧠 Possible Root Cause - Memory leak or GPU overload during canvas rendering. - Unhandled exception in the game’s JavaScript loop. - WebGL context loss not properly recovered. - Firefox-specific compatibility issue with the game’s rendering engine.
Owner

Fixed in spikerj/spikersoft-angular#5.

Root cause: the Space Game render loop kept issuing WebGL calls after the GPU context was lost (a context-loss / driver reset, which Firefox is more prone to) and had no handler for it, so the canvas went white and the tab could crash. An unhandled exception inside the loop produced the same silent freeze.

Fix:

  • Listen for webglcontextlost / webglcontextrestored on the renderer canvas; on loss we preventDefault() (allowing the browser to restore), pause the loop, and show a controlled recovery/reload prompt; on restore we resume.
  • Wrap the per-frame work in try/catch so a fatal loop error halts cleanly and shows the same prompt instead of freezing.
  • Detach listeners on destroy.

Closing as resolved by the linked PR.

Fixed in spikerj/spikersoft-angular#5. Root cause: the Space Game render loop kept issuing WebGL calls after the GPU context was lost (a context-loss / driver reset, which Firefox is more prone to) and had no handler for it, so the canvas went white and the tab could crash. An unhandled exception inside the loop produced the same silent freeze. Fix: - Listen for `webglcontextlost` / `webglcontextrestored` on the renderer canvas; on loss we `preventDefault()` (allowing the browser to restore), pause the loop, and show a controlled recovery/reload prompt; on restore we resume. - Wrap the per-frame work in try/catch so a fatal loop error halts cleanly and shows the same prompt instead of freezing. - Detach listeners on destroy. Closing as resolved by the linked PR.
Sign in to join this conversation.