[BUG] Casino slots: free-spin 2x gate crash — strips[i].indexOf undefined (extra Math.random) #4

Open
opened 2026-11-10 06:37:58 +08:00 by admin · 0 comments
Owner

Service / Project

casino (Node: pve01, LXC 19019)

Description

The 110-case raw/contract gate still fails on slots free-spin 2x with TypeError: strips[i].indexOf of undefined. Root cause: SlotEngine.spin calls Math.random() once for shouldForceWin, then once per reel. For macau_gold (5 strips), a 6th stubbed Math.random indexes strips[5] === undefined. Product 2x on a fixed ways grid looks correct (label "· (2x)", activeMultiplier=2); the crash is harness RNG stub vs an extra hitRate Math.random().

Steps to Reproduce

  1. Run the 110-case gate harness against current SlotEngine (macau_gold free-spin 2x case)
  2. Or call spin with a stubbed Math.random sequence that only covers per-reel draws without the extra hitRate draw

Expected Behavior

Free-spin 2x case passes without throw; last free spin keeps 2x multiplier.

Actual Behavior

TypeError: Cannot read properties of undefined (reading 'indexOf') at strips[i].indexOf. Gate remains FAIL (same as 03:45).

Error Logs / Evidence

  • Retest 05:31 §2/§3: raw 104/110, contract 105/110; free-spin 2x still fails
  • src/modules/slots/SlotEngine.js:159 (shouldForceWin Math.random), :181-183 (per-reel)
  • Fixed-grid product check keeps 2x; gate crash ≠ product multiplier drop

Reported automatically by Grok QA Agent (Lumi).

### Service / Project **casino** (Node: `pve01`, LXC `19019`) ### Description The 110-case raw/contract gate still fails on slots free-spin 2x with `TypeError: strips[i].indexOf` of undefined. Root cause: `SlotEngine.spin` calls `Math.random()` once for `shouldForceWin`, then once per reel. For macau_gold (5 strips), a 6th stubbed `Math.random` indexes `strips[5] === undefined`. Product 2x on a fixed ways grid looks correct (label "· (2x)", activeMultiplier=2); the crash is harness RNG stub vs an extra hitRate `Math.random()`. ### Steps to Reproduce 1. Run the 110-case gate harness against current SlotEngine (macau_gold free-spin 2x case) 2. Or call `spin` with a stubbed `Math.random` sequence that only covers per-reel draws without the extra hitRate draw ### Expected Behavior Free-spin 2x case passes without throw; last free spin keeps 2x multiplier. ### Actual Behavior `TypeError: Cannot read properties of undefined (reading 'indexOf')` at `strips[i].indexOf`. Gate remains FAIL (same as 03:45). ### Error Logs / Evidence - Retest 05:31 §2/§3: raw 104/110, contract 105/110; free-spin 2x still fails - `src/modules/slots/SlotEngine.js:159` (shouldForceWin Math.random), `:181-183` (per-reel) - Fixed-grid product check keeps 2x; gate crash ≠ product multiplier drop --- *Reported automatically by **Grok QA Agent** (Lumi).*
admin added the
bug
qa/grok
pve01
labels 2026-11-10 06:37:58 +08:00
Sign in to join this conversation.
No description provided.