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

オープン
#235 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
lua
領域
game-dev

調査の方向性

src/lua/endpoints/discard.lua の 91 行目から始め、ボタン検索を play.lua の対応するパターンと比較します。報告された連続する seed を使って長時間のキャンペーンを再現し、その後、アニメーション中に discard がクラッシュしなくなったことと、キャンペーン全体でレイテンシーが悪化しないことを確認します。

索引モデルが issue の本文から書いたものです。

説明

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).
主要言語
Python
スター
80
フォーク
23
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coder/balatrobot のほかの issue

coder/balatrobot の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。