Skip to content

Multiple Critical Issues: Loading Failures, Freezing, and Crashes #1567

Description

@shjustinjz-png

(Generated by Copilot after analyzing the existing issues and the code):
Players are experiencing several interconnected problems that severely impact gameplay:

  1. Blank/White Screen on Load (Issues Bug: white screen upon attempting to load #904, *SUPER IMPORTANT!!* GAME DOES NOT LOAD IF DOWNLOADED!! *SUPER IMPORTANT!!* #966, Bug when loading the game. No matter what I do on my browser I cannot play. Stuck on loading #1472)
    Game fails to load completely, displaying only a white screen
    Affects both new players and existing saves
    Particularly problematic when downloading the game locally
    Players report being stuck on loading screens indefinitely
  2. Game Freezes After a Few Seconds (Related to Issue [PR available] Size warnings in build #981)
    Game runs briefly then becomes completely unresponsive
    Caused by massive JavaScript bundle size (1.77 MiB for main.js, 1.87 MiB for wiki.js)
    Both bundles exceed webpack's recommended limit of 244 KiB by ~7x
    Browser struggles to parse, compile, and execute such large bundles on load
  3. Runtime Crashes and Errors (Issues Equilibrium Feat issue #932, TypeError in Wiki when rendering Symposium #1309, Queue rename breaks game with tp-ships or hell mechs in the queue #1477)
    Wiki rendering crashes with TypeError: Cannot read properties of undefined
    Queue rename crashes game when certain ship types are present
    Missing break statements in trait logic (Slow/Hyper adding/removal affecting Calm #946) cause unintended state mutations
    These crashes freeze the UI with no error messages to the player
    Root Cause Analysis:
    The primary issue is the oversized, monolithic JavaScript bundle combined with unhandled runtime errors:

Bundle Size Problem: The webpack build outputs two massive files (1.77 MiB + 1.87 MiB) instead of being code-split
Webpack already warns about this: "You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application"
Large bundles cause parsing delays on startup, making the game appear frozen while initializing
Runtime Errors: Several unhandled null/undefined reference errors crash the game mid-execution
No error handling or graceful degradation for missing properties
Players see a frozen screen with no indication of what went wrong
Impact:
New players cannot get the game to run at all
Existing players experience freezing and crashes
Long-term players' saves can become unplayable (e.g., #1477)
The issue compounds on slower devices, older browsers, and poor connections
Recommended Solutions:
Implement Code Splitting - Use dynamic imports to lazy-load features instead of bundling everything upfront
Add Error Handling - Wrap critical sections in try-catch and provide user feedback instead of silent failures
Add Loading Indicators - Show progress during the initialization phase so users know the game hasn't frozen
Fix Specific Bugs:
Add missing break statement in Slow/Hyper trait logic (#946)
Add null checks before accessing object properties in wiki rendering (#932, #1309)
Fix queue rename function to handle all ship/mech types (#1477)
Related Issues:
#904 - Bug: white screen upon attempting to load
#966 - Game does not load if downloaded
#1472 - Stuck on loading screen
#981 - Size warnings in build (1.77 MiB and 1.87 MiB bundles)
#932 - Equilibrium Feat crashes
#1309 - TypeError in Wiki when rendering Symposium
#1477 - Queue rename breaks game
#946 - Slow/Hyper affecting Calm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions