GTG

get_active_tasks_list sometimes return a wrong number of tasks

Bug #411420 reported by Paulo Cabido
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTG
Fix Released
Critical
Bertrand Rousseau

Bug Description

Sometimes the get_active_tasks_list returns the wrong number of tasks.

The tag view counts less one (in my case it's less one, it maybe change from case to case) task. For example if the total of active tasks is 20 the tag view will display a total of 19 tasks instead of 20.

To replicate it I had to open and close GTG several times for it to occur again.

It only occurs when threading is enabled.

Paulo Cabido (pcabido)
Changed in gtg:
importance: Undecided → High
Revision history for this message
Paulo Cabido (pcabido) wrote :

When a task is added and a new tag is also added, if the task is then deleted the tag in the tag view should be hidden instead of showing 0 (zero) tasks, right?

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Paulo > could you test with the latest trunk if it still applies and, if yes, give me a way to reproduce the bug ?

Revision history for this message
Paulo Cabido (pcabido) wrote :

Yes this bug is still present. To reproduce it close and open GTG several times with the tag view enabled, you'll see that the count from "All tasks" differs from GTG's title "active tasks".

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

Sometimes, when you launch GTG, subtasks are not connected to their normal roots but I believe this is the same bug.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Please test rev.344

This bug is not solved but I've discovered the root cause : the datastore is not always perfectly synchronized with the treemodel but it looks like we don't use the datastore anymore ! I don't understand that but it seems to be the case.

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

I get a traceback when launching GTG:

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

It then runs anyway, but acts really weird:
   * When I select a tag, it occasionally displays tasks that are not tagged with that tag
   * Some tasks are listed multiple times

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Kevin > the issue you are mentionning should be fixed in trunk. Please test it (and report separate issue if you can more or less reproduce something)

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

Lionel > Still there in r347. I reported bugs #445640 (the traceback) and #445663 (the duplicates and wrong tags), separately, since I don't know if they're related.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Kevin > Those bugs annoy me and I cannot reproduce them. But, anyway, I want to thank you for reporting them and the time you take to make GTG better.

I understand that current trunk, due to heavy refactorization, is in an awful state, worse than expected when merged. That's an hard time and any support and contribution in those time help us a lot. Thanks.

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

Disabling threading at line 237 in revno 365 seems to fix the bug. There is probably a race condition here.

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

Oups forgot to mention the file: it is datastore.py

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

Disabled in revno 380. Marking this bug as closed.

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

Remote bug watches

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