dbaccess/source/core/inc/PropertyForward.hxx  |    6 +++---
 dbaccess/source/core/misc/PropertyForward.cxx |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit fd113e2f44d4e821e829fb71ac51da33a3284b2f
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Thu May 25 08:55:13 2023 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Thu May 25 12:31:34 2023 +0200

    Revert "BaseMutex->std::mutex in OPropertyForward"
    
    This reverts commit b0244ef9e44c5c1dc9faf9705f2ae1dba499d62c.
    
    Lock when trying to save a change in a table:
    
    #0  futex_wait (private=0, expected=2, futex_word=0x55f20be59550) at 
../sysdeps/nptl/futex-internal.h:146
    #1  __GI___lll_lock_wait (futex=futex@entry=0x55f20be59550, private=0) at 
./nptl/lowlevellock.c:49
    #2  0x00007f462caab262 in lll_mutex_lock_optimized (mutex=0x55f20be59550) 
at ./nptl/pthread_mutex_lock.c:48
    #3  ___pthread_mutex_lock (mutex=0x55f20be59550) at 
./nptl/pthread_mutex_lock.c:93
    #4  0x00007f45fad12a63 in __gthread_mutex_lock(pthread_mutex_t*) 
(__mutex=0x55f20be59550) at 
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:749
    #5  0x00007f45fad138c5 in std::mutex::lock() (this=0x55f20be59550) at 
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_mutex.h:100
    #6  0x00007f45fad1389c in std::unique_lock<std::mutex>::lock() 
(this=0x7ffd5b691a78) at 
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/unique_lock.h:139
    #7  0x00007f45fad136b1 in 
std::unique_lock<std::mutex>::unique_lock(std::mutex&) (this=0x7ffd5b691a78, 
__m=...) at 
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/unique_lock.h:69
    #8  0x00007f45fb060b55 in 
dbaccess::OPropertyForward::setDefinition(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>
 const&)
        (this=0x55f20be59520, _xDest=uno::Reference to 
(dbaccess::OTableColumnDescriptor *) 0x55f20bd765b8) at 
/home/julien/lo/libreoffice/dbaccess/source/core/misc/PropertyForward.cxx:128
    #9  0x00007f45fb039edc in 
dbaccess::OContainerMediator::elementInserted(com::sun::star::container::ContainerEvent
 const&) (this=0x55f20bd9ac30, _rEvent=...)
        at 
/home/julien/lo/libreoffice/dbaccess/source/core/misc/ContainerMediator.cxx:105
    #10 0x00007f461ebaa03e in 
comphelper::OInterfaceContainerHelper3<com::sun::star::container::XContainerListener>::NotifySingleListener<com::sun::star::container::ContainerEvent>::operator()(com::sun::star::uno::Reference<com::sun::star::container::XContainerListener>
 const&) const (this=0x7ffd5b691c90, listener=uno::Reference to 
(dbaccess::OContainerMediator *) 0x55f20bd9ac58)
        at include/comphelper/interfacecontainer3.hxx:252
    #11 0x00007f461eba9e4c in 
comphelper::OInterfaceContainerHelper3<com::sun::star::container::XContainerListener>::forEach<comphelper::OInterfaceContainerHelper3<com::sun::star::container::XContainerListener>::NotifySingleListener<com::sun::star::container::ContainerEvent>
 
>(comphelper::OInterfaceContainerHelper3<com::sun::star::container::XContainerListener>::NotifySingleListener<com::sun::star::container::ContainerEvent>
 const&) (this=0x55f20ba55ee0, func=...) at 
include/comphelper/interfacecontainer3.hxx:274
    #12 0x00007f461eb8aab3 in 
comphelper::OInterfaceContainerHelper3<com::sun::star::container::XContainerListener>::notifyEach<com::sun::star::container::ContainerEvent>(void
 
(com::sun::star::container::XContainerListener::*)(com::sun::star::container::ContainerEvent
 const&), com::sun::star::container::ContainerEvent const&) 
(this=0x55f20ba55ee0, NotificationMethod=&virtual table offset 32, Event=...)
        at include/comphelper/interfacecontainer3.hxx:289
    #13 0x00007f461eb8527d in 
connectivity::sdbcx::OCollection::appendByDescriptor(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>
 const&)
        (this=0x55f20ba55e80, descriptor=uno::Reference to 
(dbaccess::OTableColumnDescriptor *) 0x55f20b909188) at 
/home/julien/lo/libreoffice/connectivity/source/sdbcx/VCollection.cxx:388
    #14 0x00007f45fb060571 in 
dbaccess::OPropertyForward::propertyChange(com::sun::star::beans::PropertyChangeEvent
 const&) (this=0x55f20be59520, evt=...)
        at 
/home/julien/lo/libreoffice/dbaccess/source/core/misc/PropertyForward.cxx:94
    #15 0x00007f462b59ac96 in cppu::OPropertySetHelper::fire(int*, 
