Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI configuration system (ninja menuconfig) exists with an error when the windows key is pressed #33212

Closed
thedjnK opened this issue Mar 10, 2021 · 1 comment · Fixed by #33347 · May be fixed by ulfalizer/Kconfiglib#103 or zephyrproject-rtos/Kconfiglib#11
Assignees
Labels
area: Build System area: Kconfig bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@thedjnK
Copy link
Collaborator

thedjnK commented Mar 10, 2021

Describe the bug
Configure a project for any board, run ninja menuconfig and press the windows key, it exits out with an error when it should handle it gracefully and ignore the input

Expected behavior
For it to not cause an exception

Impact
Annoyance

Logs and console output

Loaded configuration '<DIR>/app/build/zephyr/.config'
Traceback (most recent call last):
  File "<DIR>/zephyr/scripts/kconfig/menuconfig.py", line 3278, in <module>
    _main()
  File "<DIR>/zephyr/scripts/kconfig/menuconfig.py", line 663, in _main
    menuconfig(standard_kconfig(__doc__))
  File "<DIR>/zephyr/scripts/kconfig/menuconfig.py", line 732, in menuconfig
    print(curses.wrapper(_menuconfig))
  File "C:\Python38\lib\curses\__init__.py", line 105, in wrapper
    return func(stdscr, *args, **kwds)
  File "<DIR>/zephyr/scripts/kconfig/menuconfig.py", line 872, in _menuconfig
    _change_node(sel_node)
  File "<DIR>/zephyr/scripts/kconfig/menuconfig.py", line 1584, in _change_node
    s = _input_dialog(
  File "<DIR>/zephyr/scripts/kconfig/menuconfig.py", line 1741, in _input_dialog
    _draw_input_dialog(win, title, info_lines, s, i, hscroll)
  File "<DIR>/zephyr/scripts/kconfig/menuconfig.py", line 1791, in _draw_input_dialog
    _safe_addstr(win, 2, 2, visible_s + " "*(edit_width - len(visible_s)),
  File "<DIR>/zephyr/scripts/kconfig/menuconfig.py", line 3218, in _safe_addstr
    win.addnstr(y, x, s, maxlen, attr)
ValueError: embedded null character
Batch file failed at line 3 with errorcode 1
FAILED: CMakeFiles/menuconfig

Environment (please complete the following information):

  • OS: Windows 10
  • Toolchain: N/A
  • Commit SHA: 4ce908a
@tejlmand
Copy link
Collaborator

@thedjnK fixed here: #33347

tejlmand added a commit to tejlmand/Kconfiglib-ulfalizer that referenced this issue Mar 15, 2021
Fixes: zephyrproject-rtos/zephyr#33212

Ignoring when user inputs NULL in a text field.
menuconfig exits with a python stack trace if NULL is provided as input
character, therefore ignore NULL as an input character to prevent this
behaviour.

A NULL character may be given accidentally by the user through the
following ways:
- Pressing `Win` key on keyboard (Windows only)
- Pressing `<CTRL>-@` / `<CTRL>-2`.

Signed-off-by: Torsten Rasmussen <[email protected]>
tejlmand added a commit to tejlmand/zephyr that referenced this issue Mar 15, 2021
Fixes: zephyrproject-rtos#33212

Upstream PR: ulfalizer/Kconfiglib#103

Ignoring when user inputs NULL in a text field.
menuconfig exits with a python stack trace if NULL is provided as input
character, therefore ignore NULL as an input character to prevent this
behaviour.

A NULL character may be given accidentally by the user through the
following ways:
- Pressing `Win` key on keyboard (Windows only)
- Pressing `<CTRL>-@` / `<CTRL>-2`.

Signed-off-by: Torsten Rasmussen <[email protected]>
@galak galak added the priority: low Low impact/importance bug label Mar 16, 2021
carlescufi pushed a commit that referenced this issue Apr 7, 2021
Fixes: #33212

Upstream PR: ulfalizer/Kconfiglib#103

Ignoring when user inputs NULL in a text field.
menuconfig exits with a python stack trace if NULL is provided as input
character, therefore ignore NULL as an input character to prevent this
behaviour.

A NULL character may be given accidentally by the user through the
following ways:
- Pressing `Win` key on keyboard (Windows only)
- Pressing `<CTRL>-@` / `<CTRL>-2`.

Signed-off-by: Torsten Rasmussen <[email protected]>
tejlmand added a commit to tejlmand/Kconfiglib that referenced this issue Oct 25, 2024
Fixes: zephyrproject-rtos/zephyr#33212

Ignoring when user inputs NULL in a text field.
menuconfig exits with a python stack trace if NULL is provided as input
character, therefore ignore NULL as an input character to prevent this
behaviour.

A NULL character may be given accidentally by the user through the
following ways:
- Pressing `Win` key on keyboard (Windows only)
- Pressing `<CTRL>-@` / `<CTRL>-2`.

Signed-off-by: Torsten Rasmussen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment