[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 26 15:05:28 UTC 2021


 vcl/source/uitest/uno/uiobject_uno.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit e2566fe6ca4bb4507bff2d20c9752294c3fd5771
Author:     Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Fri Apr 23 12:49:52 2021 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Apr 26 17:04:56 2021 +0200

    vcl: use SolarMutexGuard when accessing UIObjectUnoObj::mpObj
    
    This recently crashed in jenkins, in UITest_sw_navigator:
    
    Thread 1 (Thread 0x2b46be801700 (LWP 8577)):
    0  rtl::Reference<vcl::Window>::get() const (this=0x9999999999999a21)
    1  VclPtr<vcl::Window>::operator vcl::Window*() const (this=0x9999999999999a19)
    2  vcl::Window::GetChildCount() const (this=0x2636360)
    [...]
    13 WindowUIObject::get_children() const (this=0x1899cd0)
    14 UIObjectUnoObj::getChildren() (this=0x18986f0)
    15 non-virtual thunk to UIObjectUnoObj::getChildren()
    16 gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*)
    
    Change-Id: I190738a436e4cd957362f5bb2cd8993c8424512a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114541
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
    (cherry picked from commit e7d302a9a540394264bfe813d4eb74d76b94802c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114599
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx
index 593f4a4c11fe..75899c9bc12c 100644
--- a/vcl/source/uitest/uno/uiobject_uno.cxx
+++ b/vcl/source/uitest/uno/uiobject_uno.cxx
@@ -162,7 +162,12 @@ css::uno::Sequence<OUString> UIObjectUnoObj::getChildren()
     if (!mpObj)
         throw css::uno::RuntimeException();
 
-    std::set<OUString> aChildren = mpObj->get_children();
+    std::set<OUString> aChildren;
+
+    {
+        SolarMutexGuard aGuard;
+        aChildren = mpObj->get_children();
+    }
 
     css::uno::Sequence<OUString> aRet(aChildren.size());
     sal_Int32 i = 0;
@@ -180,6 +185,7 @@ OUString SAL_CALL UIObjectUnoObj::getType()
     if (!mpObj)
         throw css::uno::RuntimeException();
 
+    SolarMutexGuard aGuard;
     return mpObj->get_type();
 }
 


More information about the Libreoffice-commits mailing list