Waiting for keyboard unlock after an AID key has no timeout and ignores an already-locked keyboard
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- C++
- Stars
- 1
- Forks
- 2
- Avg merge
- 1h 34m
- Merged PRs (30d)
- 7
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 5250ng/5250script
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
5250ng/5250script#30 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
5250ng/5250script#27 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
5250ng/5250script#25 ·
-
aidByteToKeyword maps 0xF5 to PAGEUP and 0xF4 to PAGEDOWN, so recorded Page Down replays as Page UpOpenbug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
5250ng/5250script#20 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
5250ng/5250script#19 ·
All issues in 5250ng/5250script
Similar issues
-
Invalid-MissingHash/Commit/NotAC
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
azerothcore/azerothcore-wotlk#28636 ·
Maintainers usually reply within 1 day
-
(S1 - Need confirmation)
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CleverRaven/Cataclysm-DDA#89829 ·
Maintainers usually reply within 1 day
-
comp-documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ClickHouse/ClickHouse#136277 ·
Maintainers usually reply within 1 day
-
Flow Needs: Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
react/react-native#60447 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day