GtkListStore and Threads problems



Hello,

I'm having problems with threads and a gtkliststore model.

My working thread updates a column value of a gtkliststore model using 
gtk_list_store_set() (every call surrounded by gdk_threads_enter() and 
gdk_threads_leave ()). That seems to be working right.

The problem is, when the main thread (that is gtk_main()) paints the 
gtk_tree_view (of that model), after some minutes, I get one of the 2 
following the errors:
 
1-
Gtk-ERROR **: file gtksequence.c: line 760 
(_gtk_sequence_node_find_by_pos): assertion failed: (node->parent !=
NULL)
aborting...
Aborted
 
2-
Gtk-ERROR **: file gtksequence.c: line 596 (_gtk_sequence_node_rotate): 
assertion failed: (node->parent != node)
aborting...
Aborted
 
I think the problem appears when the main thread is being "blocked" (by 
the worker thread) in the middle of a gtk_tree_store_get() while the 
worker thread updates that same row.
 
Then, the main thread no longer founds the "original" iter in the 
"sequence tree",  which (I assume) has been rendered invalid by in the 
call to gtk_list_store_set().
 
Any help with this will be wellcome.
 
Thanks in advance,
Lorena.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]