summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-04-23 12:49:52 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-04-23 17:46:20 +0200
commite7d302a9a540394264bfe813d4eb74d76b94802c (patch)
tree5c3fc49af310f6bb038b71cf13d422acfc54de2b /vcl
parent57138e6cfa1dec2c44d7cca55171dca40d45aaa3 (diff)
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@allotropia.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/uitest/uno/uiobject_uno.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx
index 56cd807552f5..ed208fd65d7d 100644
--- a/vcl/source/uitest/uno/uiobject_uno.cxx
+++ b/vcl/source/uitest/uno/uiobject_uno.cxx
@@ -163,7 +163,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;
@@ -181,6 +186,7 @@ OUString SAL_CALL UIObjectUnoObj::getType()
if (!mpObj)
throw css::uno::RuntimeException();
+ SolarMutexGuard aGuard;
return mpObj->get_type();
}