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

Đang mở
#235 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
lua
Lĩnh vực
game-dev

Hướng nghiên cứu

Bắt đầu tại src/lua/endpoints/discard.lua ở dòng 91 và so sánh việc tra cứu nút với mẫu tương ứng trong play.lua. Tái hiện một campaign dài bằng các seed liên tiếp đã được báo cáo, sau đó xác minh rằng discard không còn bị crash trong khi animation và latency không bị suy giảm trong suốt campaign.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).
Ngôn ngữ chính
Python
Star
80
Fork
23
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của coder/balatrobot

Tất cả issue của coder/balatrobot

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.