Skip to content
Snippets Groups Projects
Commit c0276f9e authored by Damian Johnson's avatar Damian Johnson
Browse files

Resizing could cause nyx to crah

Another great catch from Dbryrtfbcbhgf...

  https://trac.torproject.org/projects/tor/ticket/24382

  Traceback (most recent call last):
    File "/usr/local/bin/nyx", line 11, in <module>
      sys.exit(main())
    ...
    File "/usr/local/lib/python3.5/dist-packages/nyx/__init__.py", line 716, in redraw
      panel.redraw(force = force, top = occupied)
    File "/usr/local/lib/python3.5/dist-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.5/dist-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
parent ac85756e
No related branches found
No related tags found
No related merge requests found
......@@ -747,6 +747,8 @@ def draw(func, left = 0, top = 0, width = None, height = None, background = None
curses_subwindow.refresh()
return subwindow_dimensions
except curses.error:
return # raw curses access, such as subwin, can raise in edge cases such as resizing
finally:
CURSES_LOCK.release()
......
......@@ -80,6 +80,12 @@
<li>Errors when saving the configuration could result in a stacktrace (<b><a href="https://trac.torproject.org/projects/tor/ticket/24409">ticket</a></b>)</li>
</ul>
</li>
<li><span class="component">Curses</span>
<ul>
<li>Resizing could crash the interface (<b><a href="https://trac.torproject.org/projects/tor/ticket/24382">ticket</a></b>)</li>
</ul>
</li>
</ul>
<div id="version-2-0" class="section"></div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment