GTG

[gtg-refactor] Crash when moving multiple tasks to be subtasks of another

Bug #529273 reported by Bryce Harrington
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTG
Fix Released
Critical
Luca Invernizzi

Bug Description

This is a regression on the gtg-refactor branch. Steps to reproduce are:

1. Launch ./scripts/debug.sh
2. Expand the subtasks under 'Getting started with GTG'
3. Select all the tasks titled "Learn how to..."
4. Drag them onto 'Reporting bugs', which should make them sub-tasks of that, but doesn't.

In the console I see this output printed:

Traceback (most recent call last):
  File "/home/bryce/src/gtg/gtg-refactor-main/GTG/taskbrowser/tasktree.py", line 498, in on_drag_data_received
    model_filter.convert_iter_to_child_iter(drag_iter_filter)
NameError: global name 'model_filter' is not defined
/home/bryce/src/gtg/gtg-refactor-main/GTG/taskbrowser/browser.py:1758: GtkWarning: You must override the default 'drag_data_received' handler on GtkTreeView when using models that don't support the GtkTreeDragDest interface and enabling drag-and-drop. The simplest way to do this is to connect to 'drag_data_received' and call g_signal_stop_emission_by_name() in your signal handler to prevent the default handler from running. Look at the source code for the default handler in gtktreeview.c to get an idea what your handler should do. (gtktreeview.c is in the GTK source code.) If you're using GTK from a language other than C, there may be a more natural way to override default handlers, e.g. via derivation.
  gtk.main()

Tags: regression
Revision history for this message
Bryce Harrington (bryce) wrote :

Commenting out the three lines below makes it no longer crash, but of course also makes the tasks not become subtasks. But judging from some of the surrounding code, model_filter doesn't work yet.

        # Get dragged iter as a TaskTreeModel iter
        iters = selection.data.split(',')
        for iter in iters:
            drag_iter = model.get_iter_from_string(iter)
            drag_iter_filter =\
                model.convert_iter_to_child_iter(None, drag_iter)
# drag_iter_tasktree =\
# model_filter.convert_iter_to_child_iter(drag_iter_filter)
# tasktree_model.move_task(par_iter_tasktree, drag_iter_tasktree)

Changed in gtg:
importance: High → Critical
Changed in gtg:
status: New → Confirmed
Revision history for this message
Luca Invernizzi (invernizzi) wrote :

Fixed. It still have a refresh problem (it doesn't show the changes after the DnD), but if you restart GTG everything is fine.

Changed in gtg:
assignee: nobody → Luca Invernizzi (invernizzi)
status: Confirmed → Fix Committed
Changed in gtg:
milestone: 0.3 → 0.2.9
Izidor Matušov (izidor)
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.