← Back to team overview

gtg-contributors team mailing list archive

Liblarch news

 

Hi guys,

Hope I'm not in your spam folder ;-)


I introduced some kind of Thread protection in the TreeModel today. Now,
if any call is done on the TreeModel by another thread than the main
thread, gtg crashes. I solved those hand-made crashes by putting some
"gobject.idle_add" in the add/update code (datastore and treenode).

But we still have nasty GTK crashes. (switch off the workview with -s
standard and you will see). I'm starting to be out of idea about those :
gtk complain that a "has_next(node)" returns None while the node is
specifically the last node in the tree !  Even the GTK source code doesn't
help this time. How can I debug that ?

(that's with the TreeModelFilter disabled. If enabled, no crash but very
very strange stuffs happen !)


I'm wondering : maybe we should also make each Liblarch Tree thread-single
and secure it to avoid thread problem. Could it be related ?  Luca, could
you make an option in the datastore that will disable Threads for debugging
purpose ?


I was also thinking about building another liblach_viewtree client than
the treemodel, only for testing purpose. He would be connected to a
ViewTree (just like the TreeModel) and would build an internal
representation of the tree. That representation would then be compared with
the real ViewTree representation in tests.


Lionel