You're right!!
I made what you told me and now it all works fine !!
thanks a lot all of you!!
Lorena
On Fri, 2005-06-17 at 10:48 -0400, Owen Taylor wrote:
> On Fri, 2005-06-17 at 11:56 -0300, Lorena Salinas wrote:
>
> > gdk_threads_leave(); /* release GTK thread lock */
> > pthread_mutex_unlock(&
On Fri, 2005-06-17 at 11:56 -0300, Lorena Salinas wrote:
> gdk_threads_leave(); /* release GTK thread lock */
> pthread_mutex_unlock(&mutex);
>
>
> while (valid) {
>
> gtk_tree_model_get (GTK_TREE_MODEL (model), &iter,
> TEST_COL_5,&status,
And it surprises you that this doesn't work?
All
Here is a test that I've run using gdb and had the following error:
Gtk-ERROR **: file gtksequence.c: line 760
(_gtk_sequence_node_find_by_pos): assertion failed: (node->parent !=
NULL)
aborting...
any help?
Regards,
Lorena
#include
#include
#include
#include
#include
#define STATUS_NO
Using gdb I obtained this:
Starting program: /home/lore/Projects/hostThread/src/hostthread
--g-fatal-warnings
[Thread debugging using libthread_db enabled]
[New Thread -1216235072 (LWP 13483)]
[New Thread -1218425936 (LWP 13484)]
Gtk-ERROR **: file gtksequence.c: line 760
(_gtk_sequence_node_find
Lorena Salinas <[EMAIL PROTECTED]> writes:
> Here is part of the function...
>
> valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (my_model),
> &iter);
This function also needs to be protected by the GTK+ lock, because the
GtkListStore rearranges the data structure every time it is accessed
On 06/15/2005 07:55:45 PM Wed, Lorena Salinas wrote:
Here is a graphic to show where (I suppose) the problem is:
[ snip ]
T1: gtk_main() starts to read the 5 columns of row 1 from the
model shared with
the working thread (using gtk_tree_model_get())
T2: the working thread locks GTK main t
;updated"
model
(using gtk_tree_model_get()) and it complains because the iter has
changed!!!
Regards,
Lorena
- Original Message -
From: "Peter Bloomfield" <[EMAIL PROTECTED]>
To: "Lorena Salinas" <[EMAIL PROTECTED]>
Cc:
Sent: Wednesday, June 1
On 06/15/2005 10:11:53 AM Wed, Lorena Salinas wrote:
Here is part of the function...
valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL
(my_model),
&iter);
while (valid) {
gtk_tree_model_get (GTK_TREE_MODEL (my_model), &iter,
MYMODEL_COL_STATUS, &status,
-1);
/* do some long calculations
Here is part of the function...
valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (my_model),
&iter);
while (valid) {
gtk_tree_model_get (GTK_TREE_MODEL (my_model), &iter,
MYMODEL_COL_STATUS, &status,
-1);
/* do some long calculations */
gdk_threads_enter(); /* get GTK thread lock */
On 06/14/2005 02:20:16 PM Tue, Lorena Salinas wrote:
Hi,
This is what I do inside the worker_thread function
(create_and_start_worker_thread ()) every time I want to update
the
model:
gdk_threads_enter();/* get GTK thread lock */
gtk_list_store_set (GTK_LIST_STORE (host_model), &i
On Tue, 2005-06-14 at 15:20 -0300, Lorena Salinas wrote:
> Hi,
>
> This is what I do inside the worker_thread function
> (create_and_start_worker_thread ()) every time I want to update the
> model:
>
>
> gdk_threads_enter(); /* get GTK thread lock */
>
> gtk_list_store_set (GTK_LIST_ST
Hi,
This is what I do inside the worker_thread function
(create_and_start_worker_thread ()) every time I want to update the
model:
gdk_threads_enter();/* get GTK thread lock */
gtk_list_store_set (GTK_LIST_STORE (host_model), &iter,
MYMODEL_COL_STATUS, STATUS
On Tue, 2005-06-14 at 14:40 -0300, Lorena Salinas wrote:
> Hi,
>
> This is my app's main function:
>
> int main (int argc, char **argv)
>
> {
>
> /* init threads */
> g_thread_init(NULL);
>
> gdk_threads_init();
>
> /* init gtk */
> gtk_init (&argc, &
Hi,
This is my app's main function:
int main (int argc, char **argv)
{
/* init threads */
g_thread_init(NULL);
gdk_threads_init();
/* init gtk */
gtk_init (&argc, &argv);
/* create the model and fill with data */
On Tue, 2005-06-14 at 09:59 -0300, Lorena Salinas wrote:
> 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_leav
15 matches
Mail list logo