I modified some code to get a idea of what is going on. What I'm seeing
is that the filter is getting very deep into processing the nodes that
it stacks up lots of nodes in the "wait" queue waiting for its root to
be added.  Then when the root is finally added, it only processes 1 on
the stack, which cannot be added since its root was not added.
Ultimately, there are not enough iterations through the list of nodes to
empty out the wait queue.  The messed up thing is that the wait queue
contains things after it thinks its complete which affects other
filters.

Somehow the wait queue needs to be emptied before it can stop.  Also, in
my opinion, this seems like a brute force way of dealing with a tree,
the simple fix would be to grind through the wait list until its empty
and all of the nodes have been added, however I the processing time to
do such a thing would be astronomical.  Surely there is a better way.

Ok, I modified the filtertree.py a little bit:

    def __add_node(self,tid,inroot=None):
        print tid
        if not self.is_displayed(tid):
            print "added1"
            node = self.get_node(tid)
            if inroot == None:
                inroot = self.__is_root(node)
            #If the parent's node is not already displayed, we wait
            if not inroot and not self.node_parent(node):
                print "added2"
                self.node_to_add.append(tid)
            else:
                print "added3"
                self.add_count += 1
                self.__nodes_count += 1
                self.__root_update(tid,inroot)
                self.displayed_nodes.append(tid)
                self.emit("task-added-inview", tid)
                #We added a new node so we can check with those waiting
                if len(self.node_to_add) > 0:
                    print "added4"
                    n = self.node_to_add.pop(0)
                    #node still to add cannot be root
                    self.__add_node(n,False)

For the bad filter, i get the following output:


applying filter @BC
1...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
9...@1
added1
added2
7...@1
added1
added2
1...@1
added1
added2
9...@1
added1
added2
5...@1
added1
added2
6...@1
added1
added2
1...@1
added1
added2
9...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
2...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
9...@1
added1
added2
8...@1
added1
added2
8...@1
added1
added2
8...@1
added1
added2
6...@1
added1
added2
1...@1
added1
added2
8...@1
added1
added2
1...@1
added1
added2
3...@1
added1
added2
2...@1
added1
added2
1...@1
added1
added2
9...@1
added1
added2
9...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
8...@1
added1
added2
1...@1
added1
added2
9...@1
added1
added2
2...@1
added1
added2
4...@1
added1
added3
added4
1...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
9...@1
added1
added2
1...@1
added1
added3
added4
1...@1
added1
added2
1...@1
added1
added2
9...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
3...@1
added1
added2
2...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added3
added4
1...@1
added1
added2
1...@1
added1
added3
added4
9...@1
added1
added2
1...@1
added1
added3
added4
7...@1
added1
added2
8...@1
added1
added3
added4
1...@1
added1
added2
8...@1
added1
added2
2...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
7...@1
added1
added2
1...@1
added1
added3
added4
9...@1
added1
added2
2...@1
added1
added2
1...@1
added1
added2
9...@1
added1
added2
1...@1
added1
added2
1...@1
added1
added2
9...@1
added1
added2
1...@1
added1
added2
8...@1
added1
added2
8...@1
added1
added2
1...@1
added1
added2
8...@1
added1
added2
8...@1
added1
added2
1...@1
added1

-- 
[gtg-refactor] Subtasks missing in task tree
https://bugs.launchpad.net/bugs/552098
You received this bug notification because you are a member of Gtg
contributors, which is subscribed to Getting Things GNOME!.

Status in Getting Things GNOME!: Incomplete

Bug description:
Using trunk revision 712.

Simply put, the subtasks for a task do no show up in the task list.  The 
subtask count is correct for the task in the tree view, however not all of the 
subtasks are visible.

Opening up the task and closing will refresh the tree view and the missing 
tasks appear again.  

Switching to a filtered view by selecting a tag from the tag pane can cause the 
problem to appear again, of course opening up the task fixes the missing 
subtasks.

By the same token, subtasks of subtasks are also missing, opening up the 
subtask fixes the children.

I don't see any consistent behavior as to which tasks appear vs. which are 
missing.



_______________________________________________
Mailing list: https://launchpad.net/~gtg
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~gtg
More help   : https://help.launchpad.net/ListHelp

Reply via email to