After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 141120 - Certain Undo/redo causes Resource Usage to have duplicated task entries.
Certain Undo/redo causes Resource Usage to have duplicated task entries.
Status: RESOLVED FIXED
Product: planner
Classification: Other
Component: General
unspecified
Other All
: Normal normal
: 0.12
Assigned To: planner-maint
planner-maint
Depends on:
Blocks:
 
 
Reported: 2004-04-26 05:53 UTC by Lincoln Phipps
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The reference project file. (2.19 KB, text/plain)
2004-04-26 05:54 UTC, Lincoln Phipps
Details

Description Lincoln Phipps 2004-04-26 05:53:19 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
Comment 1 Lincoln Phipps 2004-04-26 05:54:05 UTC
Created attachment 27091 [details]
The reference project file.

See text for how to use this.
Comment 2 Lincoln Phipps 2004-04-29 05:25:29 UTC
...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.
Comment 3 Lincoln Phipps 2004-04-30 08:19:17 UTC
...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.

Comment 4 Lincoln Phipps 2004-05-02 12:00:42 UTC
Its when you remove resources that its gets upset. Its still remembering the
assignments. 
Comment 5 Richard Hult 2004-06-22 22:25:39 UTC
Please don't make me touch this code again :(