com::sun::star::uno::Any const*, com::sun::star::uno::Any const*, int, unsigned 
char)
        (this=0x55f20b7e8098, pnHandles=0x7ffd5b69320c, 
pNewValues=0x7ffd5b6934a8, pOldValues=0x7ffd5b693198, nHandles=1, bVetoable=0 
'\000') at /home/julien/lo/libreoffice/cppuhelper/source/propshlp.cxx:680
    #16 0x00007f462b59bb77 in cppu::OPropertySetHelper::impl_fireAll(int*, 
com::sun::star::uno::Any const*, com::sun::star::uno::Any const*, int)
        (this=0x55f20b7e8098, i_handles=0x7ffd5b69320c, 
i_newValues=0x7ffd5b6934a8, i_oldValues=0x7ffd5b693198, i_count=1) at 
/home/julien/lo/libreoffice/cppuhelper/source/propshlp.cxx:568
    #17 0x00007f462b59a64e in 
cppu::OPropertySetHelper::setFastPropertyValue(int, com::sun::star::uno::Any 
const&) (this=0x55f20b7e8098, nHandle=22, rValue=uno::Any("long": 10000))
        at /home/julien/lo/libreoffice/cppuhelper/source/propshlp.cxx:543
    #18 0x00007f462b59884b in 
cppu::OPropertySetHelper::setPropertyValue(rtl::OUString const&, 
com::sun::star::uno::Any const&) (this=0x55f20b7e8098, 
rPropertyName="FormatKey", rValue=uno::Any("long": 10000))
        at /home/julien/lo/libreoffice/cppuhelper/source/propshlp.cxx:265
    #19 0x00007f45f996faf0 in 
dbaui::OFieldDescription::copyColumnSettingsTo(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>
 const&)
        (this=0x55f20bf4f960, _rxColumn=uno::Reference to 
(dbaccess::OTableColumnWrapper *) 0x55f20b7e80a8) at 
/home/julien/lo/libreoffice/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx:623
    #20 0x00007f45f99784c4 in dbaui::OTableController::alterColumns() 
(this=0x55f20b7931e0) at 
/home/julien/lo/libreoffice/dbaccess/source/ui/tabledesign/TableController.cxx:1070
    #21 0x00007f45f99731d5 in dbaui::OTableController::doSaveDoc(bool) 
(this=0x55f20b7931e0, _bSaveAs=false) at 
/home/julien/lo/libreoffice/dbaccess/source/ui/tabledesign/TableController.cxx:356
    
    Change-Id: I4363cdad7339eb2ad69f9839832b11f448dd989c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152258
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    Tested-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/dbaccess/source/core/inc/PropertyForward.hxx 
b/dbaccess/source/core/inc/PropertyForward.hxx
index ec51c672544a..daf31758d000 100644
--- a/dbaccess/source/core/inc/PropertyForward.hxx
+++ b/dbaccess/source/core/inc/PropertyForward.hxx
@@ -23,8 +23,8 @@
 #include <com/sun/star/beans/XPropertySetInfo.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <cppuhelper/implbase.hxx>
+#include <cppuhelper/basemutex.hxx>
 
-#include <mutex>
 #include <vector>
 
 namespace dbaccess
@@ -33,9 +33,9 @@ namespace dbaccess
     // OPropertyForward
     typedef ::cppu::WeakImplHelper<   css::beans::XPropertyChangeListener
                                   >   OPropertyForward_Base;
-    class OPropertyForward : public OPropertyForward_Base
+    class OPropertyForward  :public ::cppu::BaseMutex
+                            ,public OPropertyForward_Base
     {
-        std::mutex m_aMutex;
         css::uno::Reference< css::beans::XPropertySet >       m_xSource;
         css::uno::Reference< css::beans::XPropertySet >       m_xDest;
         css::uno::Reference< css::beans::XPropertySetInfo >   m_xDestInfo;
diff --git a/dbaccess/source/core/misc/PropertyForward.cxx 
b/dbaccess/source/core/misc/PropertyForward.cxx
index b02ce82cea53..07e1068f695f 100644
--- a/dbaccess/source/core/misc/PropertyForward.cxx
+++ b/dbaccess/source/core/misc/PropertyForward.cxx
@@ -69,7 +69,7 @@ namespace dbaccess
 
     void SAL_CALL OPropertyForward::propertyChange( const PropertyChangeEvent& 
evt )
     {
-        std::unique_lock aGuard( m_aMutex );
+        ::osl::MutexGuard aGuard( m_aMutex );
 
         if ( !m_xDestContainer.is() )
             throw DisposedException( OUString(), *this );
@@ -111,7 +111,7 @@ namespace dbaccess
 
     void SAL_CALL OPropertyForward::disposing( const css::lang::EventObject& 
/*_rSource*/ )
     {
-        std::unique_lock aGuard(m_aMutex);
+        ::osl::MutexGuard aGuard(m_aMutex);
 
         if ( !m_xSource.is() )
             throw DisposedException( OUString(), *this );
@@ -125,7 +125,7 @@ namespace dbaccess
 
     void OPropertyForward::setDefinition( const css::uno::Reference< 
css::beans::XPropertySet>& _xDest )
     {
-        std::unique_lock aGuard( m_aMutex );
+        ::osl::MutexGuard aGuard( m_aMutex );
         if ( m_bInInsert )
             return;
 

Reply via email to