Error in GTK with wxListBox

Hi Everyone,

I am working with threading to ensure that my application does not appear frozen when doing long tasks. One involves downloading an item from the web and adding it to a wxListBox, multiple times. Before the application would appear frozen, and then after a little while it would appear with everything in the list as I wanted it. When I implemented threading to make the adding to the listbox threaded, I get the following error:

** ERROR:(…/src/gtk/treeentry_gtk.c:144):gtk_tree_entry_string_transform_func: assertion failed: (GTK_IS_TREE_ENTRY(src_value->data[0].v_pointer))
./downloadr: line 2: 14469 Aborted python main.py

I have no idea how to interpret this. The first time I did it, about 5 items had been added to the list (not all of them), so it starts to work, but then stops. Is there a known solution to this, or would it be better to add things to a python list (or array, depending on who you talk to) then add them to the wxListBox all at once?

Thanks for your help.

  • Josh
···


Joshua Henderson
+61 449 128 074
joshhendo@gmail.com

Joshua Henderson wrote:

Hi Everyone,

I am working with threading to ensure that my application does not appear frozen when doing long tasks. One involves downloading an item from the web and adding it to a wxListBox, multiple times. Before the application would appear frozen, and then after a little while it would appear with everything in the list as I wanted it. When I implemented threading to make the adding to the listbox threaded, I get the following error:

** ERROR:(../src/gtk/treeentry_gtk.c:144):gtk_tree_entry_string_transform_func: assertion failed: (GTK_IS_TREE_ENTRY(src_value->data[0].v_pointer))
./downloadr: line 2: 14469 Aborted python main.py

I have no idea how to interpret this. The first time I did it, about 5 items had been added to the list (not all of them), so it starts to work, but then stops. Is there a known solution to this, or would it be better to add things to a python list (or array, depending on who you talk to) then add them to the wxListBox all at once?

How are you communicating between threads? Are you ensuring that there is no manipulation of the GUI happening in the download thread?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!