GTG

Traceback when launching GTG

Bug #445640 reported by Kevin Mehall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTG
Fix Released
High
Bertrand Rousseau

Bug Description

This seems to have been introduced by r344 and is still present as of r347

GTG continues to run despite the traceback in the terminal

Traceback (most recent call last):
  File "/home/kevin/temporary/gtg/trunk/GTG/taskbrowser/browser.py", line 1373, in on_task_added
    self.task_tree_model.add_task(tid)
  File "/home/kevin/temporary/gtg/trunk/GTG/taskbrowser/tasktree.py", line 253, in add_task
    self._add_all_subtasks(node, task)
  File "/home/kevin/temporary/gtg/trunk/GTG/taskbrowser/tasktree.py", line 79, in _add_all_subtasks
    self._add_all_subtasks(c_node, c_task)
  File "/home/kevin/temporary/gtg/trunk/GTG/taskbrowser/tasktree.py", line 79, in _add_all_subtasks
    self._add_all_subtasks(c_node, c_task)
  File "/home/kevin/temporary/gtg/trunk/GTG/taskbrowser/tasktree.py", line 77, in _add_all_subtasks
    c_node_iter = self.get_iter(c_node_path)
ValueError: invalid tree path

Python 2.6.2 and pygtk 2.14.1-1ubuntu1 on Ubuntu 9.04

Revision history for this message
Kevin Mehall (kevin-mehall) wrote :

This happened nearly every time in r345, but happens only occasionally (about twice in 10 launches) on r347

Changed in gtg:
importance: Undecided → High
milestone: none → 0.2
status: New → Confirmed
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

it seems that this bug is caused by the function _path_for_node(self, node) in core/tree.py (line 119).

Unfortunatly, I can't reproduce this issue and thus debugging it out. If you have time, could you make some debugging to be sure about what is returned by the function ? It should be a path.

The question is wheter the path is invalid because it's not a path object or because the tree doesn't have such a path (because the tree has changed)

Revision history for this message
Kevin Mehall (kevin-mehall) wrote :

Paths are supposed to just be tuples, right?

I added "print self._path_for_node(parent) + (index, ); import sys; sys.stdout.flush()" before line 125

It looks like all the return values are tuples, and the one that causes the traceback has been used several times before. It's also not the same path that causes the failure each time

I attached a log of the paths returned, with the traceback included (the output of running ./gtg 2>&1 > /tmp/gtg1.txt)

Revision history for this message
Bertrand Rousseau (bertrand-rousseau) wrote :

This bug is caused by this code snippets:

if c_node_path:
    c_node_iter = self.get_iter(c_node_path)
    #self.row_inserted(c_node_path, c_node_iter)

As you can see, c_node_iter is actually not needed anymore since the following line is commented (I don't know who did this, and I don't remember doing it). As such, we can safely comment the previous two lines out without changing the behavior. That should stop this traceback from showing.

Revision history for this message
Bertrand Rousseau (bertrand-rousseau) wrote :

Fixed in r348

Changed in gtg:
status: Confirmed → Fix Committed
Changed in gtg:
assignee: nobody → Bertrand Rousseau (bertrand-rousseau)
Changed in gtg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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