I get hit by XLib errors every so often...  They seem to occur during track
loads and they lock up the UI thread.

Decided to take a poke around in the code after looking at this post:
http://lists.trolltech.com/qt-interest/2005-05/msg00702.html

Here's what I found:

Around line #155 of wavesummary.cpp we call:
            pTrackInfoObject->setWaveSummary(pData, 0);

If I comment out this line, I can load tracks very aggressively and I don't
get XLib errors.  (of course, I don't get wave summarys either)

setWaveSummary is defined here:

    851 void TrackInfoObject::setWaveSummary(Q3MemArray<char> * pWave,
Q3ValueList<long> * pSegmentation)
    852 {
    853     m_qMutex.lock();
    854     m_pWave = pWave;
    855     m_pSegmentation = pSegmentation;
    856     m_qMutex.unlock();
    857
    858     setOverviewWidget(m_pOverviewWidget);
    859 }

It calls

    875 void TrackInfoObject::setOverviewWidget(WOverview * p)
    876 {
    877     m_pOverviewWidget = p;
    878
    879     if (m_pOverviewWidget)
    880         p->setData(getWaveSummary(), getSegmentationSummary(),
getDuration()*getSampleRate()*getChannels());
    881 }

That calls:

     99 void WOverview::setData(Q3MemArray<char> * pWaveformSummary,
Q3ValueList<long> * pSegmentation, long liSampleDuration)
    100 {
    101     m_pWaveformSummary = pWaveformSummary;
    102     m_pSegmentation = pSegmentation;
    103     m_liSampleDuration = liSampleDuration;
    104
    105     repaint();
    106 }

So to me it looks like the wave summary thread is making a call to paint the
widget directly, something the mailing list post suggests is a bad idea to
do outside the main UI thread...

Now, I have to read a bit more about sending QEvents around...

-- 
__
--- == __/ t.O ==--
http://stacktrace.org/
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to