[Interest] QQuickWindow::sceneGraphInvalidated not invoked

Russell, Matthew MRussell at neptec.com
Sun Sep 3 18:30:08 CEST 2017


Hi,

Is there anything that could prevent QQuickWindow::sceneGraphInvalidated from being invoked?

I've integrated the "Scene Graph - Rendering FBOs in a thread" ( http://doc.qt.io/qt-5/qtquick-scenegraph-textureinthread-example.html ) example into my code..  It's hard to post code samples, but essentially I cannot find any meaningful difference between how that example connects to sceneGraphInvalidated and how I do.

That said, when I run the example in QtCreator (using Qt 5.9.1), everything works (sceneGraphInvalidated is triggered, shutdown gets called, etc), but when I run my code, the signal is never sent, and I end up (on exit) with a seg fault.  Just to be clear, I'm triggering an exit by clicking the window's X button.  When I examine the backtrace in GDB, it starts with QQuickView's destructor, confirming that the sceneGraphInvalidated step seemed to just be skipped.

My connection line:
connect(window(), &QQuickWindow::sceneGraphInvalidated, m_renderThread, &RenderThread::shutDown, Qt::QueuedConnection);

I've checked that window() actually has a value, everything seems good.  I receive windowChange() events without any issue.  I've made sure my parents are setup properly (and tried without them setup like the example), I seem to be running on the proper threads (i.e. I printed out the threads in the example, and my code jumps around threads in the same manner.)  I've modified main.qml in the example to be pretty much the same as I have in my code.  Nothing I do makes any difference in this respect.

Is there anything I could accidentally be doing that could somehow be blocking my signal?

Thanks.


More information about the Interest mailing list