Opened 6 years ago

Closed 6 years ago

#3128 closed defect (fixed)

"AttributeError: 'NoneType' object has no attribute 'getDetails'" by trying to select a connection, when there are no connections

Reported by: asn Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Nyx Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Hi,

if the connection tab is empty (for example, when bootstrapping a new relay) and I press "Enter" inside it, arm crashes and I get this trace:

Traceback (most recent call last):

File "./src/starter.py", line 398, in <module>

cli.controller.startTorMonitor(time.time() - initTime, expandedEvents, paramstartup.blindModeEnabled?)

File "/home/user/arm/src/cli/controller.py", line 1441, in startTorMonitor

curses.wrapper(drawTorMonitor, startTime, loggedEvents, isBlindMode)

File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper

return func(stdscr, *args, kwds)

File "/home/user/arm/src/cli/controller.py", line 1429, in drawTorMonitor

panelsconn?.handleKey(key)

File "/home/user/arm/src/cli/connections/connPanel.py", line 153, in handleKey

self.redraw(True)

File "/home/user/arm/src/util/panel.py", line 355, in redraw

self.draw(self.maxX - 1, self.maxY)

File "/home/user/arm/src/cli/connections/connPanel.py", line 231, in draw

drawEntries = cursorSelection.getDetails(width)

AttributeError: 'NoneType' object has no attribute 'getDetails'
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):

File "/usr/lib/python2.5/threading.py", line 486, in bootstrap_inner
File "/home/user/arm/src/util/connections.py", line 457, in run
File "/usr/lib/python2.5/threading.py", line 115, in release

<type 'exceptions.TypeError'>: 'NoneType' object is not callable
Exception in thread conn (most likely raised during interpreter shutdown):
Traceback (most recent call last):

File "/usr/lib/python2.5/threading.py", line 486, in bootstrap_inner
File "/home/user/arm/src/cli/connections/connPanel.py", line 187, in run
File "/usr/lib/python2.5/threading.py", line 115, in release

<type 'exceptions.TypeError'>: 'NoneType' object is not callable
Exception in thread header (most likely raised during interpreter shutdown):
Traceback (most recent call last):

File "/usr/lib/python2.5/threading.py", line 486, in bootstrap_inner
File "/home/user/arm/src/cli/headerPanel.py", line 286, in run
File "/usr/lib/python2.5/threading.py", line 115, in release

<type 'exceptions.TypeError'>: 'NoneType' object is not callable

It's nothing important but I felt like I should report it.

Child Tickets

Change History (4)

comment:1 Changed 6 years ago by asn

trac fubared the traceback.
I hope you can make it out, if not, ask for a clean one and I shall deliver.

comment:2 Changed 6 years ago by asn

And because I'm an awful bug reporter, I forgot to mention that:

Tor version: Tor 0.2.3.1-alpha-dev
Arm version: arm version 1.4.3_dev (released April 4, 2011)

comment:3 in reply to:  description Changed 6 years ago by rransom

Replying to asn:

Hi,

if the connection tab is empty (for example, when bootstrapping a new relay) and I press "Enter" inside it, arm crashes and I get this trace:

Traceback (most recent call last):
  File "./src/starter.py", line 398, in <module>
    cli.controller.startTorMonitor(time.time() - initTime, expandedEvents, param["startup.blindModeEnabled"])
  File "/home/user/arm/src/cli/controller.py", line 1441, in startTorMonitor
    curses.wrapper(drawTorMonitor, startTime, loggedEvents, isBlindMode)
  File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/user/arm/src/cli/controller.py", line 1429, in drawTorMonitor
    panels["conn"].handleKey(key)
  File "/home/user/arm/src/cli/connections/connPanel.py", line 153, in handleKey
    self.redraw(True)
  File "/home/user/arm/src/util/panel.py", line 355, in redraw
    self.draw(self.maxX - 1, self.maxY)
  File "/home/user/arm/src/cli/connections/connPanel.py", line 231, in draw
    drawEntries = cursorSelection.getDetails(width)
AttributeError: 'NoneType' object has no attribute 'getDetails'
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
  File "/home/user/arm/src/util/connections.py", line 457, in run
  File "/usr/lib/python2.5/threading.py", line 115, in release
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
Exception in thread conn (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
  File "/home/user/arm/src/cli/connections/connPanel.py", line 187, in run
  File "/usr/lib/python2.5/threading.py", line 115, in release
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
Exception in thread header (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
  File "/home/user/arm/src/cli/headerPanel.py", line 286, in run
  File "/usr/lib/python2.5/threading.py", line 115, in release
<type 'exceptions.TypeError'>: 'NoneType' object is not callable

It's nothing important but I felt like I should report it.

comment:4 Changed 6 years ago by atagar

Resolution: fixed
Status: newclosed

Thanks for the catch! Fixed so we're accounting for the possibility of not having entries in the connection panel:
https://gitweb.torproject.org/arm.git/commit/9fbed0c32c88b534b79485748031996ec2b05946

Cheers! -Damian

Note: See TracTickets for help on using tickets.