Handle empty rRange in OverlayManager::RangeToInvalidateRectangle

Desktop / LibreOffice - Stephan Bergmann [redhat.com] - 11 September 2020 20:05 UTC

Not sure why it started to happen just now, but my Linux UBSan build now failed CppunitTest_sd_tiledrendering with

> svx/source/sdr/overlay/overlaymanager.cxx:290:44: runtime error: 1.79769e+308 is outside the range of representable values of type 'int' > #0 in sdr::overlay::OverlayManager::RangeToInvalidateRectangle(basegfx::B2DRange const&) const at svx/source/sdr/overlay/overlaymanager.cxx:290:44 > #1 in sdr::overlay::OverlayManager::invalidateRange(basegfx::B2DRange const&) at svx/source/sdr/overlay/overlaymanager.cxx:311:55 > #2 in sdr::overlay::OverlayManager::impApplyRemoveActions(sdr::overlay::OverlayObject&) at svx/source/sdr/overlay/overlaymanager.cxx:186:13 > #3 in sdr::overlay::OverlayManager::~OverlayManager() at svx/source/sdr/overlay/overlaymanager.cxx:224:21 > #4 in sdr::overlay::OverlayManagerBuffered::~OverlayManagerBuffered() at svx/source/sdr/overlay/overlaymanagerbuffered.cxx:377:9 > #5 in sdr::overlay::OverlayManagerBuffered::~OverlayManagerBuffered() at svx/source/sdr/overlay/overlaymanagerbuffered.cxx:368:9 > #6 in salhelper::SimpleReferenceObject::release() at include/salhelper/simplereferenceobject.hxx:72:49 > #7 in rtl::Reference::clear() at include/rtl/ref.hxx:180:19 > #8 in SdrPaintWindow::~SdrPaintWindow() at svx/source/svdraw/sdrpaintwindow.cxx:251:22 [...] > #16 in SdrPaintView::DeletePaintWindow(SdrPaintWindow&) at svx/source/svdraw/svdpntv.cxx:83:24 > #17 in SdrPaintView::DeleteWindowFromPaintView(OutputDevice*) at svx/source/svdraw/svdpntv.cxx:417:9 > #18 in SdrObjEditView::DeleteWindowFromPaintView(OutputDevice*) at svx/source/svdraw/svdedxv.cxx:2316:22 > #19 in FmFormView::DeleteWindowFromPaintView(OutputDevice*) at svx/source/form/fmview.cxx:196:14 > #20 in sd::View::~View() at sd/source/ui/view/sdview.cxx:148:9 > #21 in sd::DrawView::~DrawView() at sd/source/ui/view/drawview.cxx:75:1 > #22 in sd::DrawView::~DrawView() at sd/source/ui/view/drawview.cxx:74:1 [...] > #34 in sd::framework::BasicViewFactory::releaseResource(com::sun::star::uno::Reference const&) at sd/source/ui/framework/factories/BasicViewFactory.cxx:229:1 > #35 in sd::framework::ConfigurationControllerResourceManager::DeactivateResource(com::sun::star::uno::Reference const&, com::sun::star::uno::Reference const&) at sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx:201:48 > #36 in sd::framework::ConfigurationControllerResourceManager::DeactivateResources(std::__debug::vector, std::allocator > > const&, com::sun::star::uno::Reference const&)::$_0::operator()(com::sun::star::uno::Reference const&) const at sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx:88:20 [...] > #38 in sd::framework::ConfigurationControllerResourceManager::DeactivateResources(std::__debug::vector, std::allocator > > const&, com::sun::star::uno::Reference const&) at sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx:84:5 > #39 in sd::framework::ConfigurationUpdater::UpdateCore(sd::framework::ConfigurationClassifier const&) at sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:249:28 > #40 in sd::framework::ConfigurationUpdater::UpdateConfiguration() at sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:160:21 > #41 in sd::framework::ConfigurationUpdater::RequestUpdate(com::sun::star::uno::Reference const&) at sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:107:13 > #42 in sd::framework::ChangeRequestQueueProcessor::ProcessOneEvent() at sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx:161:33 > #43 in sd::framework::ChangeRequestQueueProcessor::ProcessUntilEmpty() at sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx:173:9 > #44 in sd::framework::ConfigurationController::disposing() at sd/source/ui/framework/configuration/ConfigurationController.cxx:126:41 > #45 in cppu::WeakComponentImplHelperBase::dispose() at cppuhelper/source/implbase.cxx:104:13 > #46 in cppu::PartialWeakComponentImplHelper::dispose() at include/cppuhelper/compbase.hxx:90:36 > #47 in sd::DrawController::DisposeFrameworkControllers() at sd/source/ui/unoidl/DrawController.cxx:814:21 > #48 in sd::DrawController::dispose() at sd/source/ui/unoidl/DrawController.cxx:162:5 > #49 in (anonymous namespace)::XFrameImpl::setComponent(com::sun::star::uno::Reference const&, com::sun::star::uno::Reference const&) at framework/source/services/frame.cxx:1485:33 > #50 in (anonymous namespace)::XFrameImpl::close(unsigned char) at framework/source/services/frame.cxx:1692:12 > #51 in SfxFrame::DoClose() at sfx2/source/view/frame.cxx:109:29 > #52 in SfxViewFrame::Notify(SfxBroadcaster&, SfxHint const&) at sfx2/source/view/viewfrm.cxx:1534:28 > #53 in SfxBroadcaster::Broadcast(SfxHint const&) at svl/source/notify/SfxBroadcaster.cxx:49:24 > #54 in (anonymous namespace)::SfxModelListener_Impl::notifyClosing(com::sun::star::lang::EventObject const&) at sfx2/source/doc/objxtor.cxx:146:12 > #55 in SfxBaseModel::close(unsigned char) at sfx2/source/doc/sfxbasemodel.cxx:1439:76 > #56 in SfxBaseModel::dispose() at sfx2/source/doc/sfxbasemodel.cxx:716:13 > #57 in SdXImpressDocument::dispose() at sd/source/ui/unoidl/unomodel.cxx:2708:19 > #58 in LOKitSearchTest::tearDown() at sd/qa/unit/tiledrendering/LOKitSearchTest.cxx:113:22 [...]

where the given rRange is apparently empty

Change-Id: I7324f1660dc3b782a4e489884a319f4aeb690b44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102492

0a7752b39884 Handle empty rRange in OverlayManager::RangeToInvalidateRectangle
svx/source/sdr/overlay/overlaymanager.cxx | 3 +++
1 file changed, 3 insertions(+)

Upstream: cgit.freedesktop.org


  • Share