[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 14 10:08:29 UTC 2019


 vcl/source/window/window.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 33258dfc3b97fd357273c52d9c7c9854362e25b6
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Aug 12 17:57:25 2019 +0200
Commit:     Xisco FaulĂ­ <xiscofauli at libreoffice.org>
CommitDate: Wed Aug 14 12:07:44 2019 +0200

    tdf#126808 vcl: fix crash due to leaking the frame's buffer vdev
    
    This vdev is used to do vcl-level double-buffering, which is off by
    default, but e.g. listboxes/comboboxes use it to avoid flicker with
    Windows GDI.
    
    The root cause was introduced in commit
    ea5e83abcfa1406c401b8a1ec91efda65373b74b (tdf#92982 vcl: stop
    creating/disposing the paint buffer in PaintHelper, 2015-07-30), which
    removed the explicit mpBuffer.disposeAndClear() in the PaintHelper dtor,
    but forgot to explicitly dispose it elsewhere.
    
    This is now a much more visible problem since commit
    d4714b0fdb81e6e561ae526cc517ecc9a40a603e (tdf#101978 vcl
    combobox/listbox floating window: avoid flicker, 2019-06-17) as the
    infrastructure is used for all list/comboboxes.
    
    Fix the problem by explicitly disposing the vdev before deleting the
    frame data, so the underlying GDI resource is released, even if we have
    a reference cycle.
    
    Change-Id: Ia217bbd78780a214308e497044e73e378ee8ecd6
    Reviewed-on: https://gerrit.libreoffice.org/77370
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit e71093c0bc52426647a9d3a41ac0643bbc6cb0c6)
    Reviewed-on: https://gerrit.libreoffice.org/77389
    Reviewed-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 9b7a1580bbcf..ee003311e084 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -554,6 +554,7 @@ void Window::dispose()
         assert (mpWindowImpl->mpFrameData->mnFocusId == nullptr);
         assert (mpWindowImpl->mpFrameData->mnMouseMoveId == nullptr);
 
+        mpWindowImpl->mpFrameData->mpBuffer.disposeAndClear();
         delete mpWindowImpl->mpFrameData;
         mpWindowImpl->mpFrameData = nullptr;
     }


More information about the Libreoffice-commits mailing list