Re: Don't understand valgrind output



Thanks, once again, for your answer.  gxine doesn't lock up but I
think that I've found the issue, well at least stopped the freezes.
It seems that I have to handle the expose event and pass it onto
libxine.  I thought that the expose event was just supposed to inform
the window that it needed redrawing and wouldn't cause other freezing
issues if not handled.  Not sure why this happens but I hope this
helps someone someday.

I completely agree with you statement "I always use message-passing
into the main GUI thread", in fact, a few posts back I was
recommending the same thing to AlannY.  It's just easier.
Unfortunately, libxine creates many threads to process the media
stream so I have no choice.

Thanks all for your help,

Michael


On 22/10/2007, Chris Vine <chris cvine freeserve co uk> wrote:

On Sun, 2007-10-21 at 13:58 +1000, Michael Lamothe wrote:
Thanks for the excellent responses.  I think that you're right, I've
been doing a bit of reading about how valgrind works and it appears
that it's especially poor when it comes to multi-threaded
applications.

The CPU time goes to zero when the application freezes.  This
indicates that it's maybe some kind of locking issue.  The UI locks up
when I resize the main window.  My application uses
gdk_threads_enter()/leave() around the gtk_main() call.  I'm also
using libxine to write directly onto a GtkDrawingArea.

I know this is a long shot but has anyone got any experience with this
kind of UI freezing issue or does anyone have any suggestions/ideas
about what I can do?

I have a problem with gxine locking up when resizing its window with
xorg-1.3.  This may or may not be related to your problem (that is, it
may show there is an issue in libxine and/or xorg).  It may be
interesting if you were to start up gxine and see how that works.

Equally, it could be a problem with your use of threads.  There are a
number of subtleties in using gdk_threads_enter()/leave() and it is very
easy to slip up (in addition, it doesn't work under Windows).  Nowadays
I always use message-passing into the main GUI thread instead, either
using g_idle_add() or other mechanisms.

Chris






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