[Development] QSG render thread crashes during volumetric rendering

Cartik Sharma cartik.sharma at gmail.com
Mon Dec 15 21:29:17 CET 2014


Thanks. The volume rendering seems to work fine with just one problem.
When I rotate an image in a 2d window and get back to the 3d window,
and try to rotate the 3d object, it crashes again.

VTK must be changing the gl state and so I must call resetOpenGLState
before I rotate the view except I can't call it in the new mousePressEvent
since the original context is lost.

Any idea how to fix this.

Best regards,
Cartik

On Mon, Dec 15, 2014 at 2:35 PM, Sean Harmer <sean.harmer at kdab.com> wrote:
>
> On Monday 15 December 2014 14:16:17 Cartik Sharma wrote:
> > Thanks so much. I tried a view.resetOpenGLState and it works without
> > crashing.
>
> One of the common ways this crashes the driver is inside calls to
> glDrawElements if you have a bad element buffer bound which then indexes
> into
> some random memory address. This is easy to have happen if VTK leaves some
> state configured when control goes back to Qt Quick. Qt Quick assumes the
> state
> has not been tampered with and may go ahead and update something which
> tramples over one of your buffers.
>
> A handy technique is to run your app through a debug tracing tool like
> apitrace to see what state is left behind by your custom rendering code.
>
> Cheers,
>
> Sean
> --
> Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
> Klarälvdalens Datakonsult AB, a KDAB Group company
> Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
> KDAB - Qt Experts - Platform-independent software solutions
>


-- 
"There is plenty of room at the bottom!" R. Feynman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20141215/e29c6456/attachment.html>


More information about the Development mailing list