[Qt-interest] UI Interaction Freezing when using QGraphicsView - How to Debug?

Josiah Bryan jbryan at productiveconcepts.com
Thu Sep 24 22:28:00 CEST 2009


william.crocker at analog.com wrote:
> t 4.6-tp1.
>>>> The code below ran very well. Maybe someone else can comment on how to 
>>>> tweek Messa or OpenGL, but heck if it this sensitive to the openGL 
>>>> driver might as well let Qt do the rendering and know it run adequately 
>>>> on any machine.   I hope someone  can diagnose the opengl issue here
>> [snip]
>>
>> Any ideas on how to troublehsoot these QGLWidget problems? Anyone?
>>
> 
> Run in the debugger.
> When it freezes, interrupt and see where each thread is
> and what they are doing.

Thanks - but I tried that. Since the whole system UI freezes (I mean 
everything), the debugger (gdb in a konsole) doesn't even respond to 
Ctrl+C at the time to break in. By the time it response to Ctrl+C, the 
freeze is over, and it just stops at some point deep in libGLcore.so.

And I don't know where to set a "good" breakpoint, because (in the case 
of pbuffers2), it runs fine for 3 - 10 seconds, which represents 
hundreds of times through the same drawing function. Breakpointing 
anywhere in the drawing code would then be nigh unto useless, since it 
would be virtually humanly impossible to step through each of the 
hundreds of frames, just to catch the frame that GL decides to wack out 
  and freeze.

How bout trace statements (e.g. qDebug)? I've traced the hell out of my 
code and back again (the original problem_test code in this thread). 
Nothing for me to see there.

After putting in a bunch of qDebug() calls in the pbuffers2 glwidget.cpp 
draw() method, I find that every time that example freezes, its in this 
call:

if (!hasDynamicTextureUpdate)
         pbuffer->updateDynamicTexture(dynamicTexture);

Of course, if I comment out that call, no freezes, but no visual output, 
save the painted text on black at the top of the widget.

Any ideas where to go from here? And how does that relate to the 
original code in a QGraphicsView with a QGLWidget as a viewport? Does 
QGraphicsView use pbuffers?

Thanks!
-josiah





More information about the Qt-interest-old mailing list