Waiting for keyboard unlock after an AID key has no timeout and ignores an already-locked keyboard

Đang mở
#22 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
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
tooling

Hướng nghiên cứu

Start by reading src/script_executor.cpp around lines 118–143 and 233–239, focusing on m_waitingForUnlock and the state-change signal that clears it. Reproduce with the issue’s ON TIMEOUT/PRESS ENTER example, and check PRESS SYSREQ separately. Done means the unlock wait honors EXPECT_TIMEOUT and dispatches the handler, locked AID presses fail immediately, and SysReq/Attn do not wait for unlock.

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

Mô tả

bug
Summary

After PRESS ENTER (or any AID) the executor waits for the keyboard to unlock with no timeout and no ON TIMEOUT handling. If the keyboard is already Locked/ErrorLocked (the widget drops the key) or the host never answers, the script hangs forever. PRESS SYSREQ also waits although SysReq does not change the keyboard state.

Location
  • File(s): src/script_executor.cpp
  • Line(s) / function(s): L118–L143, L233–L239
Category

error-handling

Severity

medium

Unattended scripts and MCP calls hang (MCP falls back to its own 60 s timeout).

Reproduction / Evidence

Reproducible at runtime: ON TIMEOUT GOTO h / GLOBAL EXPECT_TIMEOUT 300 / PRESS ENTER / … with a keyboard that never unlocks: still running after 3 s, handler never fires. Live against IBM i 7.5 through 5250ng's MCP: press_key SYSREQ → Script execution timed out after 60 seconds.

Expected Behavior

The unlock wait honours EXPECT_TIMEOUT (or its own limit) and dispatches ON TIMEOUT; pressing an AID while locked fails immediately; SysReq/Attn do not wait for an unlock.

Actual Behavior

Indefinite wait.

Root Cause

m_waitingForUnlock is only cleared by a state-change signal; no timer guards it.

Ngôn ngữ chính
C++
Star
1
Fork
2
Merge trung bình
1 giờ 34 phút
Pull request đã merge (30 ngày)
7

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 5250ng/5250script

Tất cả issue của 5250ng/5250script

Issue tương tự

Thêm issue về C++

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.