[Libreoffice-commits] core.git: sfx2/source
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 7 16:37:22 UTC 2021
sfx2/source/sidebar/SidebarController.cxx | 32 +++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
New commits:
commit 4c4af3435789960b0fd15afdad2a56a821e8e01b
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Wed Mar 24 15:49:51 2021 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Wed Apr 7 18:36:42 2021 +0200
lok: fix sidebar controller disposed objects
The property listener still holds a reference count
of the sidebar controller so it is disposed after
removing the listener when the windows objects had
already disposed.
kit-3428938-3428936 2021-01-25 15:39:15.502557 [ kitbroker_001 ] SIG Fatal signal received: SIGSEGV
Backtrace 3428938:
loolforkit(_ZN7SigUtil13dumpBacktraceEv+0x4e)[0x56273955b7ac]
loolforkit(+0x1d9723)[0x56273955b723]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14140)[0x7f689e8f3140]
instdir/program/libsfxlo.so(+0x4785f6)[0x7f689b5a45f6]
instdir/program/libsfxlo.so(_ZN4sfx27sidebar17SidebarController19UpdateDeckOpenStateEv+0x74)[0x7f689b7a553c]
instdir/program/libsfxlo.so(_ZN4sfx27sidebar17SidebarController15RequestOpenDeckEv+0xa0)[0x7f689b7a5316]
instdir/program/libsfxlo.so(_ZN4sfx27sidebar20SidebarDockingWindow8GetFocusEv+0x3c)[0x7f689b79aa6e]
instdir/program/libvcllo.so(_ZN3vcl6Window14CompatGetFocusEv+0x7f)[0x7f68966da653]
instdir/program/libvcllo.so(+0x63427c)[0x7f689661b27c]
instdir/program/libvcllo.so(_ZN3vcl6Window9GrabFocusEv+0x1d)[0x7f68966d693d]
instdir/program/libvcllo.so(_ZN3vcl6Window7disposeEv+0x1dd5)[0x7f68966c94e5]
instdir/program/libsfxlo.so(+0x6993a3)[0x7f689b7c53a3]
instdir/program/libvcllo.so(_ZN16VclReferenceBase11disposeOnceEv+0x40)[0x7f68968f7188]
instdir/program/libsfxlo.so(+0x6802e1)[0x7f689b7ac2e1]
instdir/program/libsfxlo.so(_ZN4sfx27sidebar17SidebarController9disposingEv+0x218)[0x7f689b79ff40]
instdir/program/libuno_cppuhelpergcc3.so.3(_ZN4cppu27WeakComponentImplHelperBase7disposeEv+0xef)[0x7f689d2d846b]
instdir/program/libsfxlo.so(+0x68036a)[0x7f689b7ac36a]
instdir/programlibsfxlo.so(_ZN4sfx27sidebar17SidebarController9disposingERKN3com3sun4star4lang11EventObjectE+0x43)[0x7f689b7a05e5]
instdir/program/libsfxlo.so(_ZN4sfx27sidebar5Theme9disposingEv+0x1ae)[0x7f689b804450]
instdir/program/libuno_cppuhelpergcc3.so.3(_ZN4cppu27WeakComponentImplHelperBase7disposeEv+0xef)[0x7f689d2d846b]
instdir/program/libsfxlo.so(+0x6f5eec)[0x7f689b821eec]
instdir/program/libuno_cppuhelpergcc3.so.3(_ZN4cppu27WeakComponentImplHelperBase7releaseEv+0x94)[0x7f689d2d81f0]
instdir/program/libsfxlo.so(+0x16c58e)[0x7f689b29858e]
instdir/program/libsfxlo.so(+0x17c6e7)[0x7f689b2a86e7]
instdir/program/libsfxlo.so(+0x17af6c)[0x7f689b2a6f6c]
instdir/program/libsfxlo.so(+0x16c21c)[0x7f689b29821c]
instdir/program/libsfxlo.so(+0x16b4d4)[0x7f689b2974d4]
instdir/program/libsfxlo.so(_ZN14SfxApplicationD1Ev+0x248)[0x7f689b293cf8]
instdir/program/libsfxlo.so(_ZN14SfxApplicationD0Ev+0x18)[0x7f689b293d38]
instdir/program/libsfxlo.so(+0x1863e0)[0x7f689b2b23e0]
instdir/program/libfwklo.so(_ZN9framework7Desktop8shutdownEv+0x206)[0x7f689c67b47c]
instdir/program/libsofficeapp.so(+0x2f14b)[0x7f689ddb814b]
instdir/program/libvcllo.so(_ZN11Application7ExecuteEv+0x191)[0x7f6896db9f45]
instdir/program/libsofficeapp.so(+0x325c5)[0x7f689ddbb5c5]
instdir/program/libvcllo.so(_Z10ImplSVMainv+0x1f4)[0x7f6896dd68a6]
Change-Id: I03eb5fa76b7712c8e12cefa2fbf07eb3e169eeb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113068
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index d57e22249c79..d1f1e1a35ca4 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -305,20 +305,14 @@ void SAL_CALL SidebarController::disposing()
aDeck.disposeAndClear();
}
- uno::Reference<css::frame::XController> xController = mxFrame->getController();
- if (!xController.is())
- xController = mxCurrentController;
-
- mxFrame->removeFrameActionListener(this);
- unregisterSidebarForFrame(this, xController);
+ maContextChangeUpdate.CancelRequest();
if (mxReadOnlyModeDispatch.is())
mxReadOnlyModeDispatch->removeStatusListener(this, Tools::GetURL(gsReadOnlyCommandName));
- if (mpSplitWindow != nullptr)
- {
- mpSplitWindow->RemoveEventListener(LINK(this, SidebarController, WindowEventHandler));
- mpSplitWindow = nullptr;
- }
+
+ Theme::GetPropertySet()->removePropertyChangeListener(
+ "",
+ static_cast<css::beans::XPropertyChangeListener*>(this));
if (mpParentWindow != nullptr)
{
@@ -326,11 +320,19 @@ void SAL_CALL SidebarController::disposing()
mpParentWindow = nullptr;
}
- Theme::GetPropertySet()->removePropertyChangeListener(
- "",
- static_cast<css::beans::XPropertyChangeListener*>(this));
+ if (mpSplitWindow != nullptr)
+ {
+ mpSplitWindow->RemoveEventListener(LINK(this, SidebarController, WindowEventHandler));
+ mpSplitWindow = nullptr;
+ }
- maContextChangeUpdate.CancelRequest();
+ mxFrame->removeFrameActionListener(this);
+
+ uno::Reference<css::frame::XController> xController = mxFrame->getController();
+ if (!xController.is())
+ xController = mxCurrentController;
+
+ unregisterSidebarForFrame(this, xController);
}
void SAL_CALL SidebarController::notifyContextChangeEvent (const css::ui::ContextChangeEventObject& rEvent)
More information about the Libreoffice-commits
mailing list