diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-02-27 10:27:25 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-02-28 08:47:33 +0100 |
commit | ef6798919a514fc0043f4cd050ffb244696bbda3 (patch) | |
tree | 84f0bc8f33d93cfe0d3f2feaee3523da407f2f5f | |
parent | e6ecd5a32c457a1049b601b84b93899cb6ddaefa (diff) |
Avoid calling back into an SdrMarkView that is being destroyed
The recently added CppunitTest_sc_tiledrendering
CPPUNIT_TEST_NAME=testEditShapeText::TestBody had started to cause
> svx/source/svdraw/sdrpagewindow.cxx:471:56: runtime error: member call on address 0x51d0000c4480 which does not point to an object of type 'SdrMarkView'
> 0x51d0000c4480: note: object is of type 'SdrPaintView'
> 00 00 00 00 30 1f 13 bc ca 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00
> ^~~~~~~~~~~~~~~~~~~~~~~
> vptr for 'SdrPaintView'
> #0 in SdrPageWindow::InvalidatePageWindow(basegfx::B2DRange const&) at svx/source/svdraw/sdrpagewindow.cxx:471:56
> #1 in sdr::contact::ObjectContactOfPageView::InvalidatePartOfView(basegfx::B2DRange const&) const at svx/source/sdr/contact/objectcontactofpageview.cxx:357:29
> #2 in sdr::contact::ViewObjectContact::triggerLazyInvalidate() at svx/source/sdr/contact/viewobjectcontact.cxx:267:28
> #3 in sdr::contact::ObjectContactOfPageView::Invoke() at svx/source/sdr/contact/objectcontactofpageview.cxx:105:29
> #4 in sdr::contact::ObjectContactOfPageView::~ObjectContactOfPageView() at svx/source/sdr/contact/objectcontactofpageview.cxx:74:13
> #5 in sdr::contact::ObjectContactOfPageView::~ObjectContactOfPageView() at svx/source/sdr/contact/objectcontactofpageview.cxx:72:9
> #6 in SdrPageWindow::ResetObjectContact() at svx/source/svdraw/sdrpagewindow.cxx:520:9
> #7 in SdrPageWindow::~SdrPageWindow() at svx/source/svdraw/sdrpagewindow.cxx:130:5
> #8 in std::default_delete<SdrPageWindow>::operator()(SdrPageWindow*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2
> #9 in std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>::~unique_ptr() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:398:4
> #10 in void std::destroy_at<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:88:15
> #11 in void std::_Destroy<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:149:7
> #12 in void std::_Destroy_aux<false>::__destroy<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:163:6
> #13 in void std::_Destroy<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:195:7
> #14 in void std::_Destroy<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::allocator<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/alloc_traits.h:941:7
> #15 in std::__cxx1998::vector<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>, std::allocator<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>>::~vector() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_vector.h:732:2
> #16 in std::__debug::vector<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>, std::allocator<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>>::~vector() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/debug/vector:245:25
> #17 in SdrPageView::~SdrPageView() at svx/source/svdraw/svdpagv.cxx:122:1
> #18 in std::default_delete<SdrPageView>::operator()(SdrPageView*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2
> #19 in std::__uniq_ptr_impl<SdrPageView, std::default_delete<SdrPageView>>::reset(SdrPageView*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:205:4
> #20 in std::unique_ptr<SdrPageView, std::default_delete<SdrPageView>>::reset(SdrPageView*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:503:7
> #21 in SdrPaintView::ClearPageView() at svx/source/svdraw/svdpntv.cxx:356:20
> #22 in SdrPaintView::~SdrPaintView() at svx/source/svdraw/svdpntv.cxx:189:5
> #23 in SdrSnapView::~SdrSnapView() at svx/source/svdraw/svdsnpv.cxx:199:1
> #24 in SdrMarkView::~SdrMarkView() at svx/source/svdraw/svdmrkv.cxx:197:1
> #25 in SdrEditView::~SdrEditView() at svx/source/svdraw/svdedtv.cxx:126:1
> #26 in SdrPolyEditView::~SdrPolyEditView() at svx/source/svdraw/svdpoev.cxx:58:1
> #27 in SdrGlueEditView::~SdrGlueEditView() at svx/source/svdraw/svdglev.cxx:40:1
> #28 in SdrObjEditView::~SdrObjEditView() at svx/source/svdraw/svdedxv.cxx:101:1
> #29 in SdrExchangeView::~SdrExchangeView() at include/svx/svdxcgv.hxx:27:25
> #30 in SdrDragView::~SdrDragView() at svx/source/svdraw/svddrgv.cxx:69:1
> #31 in SdrCreateView::~SdrCreateView() at svx/source/svdraw/svdcrtv.cxx:199:1
> #32 in SdrView::~SdrView() at svx/source/svdraw/svdview.cxx:154:1
> #33 in E3dView::~E3dView() at svx/source/engine3d/view3d.cxx:1457:1
> #34 in FmFormView::~FmFormView() at svx/source/form/fmview.cxx:124:1
> #35 in FmFormView::~FmFormView() at svx/source/form/fmview.cxx:119:1
> #36 in std::default_delete<FmFormView>::operator()(FmFormView*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2
> #37 in std::unique_ptr<FmFormView, std::default_delete<FmFormView>>::~unique_ptr() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:398:4
> #38 in ScGridWindow::~ScGridWindow() at sc/source/ui/view/gridwin.cxx:450:1
> #39 in ScGridWindow::~ScGridWindow() at sc/source/ui/view/gridwin.cxx:448:1
> #40 in ScGridWindow::~ScGridWindow() at sc/source/ui/view/gridwin.cxx:448:1
> #41 in VclReferenceBase::release() const at include/vcl/vclreferencebase.hxx:43:13
> #42 in rtl::Reference<vcl::Window>::~Reference() at include/rtl/ref.hxx:131:22
> #43 in VclPtr<vcl::Window>::~VclPtr() at include/vcl/vclptr.hxx:112:5
> #44 in ImplSVWinData::~ImplSVWinData() at vcl/source/app/svdata.cxx:531:34
> #45 in DestroySVWinData(ImplSVWinData*) at vcl/source/app/svdata.cxx:388:5
> #46 in SfxViewFrame::~SfxViewFrame() at sfx2/source/view/viewfrm.cxx:2012:5
> #47 in SfxViewFrame::Close() at sfx2/source/view/viewfrm.cxx:1190:5
> #48 in SfxFrame::DoClose_Impl() at sfx2/source/view/frame.cxx:138:37
> #49 in SfxBaseController::dispose() at sfx2/source/view/sfxbasecontroller.cxx:928:27
> #50 in (anonymous namespace)::XFrameImpl::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) at framework/source/services/frame.cxx:1495:33
> #51 in (anonymous namespace)::XFrameImpl::close(unsigned char) at framework/source/services/frame.cxx:1706:12
> #52 in SfxFrame::DoClose() at sfx2/source/view/frame.cxx:104:29
> #53 in SfxViewFrame::Notify(SfxBroadcaster&, SfxHint const&) at sfx2/source/view/viewfrm.cxx:1778:28
> #54 in SfxBroadcaster::Broadcast(SfxHint const&) at svl/source/notify/SfxBroadcaster.cxx:40:24
> #55 in (anonymous namespace)::SfxModelListener_Impl::notifyClosing(com::sun::star::lang::EventObject const&) at sfx2/source/doc/objxtor.cxx:147:12
> #56 in SfxBaseModel::close(unsigned char) at sfx2/source/doc/sfxbasemodel.cxx:1516:40
> #57 in SfxBaseModel::dispose() at sfx2/source/doc/sfxbasemodel.cxx:750:13
> #58 in ScTiledRenderingTest::tearDown() at sc/qa/unit/tiledrendering/tiledrendering.cxx:140:22
The fix appears to be to just not call back into the in-destruction FmFormView -
... - SdrMarkView - ... - SdrPaintView - ... deep-inheritance object, by not
initiating any further triggerLazyInvalidate from within
~ObjectContactOfPageView.
Change-Id: If5e49e4ebdbbf18d38e89c6b28ff3577224080a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164024
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
-rw-r--r-- | svx/source/sdr/contact/objectcontactofpageview.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 148b7b2196b4..2143b9ecf8d7 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -70,8 +70,8 @@ namespace sdr::contact ObjectContactOfPageView::~ObjectContactOfPageView() { - // execute missing LazyInvalidates and stop timer - Invoke(); + // stop timer + Stop(); } // LazyInvalidate request. Take action. |