[priority: critical] React Infinite Loop - "Climb the Spire" crashes game #193

Closed
opened 2026-05-29 12:40:21 +02:00 by Anexim · 2 comments
Owner

CRITICAL BUG: Game crashes when clicking "Climb the Spire"

Bug Summary

  • Issue Type: Critical crash blocking core gameplay
  • Location: Main screen "Climb the Spire" button and Spire tab button
  • Error: React error #185 - "Maximum update depth exceeded" (infinite re-render loop)
  • Impact: Players cannot access the spire/combat system - game is completely unplayable for progression

Steps to Reproduce

  1. Load game at https://manaloop.tailf367e3.ts.net/
  2. Click "Climb the Spire" button on main screen
  3. OR click "Climb the Spire" in Spire tab
  4. Game crashes with React infinite loop error

Error Details

Minified React error #185; visit https://react.dev/errors/185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Error: Minified React error #185; visit https://react.dev/errors/185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at rh (https://manaloop.tailf367e3.ts.net/_next/static/chunks/01w1a~so2__kb.js:1:42845)

Recovery Required

  • Game recovers after clicking "Reset & Recover" button
  • But this doesn't fix the underlying bug - spire remains inaccessible

Technical Context Needed

  • Stack trace from browser console to identify React component causing loop
  • State transition analysis - what state changes when clicking the button?
  • Component dependency checks - useEffect dependencies, missing prop validation
  • Hook usage validation - ensure no duplicated hooks or improper ordering

Investigation Areas

  1. Check src/components/game/SpireTab.tsx and related combat components
  2. Verify all props are passed correctly from store to UI components
  3. Look for infinite loops in state updates or useEffect callbacks
  4. Check for missing error boundaries around combat-related components

Priority

CRITICAL - Blocks core game loop (spire/combat system cannot be accessed)

**CRITICAL BUG: Game crashes when clicking "Climb the Spire"** ### Bug Summary - **Issue Type:** Critical crash blocking core gameplay - **Location:** Main screen "Climb the Spire" button and Spire tab button - **Error:** React error #185 - "Maximum update depth exceeded" (infinite re-render loop) - **Impact:** Players cannot access the spire/combat system - game is completely unplayable for progression ### Steps to Reproduce 1. Load game at https://manaloop.tailf367e3.ts.net/ 2. Click "Climb the Spire" button on main screen 3. OR click "Climb the Spire" in Spire tab 4. Game crashes with React infinite loop error ### Error Details ``` Minified React error #185; visit https://react.dev/errors/185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. Error: Minified React error #185; visit https://react.dev/errors/185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at rh (https://manaloop.tailf367e3.ts.net/_next/static/chunks/01w1a~so2__kb.js:1:42845) ``` ### Recovery Required - Game recovers after clicking "Reset & Recover" button - But this doesn't fix the underlying bug - spire remains inaccessible ### Technical Context Needed - **Stack trace from browser console** to identify React component causing loop - **State transition analysis** - what state changes when clicking the button? - **Component dependency checks** - useEffect dependencies, missing prop validation - **Hook usage validation** - ensure no duplicated hooks or improper ordering ### Investigation Areas 1. Check `src/components/game/SpireTab.tsx` and related combat components 2. Verify all props are passed correctly from store to UI components 3. Look for infinite loops in state updates or useEffect callbacks 4. Check for missing error boundaries around combat-related components ### Priority CRITICAL - Blocks core game loop (spire/combat system cannot be accessed)
Anexim added the ai:todo label 2026-05-29 12:40:21 +02:00
n8n-gitea was assigned by Anexim 2026-05-29 12:40:21 +02:00
Author
Owner

Starting investigation of React infinite loop crash when clicking "Climb the Spire". Will examine the spire-related components and store actions.

Starting investigation of React infinite loop crash when clicking "Climb the Spire". Will examine the spire-related components and store actions.
Author
Owner

Fixed: Removed unnecessary useEffect in page.tsx that called setActiveTab('spells') when spireMode changed to true. Also removed redundant setAction('climb') call in SpireCombatPage's useEffect since enterSpireMode already sets currentAction to 'climb'. These changes eliminate potential render feedback loops that could cause React's "Maximum update depth exceeded" error.

Fixed: Removed unnecessary useEffect in page.tsx that called setActiveTab('spells') when spireMode changed to true. Also removed redundant setAction('climb') call in SpireCombatPage's useEffect since enterSpireMode already sets currentAction to 'climb'. These changes eliminate potential render feedback loops that could cause React's "Maximum update depth exceeded" error.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#193