Opened 17 months ago

Closed 17 months ago

Last modified 17 months ago

#26584 closed defect (duplicate)

nyx crashes on startup with insufficient terminal size

Reported by: kn Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Nyx Version: Tor: unspecified
Severity: Normal Keywords: terminal size
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

On OpenBSD/sparc64 -current, nyx 2.0.4 dumps the following trace if the controlling terminal is too small.

I'd expect this exit gracefully or show a limited view that fits.

$ echo $TERM
screen
$ resize
COLUMNS=105;
LINES=13;
export COLUMNS LINES;
$ nyx-relay
Exception in thread Thread-6:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.6/site-packages/nyx/__init__.py", line 740, in halt_panels
    panel.join()
  File "/usr/local/lib/python3.6/threading.py", line 1051, in join
    raise RuntimeError("cannot join thread before it is started")
RuntimeError: cannot join thread before it is started

Traceback (most recent call last):
  File "/usr/local/bin/nyx", line 11, in <module>
    load_entry_point('nyx==2.0.4', 'console_scripts', 'nyx')()
  File "/usr/local/lib/python3.6/site-packages/nyx/__init__.py", line 176, in main
    nyx.starter.main()
  File "/usr/local/lib/python3.6/site-packages/stem/util/conf.py", line 289, in wrapped
    return func(*args, config = config, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/nyx/starter.py", line 118, in main
    nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
  File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 217, in start
    curses.wrapper(_wrapper)
  File "/usr/local/lib/python3.6/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 215, in _wrapper
    function()
  File "/usr/local/lib/python3.6/site-packages/nyx/__init__.py", line 200, in draw_loop
    interface.redraw()
  File "/usr/local/lib/python3.6/site-packages/nyx/__init__.py", line 716, in redraw
    panel.redraw(force = force, top = occupied)
  File "/usr/local/lib/python3.6/site-packages/nyx/panel/__init__.py", line 175, in redraw
    self._last_draw_size = nyx.curses.draw(self._draw, top = self._top, height = self.get_height(), draw_if_resized = draw_dimension)
  File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 740, in draw
    curses_subwindow = CURSES_SCREEN.subwin(subwindow_height, subwindow_width, top, left)
_curses.error: curses function returned NULL

Child Tickets

Change History (4)

comment:1 Changed 17 months ago by kn

Summary: crash on startup with insufficient terminal sizednyx crashs on startup with insufficient terminal size

Improve summary.

comment:2 Changed 17 months ago by kn

Summary: nyx crashs on startup with insufficient terminal sizenyx crashes on startup with insufficient terminal size

comment:3 Changed 17 months ago by Dbryrtfbcbhgf

Git clone the latest dev version to get the fix for this bug. Run the following commands to install and run the latest development version of Nyx.

  1. git clone https://git.torproject.org/nyx.git
  2. cd nyx
  3. nyx
Last edited 17 months ago by Dbryrtfbcbhgf (previous) (diff)

comment:4 Changed 17 months ago by Dbryrtfbcbhgf

Resolution: duplicate
Status: newclosed

duplicate of #24382

Last edited 17 months ago by Dbryrtfbcbhgf (previous) (diff)
Note: See TracTickets for help on using tickets.