diff options
author | Romain Pokrzywka <romain.pokrzywka@bluescape.com> | 2016-02-03 18:48:37 -0800 |
---|---|---|
committer | Andy Nichols <andy.nichols@theqtcompany.com> | 2016-02-10 13:39:46 +0000 |
commit | 040d9da184f69ce548951e674353083967c137a2 (patch) | |
tree | 664a96bfccc13a177c647bda9670d7dae718867e | |
parent | 849ee6c976ba3574b1856eb9d16c2bd740a6d2e3 (diff) |
Fix ThreadedRenderLoop crash when showing a previously hidden window
cleanupNodesOnShutdown() was missing after the fireAboutToStop() call,
causing access to stale render nodes when the window is exposed again.
The crash occurs when accessing font cache data, which is stored
in thread-local storage for a thread that was exited a long time ago.
Change-Id: I1dab414106f17d08cd7d6a4e32ee50b3e57c2fd4
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
-rw-r--r-- | src/plugins/scenegraph/softwarecontext/threadedrenderloop.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/scenegraph/softwarecontext/threadedrenderloop.cpp b/src/plugins/scenegraph/softwarecontext/threadedrenderloop.cpp index ab274ed4af..82059e9289 100644 --- a/src/plugins/scenegraph/softwarecontext/threadedrenderloop.cpp +++ b/src/plugins/scenegraph/softwarecontext/threadedrenderloop.cpp @@ -339,7 +339,10 @@ bool RenderThread::event(QEvent *e) mutex.lock(); if (window) { - QQuickWindowPrivate::get(window)->fireAboutToStop(); + QQuickWindowPrivate *d = QQuickWindowPrivate::get(window); + d->fireAboutToStop(); + d->cleanupNodesOnShutdown(); + qCDebug(QSG_RASTER_LOG_RENDERLOOP) << QSG_RT_PAD << "- window removed"; window = 0; } |