Re: [Development] QSG render thread crashes during volumetric rendering
Thanks so much. I tried a view.resetOpenGLState and it works without crashing. Best regards, Cartik On Mon, Dec 15, 2014 at 1:53 PM, Gunnar Sletta gun...@sletta.org wrote: Maybe try a call to QQuickWindow::resetOpenGLState() after VTK finishes. It may be some dangling GL state that messes up for the renderer. cheers, Gunnar On 12 Dec 2014, at 21:19, Cartik Sharma cartik.sha...@gmail.com wrote: Hello, I'm trying to do volumetric rendering with VTK using the QVTKFramebufferObject class from https://gist.github.com/nocnokneo/c3fb01bb7ecaf437f7d6 Essentially this is a class based on QQuickFramebufferObject and over rides rendering with certain presets for OpenGL states. It works well for images and 3D objects but crashes the QSG render thread during render calls from vtkFixedPointVolumeRayCastMapper. I need help debugging the crash and fixing this error. (please refer crash report in render_crash.txt) Best regards, Cartik render_crash.txt___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development -- There is plenty of room at the bottom! R. Feynman ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] QSG render thread crashes during volumetric rendering
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.har...@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.har...@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 ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
[Development] QSG render thread crashes during volumetric rendering
Hello, I'm trying to do volumetric rendering with VTK using the QVTKFramebufferObject class from https://gist.github.com/nocnokneo/c3fb01bb7ecaf437f7d6 Essentially this is a class based on QQuickFramebufferObject and over rides rendering with certain presets for OpenGL states. It works well for images and 3D objects but crashes the QSG render thread during render calls from vtkFixedPointVolumeRayCastMapper. I need help debugging the crash and fixing this error. (please refer crash report in render_crash.txt) Best regards, Cartik Thread 7 Crashed:: QSGRenderThread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: EXC_I386_GPFLT 0 com.apple.GeForceGLDriver 0x00020032d729 gldBlitFramebufferData + 162529 1 com.apple.GeForceGLDriver 0x000200324d14 gldBlitFramebufferData + 127180 2 com.apple.GeForceGLDriver 0x0002002d8e87 gldRestoreTextureData + 779309 3 com.apple.GeForceGLDriver 0x0002002d80c3 gldRestoreTextureData + 775785 4 com.apple.GeForceGLDriver 0x0002001d66e2 0x2 + 1926882 5 com.apple.GeForceGLDriver 0x000200305e8e gldBlitFramebufferData + 582 6 libGPUSupport.dylib 0x0001470e9a6d gldUpdateDrawFramebuffer + 108 7 GLEngine0x000146e72e55 gleUpdateDrawFramebufferState + 556 8 GLEngine0x000146d60369 glClear_Exec + 256 9 QtQuick 0x0001114e8f95 QSGBatchRenderer::Renderer::renderBatches() + 533 10 QtQuick 0x0001114ea557 QSGBatchRenderer::Renderer::render() + 2343 11 QtQuick 0x0001114f70b0 QSGRenderer::renderScene(QSGBindable const) + 352 12 QtQuick 0x0001114f6f3c QSGRenderer::renderScene() + 28 13 QtQuick 0x00011150620b QSGRenderContext::renderNextFrame(QSGRenderer*, unsigned int) + 107 14 QtQuick 0x000111542179 QQuickWindowPrivate::renderSceneGraph(QSize const) + 649 15 QtQuick 0x00011151f521 QSGRenderThread::syncAndRender() + 289 16 QtQuick 0x00011151f968 QSGRenderThread::run() + 200 17 QtCore 0x0001129f5332 QThreadPrivate::start(void*) + 338 18 libsystem_c.dylib 0x7fff89aea772 _pthread_start + 327 19 libsystem_c.dylib 0x7fff89ad71a1 thread_start + 13 ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development