You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
π Module Scanned\n (automated audit scan)\n\n## π Summary\nThe function returns an error when world initialization fails (e.g., out of memory), but this error propagates through β β main loop, causing the entire application to crash and exit. Instead, the error should be caught, logged, the pending world cleared, and the game returned to a safe state (home screen) so the user can attempt to relaunch or adjust settings.\n\n## π Location\n- File: \n- Function/Scope: calling \n\n## π΄ Severity: High\n- Critical: Crashes, data corruption, security vulnerabilities, GPU device loss\n- High: Memory leaks, race conditions, incorrect rendering, broken features\n- Medium: Performance degradation, missing error handling, suboptimal patterns\n- Low: Code style, dead code, minor improvements\n\n## π₯ Impact\nWhen world generation or initialization fails (OOM, GPU resource exhaustion, etc.), the error bubbles up and terminates the entire application. The user sees a crash/exit instead of being returned to the main menu with an opportunity to reduce render distance or retry. This is especially problematic in automated scenarios (benchmarks, smoke tests) where the world launch failure should be recoverable rather than fatal.\n\n## π Evidence\n\n\n\n\n\n\nWhen returns an error (e.g., from failing), the return type propagates the error up through to , which then returns the error and terminates the main loop. The app crashes without cleanup, without returning to a safe screen state, and without logging the specific failure context.\n\n## π οΈ Proposed Fix\nCatch the error in instead of propagating it, handle it gracefully:\n\n\n\nAlternatively, if the launch fails and we're in automated mode (benchmark/smoke test), the logic at lines 431-466 will trigger and exit the app cleanly rather than crashing.\n\n## β Acceptance Criteria\n- [ ] World load failure in does not crash the app\n- [ ] Error is logged with context about what failed\n- [ ] is cleared on failure\n- [ ] App remains on the home screen or current screen after failure\n- [ ] Benchmark/smoke test modes still exit cleanly when appropriate\n- [ ] passes\n\n## π References\n- Similar error handling pattern in (line 302-307) which catches and logs instead of propagating\n- The function (game-ui/src/screens/world.zig:77) can fail with OOM or RHI errors - these should be handled gracefully at the app level\n- Issue #723: InputSettings.saveFromMapper silently swallows errors - related pattern of error handling in game systems
π Module Scanned\n (automated audit scan)\n\n## π Summary\nThe function returns an error when world initialization fails (e.g., out of memory), but this error propagates through β β main loop, causing the entire application to crash and exit. Instead, the error should be caught, logged, the pending world cleared, and the game returned to a safe state (home screen) so the user can attempt to relaunch or adjust settings.\n\n## π Location\n- File: \n- Function/Scope: calling \n\n## π΄ Severity: High\n- Critical: Crashes, data corruption, security vulnerabilities, GPU device loss\n- High: Memory leaks, race conditions, incorrect rendering, broken features\n- Medium: Performance degradation, missing error handling, suboptimal patterns\n- Low: Code style, dead code, minor improvements\n\n## π₯ Impact\nWhen world generation or initialization fails (OOM, GPU resource exhaustion, etc.), the error bubbles up and terminates the entire application. The user sees a crash/exit instead of being returned to the main menu with an opportunity to reduce render distance or retry. This is especially problematic in automated scenarios (benchmarks, smoke tests) where the world launch failure should be recoverable rather than fatal.\n\n## π Evidence\n\n\n\n\n\n\nWhen returns an error (e.g., from failing), the return type propagates the error up through to , which then returns the error and terminates the main loop. The app crashes without cleanup, without returning to a safe screen state, and without logging the specific failure context.\n\n## π οΈ Proposed Fix\nCatch the error in instead of propagating it, handle it gracefully:\n\n\n\nAlternatively, if the launch fails and we're in automated mode (benchmark/smoke test), the logic at lines 431-466 will trigger and exit the app cleanly rather than crashing.\n\n## β Acceptance Criteria\n- [ ] World load failure in does not crash the app\n- [ ] Error is logged with context about what failed\n- [ ] is cleared on failure\n- [ ] App remains on the home screen or current screen after failure\n- [ ] Benchmark/smoke test modes still exit cleanly when appropriate\n- [ ] passes\n\n## π References\n- Similar error handling pattern in (line 302-307) which catches and logs instead of propagating\n- The function (game-ui/src/screens/world.zig:77) can fail with OOM or RHI errors - these should be handled gracefully at the app level\n- Issue #723: InputSettings.saveFromMapper silently swallows errors - related pattern of error handling in game systems