GTG

Startup crash with wrong value in collapsed_tasks option

Bug #1280683 reported by Àlex Magaz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GTG
Won't Fix
Undecided
Unassigned

Bug Description

GTG fails to start with the following stack trace when the collapsed_tasks option in .config/gtg/gtg.conf has a wrong value:

Traceback (most recent call last):
  File "./gtg", line 90, in <module>
    main()
  File "./gtg", line 85, in main
    sys.exit(gtg.main(options, args))
  File "/home/alex/program/gtg/port-to-gtk3-py3/GTG/gtg.py", line 123, in main
    manager = Manager(req)
  File "/home/alex/program/gtg/port-to-gtk3-py3/GTG/gtk/manager.py", line 78, in __init__
    self.browser = TaskBrowser(self.req, self)
  File "/home/alex/program/gtg/port-to-gtk3-py3/GTG/gtk/browser/browser.py", line 122, in __init__
    self.restore_state_from_conf()
  File "/home/alex/program/gtg/port-to-gtk3-py3/GTG/gtk/browser/browser.py", line 516, in restore_state_from_conf
    self.vtree_panes['active'].collapse_node(path)
  File "../liblarch/liblarch_gtk/__init__.py", line 248, in collapse_node
    node_id = llpath[-1].strip("'")
IndexError: tuple index out of range

Some of the values that make it fail are these two:

collapsed_tasks = ""
collapsed_tasks = (,)

In my case, somehow I ended up with the first value while testing GTG. However, I haven't been able to reproduce it again. I found the second value by modifying the configuration file by hand.

Strangely, I haven't been able to reproduce the bug with the Python 2 version of GTG.

Tags: toreview

Related branches

Revision history for this message
Àlex Magaz (rivaldi8) wrote :

The linked branch solves the problem in trunk.

tags: added: toreview
Revision history for this message
Pawan Hegde (h-pawan) wrote :

I'd like to confirm that this solution works. It might even work without loading Defaults. In this case, we need to ignore the exception and continue.

Revision history for this message
Àlex Magaz (rivaldi8) wrote :

Yes, sure, there is no need to load the defaults to fix this issue. I just thought it'd be good to get rid of the problematic value to avoid it provoking other unexpected problems. I can update the branch if you will...

Jeff Fortin Tam (kiddo)
Changed in gtg:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.