GNOME Bugzilla – Bug 141120
Certain Undo/redo causes Resource Usage to have duplicated task entries.
Last modified: 2004-12-22 21:47:04 UTC
With the attached sample small project do this, Click Task T1 and remove, Go to Resource view and Click resource R2, remove then R1 remove. Now click undo until its back (which works OK and doesn't seem to generate errors) NOW click redo a few times until its finished (if you have a console open at the time then you'll see errors from the first redo). Now go to the Resource Usage view and expand the Resource and you'll see many spurious copies of the same task. The console errors are (repeated as it happens per task and per Undo/Redo cycle)... (planner:12708): Planner-CRITICAL **: file planner-ttable-model.c: line 273 (ttable_model_get_path_from_node): assertion `node != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 386 (gtk_tree_path_get_indices): assertion `path != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 369 (gtk_tree_path_get_depth): assertion `path != NULL' failed (planner:12708): Planner-CRITICAL **: file planner-ttable-model.c: line 244 (ttable_model_get_iter): assertion `depth > 0' failed (planner:12708): GLib-CRITICAL **: file gnode.c: line 217 (g_node_unlink): assertion `node != NULL' failed (planner:12708): GLib-CRITICAL **: file gnode.c: line 206 (g_node_destroy): assertion `root != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 1247 (gtk_tree_model_row_deleted): assertion `path != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 400 (gtk_tree_path_free): assertion `path != NULL' failed (planner:12708): Planner-CRITICAL **: file planner-ttable-model.c: line 273 (ttable_model_get_path_from_node): assertion `node != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 386 (gtk_tree_path_get_indices): assertion `path != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 369 (gtk_tree_path_get_depth): assertion `path != NULL' failed (planner:12708): Planner-CRITICAL **: file planner-ttable-model.c: line 244 (ttable_model_get_iter): assertion `depth > 0' failed (planner:12708): GLib-CRITICAL **: file gnode.c: line 217 (g_node_unlink): assertion `node != NULL' failed (planner:12708): GLib-CRITICAL **: file gnode.c: line 206 (g_node_destroy): assertion `root != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 1247 (gtk_tree_model_row_deleted): assertion `path != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 400 (gtk_tree_path_free): assertion `path != NULL' failed (planner:12708): Planner-CRITICAL **: file planner-ttable-model.c: line 273 (ttable_model_get_path_from_node): assertion `node != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 386 (gtk_tree_path_get_indices): assertion `path != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 369 (gtk_tree_path_get_depth): assertion `path != NULL' failed (planner:12708): Planner-CRITICAL **: file planner-ttable-model.c: line 244 (ttable_model_get_iter): assertion `depth > 0' failed (planner:12708): GLib-CRITICAL **: file gnode.c: line 217 (g_node_unlink): assertion `node != NULL' failed (planner:12708): GLib-CRITICAL **: file gnode.c: line 206 (g_node_destroy): assertion `root != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 1247 (gtk_tree_model_row_deleted): assertion `path != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 400 (gtk_tree_path_free): assertion `path != NULL' failed (planner:12708): Planner-CRITICAL **: file planner-ttable-model.c: line 273 (ttable_model_get_path_from_node): assertion `node != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 386 (gtk_tree_path_get_indices): assertion `path != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 369 (gtk_tree_path_get_depth): assertion `path != NULL' failed (planner:12708): Planner-CRITICAL **: file planner-ttable-model.c: line 244 (ttable_model_get_iter): assertion `depth > 0' failed (planner:12708): GLib-CRITICAL **: file gnode.c: line 217 (g_node_unlink): assertion `node != NULL' failed (planner:12708): GLib-CRITICAL **: file gnode.c: line 206 (g_node_destroy): assertion `root != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 1247 (gtk_tree_model_row_deleted): assertion `path != NULL' failed (planner:12708): Gtk-CRITICAL **: file ../../gtk/gtktreemodel.c: line 400 (gtk_tree_path_free): assertion `path != NULL' failed
Created attachment 27091 [details] The reference project file. See text for how to use this.
...my guess is because ttable-model doesn't have a task-inserted signal on project. It has a stub of a task-added BUT projects don't raise that signal at all anyway (from mrp-project.c) ...needs a re-think - when you add/delete a task maybe we should reload the project in ttable ? That'll keep it in sync on UNDO/RDO I think.
...nah its not that - its just not deleting the nodes that it builds up !. I tried a patch but just can't make it work right.
Its when you remove resources that its gets upset. Its still remembering the assignments.
Please don't make me touch this code again :(