From 03156b7ccb5129202978c2e636c641a2208a61aa Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 4 Dec 2024 09:58:08 +0000 Subject: crash see on SdXImpressDocument::getPartInfo for missing page possibly after uno.HideSlide #0 0x00007e697b8c0b97 in SdPage::GetPageInfo (this=this@entry=0x0, jsonWriter=...) at sd/source/core/sdpage.cxx:1751 #1 0x00007e697bbda0ab in SdXImpressDocument::getPartInfo (this=, nPart=) at sd/source/ui/unoidl/unomodel.cxx:3692 #2 0x00007e698ae7e078 in doc_getPartInfo (pThis=0x121017c0, nPart=9) at desktop/source/lib/init.cxx:4176 #3 0x000000000059bcf4 in LOKitHelper::getPartData (part=9, loKitDocument=0x121017c0) at kit/KitHelper.hpp:47 #4 LOKitHelper::fetchPartsData (loKitDocument=0x121017c0, resultInfo=std::unordered_map with 6 elements = {...}, partsCount=84, mode=@0x7ffec727bd58: 1) at kit/KitHelper.hpp:91 #5 0x000000000059c6a3 in LOKitHelper::documentStatus (loKitDocument=0x121017c0) at kit/KitHelper.hpp:164 #6 0x000000000057fb7a in ChildSession::selectClientPart (this=0x556fe60, tokens=...) at kit/ChildSession.cpp:2964 #7 0x000000000058a88f in ChildSession::_handleInput (this=, buffer=, length=) at kit/ChildSession.cpp:495 #8 0x000000000061c63f in Session::handleMessage (this=0x556fe60, data=std::vector of length 29, capacity 29 = {...}) Change-Id: Ib4e532b31cdc6a69f9e54317699f426c12de35d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177781 Reviewed-by: Miklos Vajna Tested-by: Jenkins CollaboraOffice --- sd/source/ui/unoidl/unomodel.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sd') diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 07f9415a000a..d6d9c39027ad 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -3860,7 +3860,10 @@ OUString SdXImpressDocument::getPartInfo(int nPart) jsonWriter.put("innerSpacesX", innerDots.getWidth() ? gridCoarse.getWidth() / innerDots.getWidth() : 0); jsonWriter.put("innerSpacesY", innerDots.getHeight() ? gridCoarse.getHeight() / innerDots.getHeight() : 0); - pSdPage->GetPageInfo(jsonWriter); + if (pSdPage) + pSdPage->GetPageInfo(jsonWriter); + else + SAL_WARN("sd", "getPartInfo request for SdPage " << nPart << " that does not exist!"); return OStringToOUString(jsonWriter.finishAndGetAsOString(), RTL_TEXTENCODING_UTF8); } -- cgit