fix!: long sessions degrade — latency triples, then discard crashes on nil G.buttons

Aperta
#235 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
lua
Ambito
game-dev

Direzione di ricerca

Inizia in src/lua/endpoints/discard.lua alla riga 91 e confronta la ricerca del pulsante con il pattern corrispondente in play.lua. Riproduci una campagna lunga usando i seed consecutivi segnalati, quindi verifica che discard non vada più in crash durante l’animazione e che la latenza non peggiori nel corso della campagna.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

After ~70 consecutive games on one instance (menu+start between games), we
observed two stages of degradation:

  1. Per-action latency roughly tripled relative to a fresh instance.

  2. The discard endpoint then began crashing on every game:

    discard.lua:91: attempt to index field 'buttons' (a nil value)
    

    src/lua/endpoints/discard.lua:91 does
    UIBox:get_UIE_by_ID("discard_button", G.buttons.UIRoot) with no nil guard —
    under the degraded latency the endpoint fires while the dealt hand is still
    animating and G.buttons hasn't been built yet.

Six consecutive seeds hit the crash at the end of one long campaign; the same
seeds ran clean on a fresh instance, so this is accumulation, not game content.
Likely the same underlying accumulation as coder/balatrollm#29 (game slowdown
after many rounds).

Impact

Long benchmark campaigns quietly slow down and then start failing runs for
reasons unrelated to the bot under test. Because balatrollm's executor starts
its instances once and cycles the whole task list through them, a large
multi-model campaign is exactly the workload that ages into this state.

Suggested Fix

  • In discard.lua (and play.lua, which shares the button-lookup pattern),
    wait for the button via a condition event instead of asserting on a structure
    that may not exist yet mid-animation.
  • Consider recycling instances every N runs for long campaigns (we restart the
    game between 80-seed batches and never see either symptom).
Lingua principale
Python
Stelle
80
Fork
23
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/balatrobot

Tutte le issue di coder/balatrobot

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.