BUG: Climb the Spire causes React error #185 (infinite loop crash) #236

Closed
opened 2026-06-01 09:22:36 +02:00 by Anexim · 2 comments
Owner

Bug Description

Clicking the "Climb the Spire" button immediately crashes the game with React error #185 (Maximum update depth exceeded). The "Enter Spire Mode" button in the Debug panel causes the same crash. This prevents any spire/combat gameplay.

Steps to Reproduce

  1. Start a new game
  2. Click the "Climb the Spire" button on the main panel
  3. Game crashes with "Something went wrong" error screen

Environment

Impact

  • Entire spire and combat system is inaccessible
  • Player cannot progress past the initial meditation state
## Bug Description Clicking the "Climb the Spire" button immediately crashes the game with React error #185 (Maximum update depth exceeded). The "Enter Spire Mode" button in the Debug panel causes the same crash. This prevents any spire/combat gameplay. ## Steps to Reproduce 1. Start a new game 2. Click the "Climb the Spire" button on the main panel 3. Game crashes with "Something went wrong" error screen ## Environment - Tested at: https://manaloop.tailf367e3.ts.net/ - React error #185 = Maximum update depth exceeded (infinite re-render loop) ## Impact - Entire spire and combat system is inaccessible - Player cannot progress past the initial meditation state
Anexim added the ai:todo label 2026-06-01 09:22:36 +02:00
n8n-gitea was assigned by Anexim 2026-06-01 09:22:36 +02:00
Anexim added this to the (deleted) project 2026-06-01 11:45:48 +02:00
Author
Owner

Starting investigation of React #185 infinite loop crash when clicking "Climb the Spire". Reading gameStore.ts tick function and related combat/spire code to identify the re-render loop.

Starting investigation of React #185 infinite loop crash when clicking "Climb the Spire". Reading gameStore.ts tick function and related combat/spire code to identify the re-render loop.
Author
Owner

Fixed. Removed redundant set() call in processCombatTick (combat-actions.ts) that was causing double Zustand writes per tick. The persist middleware prevented deduplication, causing synchronous re-render feedback loop (React #185). The tick pipeline already handles writes via applyTickWrites, so the inline set() was unnecessary.

Fixed. Removed redundant `set()` call in `processCombatTick` (combat-actions.ts) that was causing double Zustand writes per tick. The `persist` middleware prevented deduplication, causing synchronous re-render feedback loop (React #185). The tick pipeline already handles writes via `applyTickWrites`, so the inline `set()` was unnecessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#236