Comment 6 for bug 517373

Revision history for this message
RJ Skerry-Ryan (rryan) wrote : Re: [Bug 517373] Re: QGLShader::link: Fragment shader(s) linked.... Crash on startup

On Mon, Feb 8, 2010 at 6:50 AM, Pegasus <email address hidden> wrote:
>
> RJ mentioned the core problem with this bug is that Qt happens to be in
> an OpenGL context when another GUI function (QMessageBox) was called,
> causing it to hang. I'm thinking a better solution would be to add a
> flag to errorDialog that suppresses the QMessageBoxes. Then in our GUI
> setup code, we'd fire a signal to tell errorDialog to keep quiet until
> we're done setting up the GUI and tell it again when we're done.
>
> This hack would work for this specific case. What happens when Qt 4.7
qWarnings every time we do something like draw the waveform. Every install
of Mixxx would be boned because it would constantly be popping up modal
boxes. We have to get rid of the idea of misusing the logging system for GUI
reporting. Every piece of Mixxx that needs to report something to a user
about some kind of error condition needs to use some Mixxx way to do it, not
a Qt way to do it.

Here's one way to do it. Make ErrorDialog a singleton class. Add a static
'critical()' and 'warning()' method to the class which calls similar
singleton methods. The signals that are already in place ensure the message
gets proxied to the GUI thread. Change every instance of qWarning and
qCritical in Mixxx (there are something like 10-20 total) to use
ErrorDialog.