[sldev] I found a possible problem on linux (gdk/gtk related)
Mike Dickson
mike.dickson at hp.com
Thu Jun 18 09:16:02 PDT 2009
As long as all the drawing is done on the main thread there's no reason
to initialize the toolkit for threading. I've never had any real
positive experience with GTK and threading. Especially since many of
the libraries you might use are likely not thread safe. Certainly can
use threads for computation but if you make proper use of the eventing
system and use idle_add to push gtk stuff onto the main thread.
Yes, I know gtk and thread can supposedly be done. I've just never had
much luck with it personally. The above patterns work much better for
me.
Mike
On Thu, 2009-06-18 at 14:49 +0000, Carlo Wood wrote:
> My question is: what percentage of the users is using linux?
>
> Here I am assuming that linux users, and only linux users, are
> using the GTK part (and gstreamer).
>
> I have reason to believe that GTK is not being used thread-safe,
> which should cause random crashes on linux. The reason that I
> believe this is because I started to use GTK seriously from
> a new thread which immediately caused very frequent crashes
> (more than 95% of the time) which led me quickly to find out
> that gdk threading wasn't initialized (no locking takes place
> at all in the current viewer).
>
> I added that initialization and locking, and added some necessary
> (missing) locking calls... until my new thread ran perfectly.
>
> However, what I run into now are deadlocks (without using my new
> thread). This indicates that the viewer (without my changes) is
> using gdk/gtk from two different threads at the same time (and
> without locking thus). That this works in most cases could be
> just luck.
>
> I was/am planning to provide a patch for this, but I'm busy :p
> So, hence the question at the top. I'd expect crashes on linux
> while people are playing music and open a file picker window
> at the same time; if this is not the case, then I guess that
> the gstreamer mainloop doesn't bite the filepicker by coincidence,
> what would make this a not so hight priority to fix though.
>
> Carlo Wood
>
> _______________________________________________
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/SLDev
> Please read the policies before posting to keep unmoderated posting privileges
More information about the SLDev
mailing list