Bug 164056 - Assertion `GetPageFrame().GetPhyPageNum() == GetPgNumOfCollected(nIdx)' failed
Summary: Assertion `GetPageFrame().GetPhyPageNum() == GetPgNumOfCollected(nIdx)' failed
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2024-11-26 09:10 UTC by Caolán McNamara
Modified: 2025-08-15 01:06 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
bz bugdoc in question (824.55 KB, application/vnd.oasis.opendocument.text)
2025-08-14 15:41 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Caolán McNamara 2024-11-26 09:10:38 UTC
Description:
This is a frequent assert seen in crashtesting when reimporting content exported by LibreOffice

Steps to Reproduce:
1. wget https://bz.apache.org/ooo/attachment.cgi?id=61111 -O ~/Downloads/ooo100227-1.sxw
2. ./instdir/program/soffice --headless --convert-to docx ~/Downloads/ooo100227-1.sxw
3. ./instdir/program/soffice --headless --convert-to pdf ./ooo100227-1.docx

Actual Results:
core/sw/source/core/layout/objectformattertxtfrm.cxx:237: virtual bool SwObjectFormatterTextFrame::DoFormatObj(SwAnchoredObject &, const bool): Assertion `GetPageFrame().GetPhyPageNum() == GetPgNumOfCollected(nIdx)' failed.


Expected Results:
no assert


Reproducible: Always


User Profile Reset: No

Additional Info:
unsure if this is bisectable
Comment 1 Caolán McNamara 2024-11-26 09:12:19 UTC
The assert itself was introduced with

https://cgit.freedesktop.org/libreoffice/core/commit/?id=533a998e540b0f04068c876dde0e74adc3f79c93

tdf#138518 sw: layout: fix assert on ooo43913-1.doc
Comment 2 Buovjaga 2025-07-09 13:52:20 UTC
For me it says Error: no export filter
Comment 3 Mike Kaganski 2025-08-14 15:41:48 UTC
Created attachment 202327 [details]
bz bugdoc in question
Comment 4 Dave Gilbert 2025-08-14 15:52:01 UTC
Confirmed here with Mike's attachment.
Just trying to load the written docx crashes even without the convert/headless.
Comment 5 Dave Gilbert 2025-08-14 23:41:33 UTC
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
        tid = <optimized out>
        ret = 0
        pd = <optimized out>
        old_mask = {__val = {140736102318808}}
        ret = <optimized out>
#1  0x00007ffff7a82163 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#2  0x00007ffff7a28a7e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
        ret = <optimized out>
#3  0x00007ffff7a106d0 in __GI_abort () at abort.c:77
        act = {__sigaction_handler = {sa_handler = 0x83f3e20, sa_sigaction = 0x83f3e20}, sa_mask = {__val = {138362400, 138362400, 140737349905088, 140737488302608, 140737285588951, 2, 9223372036854775814, 0, 12026546417604343296, 0, 20022000, 140737488302808, 140737349907680, 140737488302704, 140737348280088, 140737488302992}}, sa_flags = 1477293568, sa_restorer = 0x7fffad62c1e0}
#4  0x00007ffff7a10639 in __assert_fail_base
    (fmt=<optimized out>, assertion=0x7fffad62c2d8 "GetPageFrame().GetPhyPageNum() == GetPgNumOfCollected(nIdx)", file=<optimized out>, line=<optimized out>, function=<optimized out>) at assert.c:118
        str = 0x83f3e20 "c\204\026\b"
        total = <optimized out>
#5  0x00007fffac622d44 in SwObjectFormatterTextFrame::DoFormatObj (this=0x83f1ca0, _rAnchoredObj=..., _bCheckForMovedFwd=true)
    at /discs/fast/core/sw/source/core/layout/objectformattertxtfrm.cxx:237
        nIdx = 0
        nToPageNum = 0
        bDummy = false
        bPageHasFlysAnchoredBelowThis = false
        bDoesAnchorHadPrev = true
        bRestart = false
        bSuccess = true
#6  0x00007fffac61f93e in SwObjectFormatter::FormatObj (_rAnchoredObj=..., _pAnchorFrame=0x7fee360, _pPageFrame=0x6839c30, pLayAction=0x7fffffff44f0)
    at /discs/fast/core/sw/source/core/layout/objectformatter.cxx:191
        bSuccess = true
        rAnchorFrame = @0x7fee360: {<SwFrameAreaDefinition> = {_vptr.SwFrameAreaDefinition = 0x7fffae4b6958 <vtable for SwTextFrame+16>, maFrameArea = SwRect = {point = Point = {x = 6632, y = 12042}, size = Size = {width = 2551, height = 253}}, maFramePrintArea = SwRect = {point = Point = {x = 0, y = 57}, size = Size = {width = 2551, height = 196}}, mnFrameId = 239, mbFrameAreaPositionValid = true, mbFrameAreaSizeValid = true, mbFramePrintAreaValid = true, static --Type <RET> for more, q to quit, c to continue without paging--
snLastFrameId = 310}, <sw::ClientBase<SwModify>> = {<sw::WriterListener> = {_vptr.WriterListener = 0x7fffae4b6ab8 <vtable for SwTextFrame+368>, m_pLeft = 0x0, m_pRight = 0x82d3470}, m_pRegisteredIn = 0x6d979a0}, <SfxBroadcaster> = {_vptr.SfxBroadcaster = 0x7fffae4b6b10 <vtable for SwTextFrame+456>, m_RemovedPositions = std::vector of length 0, capacity 0, m_Listeners = std::vector of length 0, capacity 0}, static spCache = 0x1ab1500, mpRoot = 0x65a06e0, mpUpper = 0x6852910, mpNext = 0x0, mpPrev = 0x7fee200, m_pDrawObjs = std::unique_ptr<class SwSortedObjs> = {get() = 0x78cb940}, mnFrameType = SwFrameType::Txt, mbInDtor = false, mbInvalidR2L = false, mbDerivedR2L = false, mbRightToLeft = false, mbInvalidVert = false, mbDerivedVert = true, mbVertical = false, mbVertLR = false, mbVertLRBT = false, mbValidLineNum = false, mbFixSize = false, mbCompletePaint = true, mbRetouche = true, mbInfInvalid = false, mbInfBody = true, mbInfTab = false, mbInfFly = false, mbInfFootnote = false, mbInfSct = true, mbColLocked = false, m_isInDestroy = false, mnForbidDelete = 0}
        rPageFrame = @0x6839c30: {<SwFootnoteBossFrame> = {<SwLayoutFrame> = {<SwFrame> = {<SwFrameAreaDefinition> = {_vptr.SwFrameAreaDefinition = 0x7fffae4b2a50 <vtable for SwPageFrame+16>, maFrameArea = SwRect = {point = Point = {x = 284, y = 284}, size = Size = {width = 12472, height = 17405}}, maFramePrintArea = SwRect = {point = Point = {x = 794, y = 510}, size = Size = {width = 10884, height = 15988}}, mnFrameId = 197, mbFrameAreaPositionValid = true, mbFrameAreaSizeValid = true, mbFramePrintAreaValid = true, static snLastFrameId = 310}, <sw::ClientBase<SwModify>> = {<sw::WriterListener> = {_vptr.WriterListener = 0x7fffae4b2ba0 <vtable for SwPageFrame+352>, m_pLeft = 0x0, m_pRight = 0x0}, m_pRegisteredIn = 0x5e6e810}, <SfxBroadcaster> = {_vptr.SfxBroadcaster = 0x7fffae4b2bf8 <vtable for SwPageFrame+440>, m_RemovedPositions = std::vector of length 0, capacity 0, m_Listeners = std::vector of length 0, capacity 0}, static spCache = 0x1ab1500, mpRoot = 0x65a06e0, mpUpper = 0x65a06e0, mpNext = 0x5f88670, mpPrev = 0x0, m_pDrawObjs = std::unique_ptr<class SwSortedObjs> = {get() = 0x0}, mnFrameType = SwFrameType::Page, mbInDtor = false, mbInvalidR2L = false, mbDerivedR2L = false, mbRightToLeft = false, mbInvalidVert = false, mbDerivedVert = false, mbVertical = false, mbVertLR = false, mbVertLRBT = false, mbValidLineNum = false, mbFixSize = true, mbCompletePaint = false, mbRetouche = false, mbInfInvalid = false, mbInfBody = false, mbInfTab = false, mbInfFly = false, mbInfFootnote = false, mbInfSct = false, mbColLocked = false, m_isInDestroy = false, mnForbidDelete = 0}, m_pLower = 0x6847df0, m_VertPosOrientFramesFor = std::vector of length 0, capacity 0}, m_nMaxFootnoteHeight = 9223372036854775807}, m_pSortedObjs = std::unique_ptr<class SwSortedObjs> = {get() = 0x73d7a80}, m_pDesc = 0x5e6e4d0, m_nPhyPageNum = 1, m_bInvalidContent = true, m_bInvalidLayout = true, m_bInvalidFlyContent = true, m_bInvalidFlyLayout = true, m_bInvalidFlyInCnt = true, m_bFootnotePage = false, m_bEmptyPage = false, m_bEndNotePage = false, m_bInvalidSpelling = true, m_bInvalidSmartTags = true, m_bInvalidAutoCmplWrds = true, m_bInvalidWordCount = true, m_bHasGrid = false, static snShadowPxWidth = 9 '\t'}
        pObjFormatter = std::unique_ptr<SwObjectFormatter> = {get() = 0x83f1ca0}
#7  0x00007fffac5bd518 in CalcContent (pLay=0x65a5070, bNoColl=true) at /discs/fast/core/sw/source/core/layout/fly.cxx:1854
        aRect = SwRect = {point = Point = {x = 6634, y = 22726}, size = Size = {width = 5330, height = 394}}
        pAnchorFrame = 0x7fee360
        pAnchorPageFrame = 0x6839c30
        pPageFrame = 0x6839c30
        pAnchoredObj = 0x6da1480
        bAgain = false
        bRestartLayoutProcess = false
        nCnt = 10
        i = 4
--Type <RET> for more, q to quit, c to continue without paging--
        wasFrameLowerOfLay = true
        pTmpPrev = 0x7fee200
        pTmpPrevFlowFrame = 0x7fee2e0
        bPrevInvalid = false
        pTmpFlowFrame = 0x7fee440
        pAgainObj1 = 0x0
        nLoopControlMax = 20
        pAgainObj2 = 0x0
        nLoopControlRuns = 1
        nLoopControlRunsInMultiCol = 19
        pLoopControlCond = 0x68530b0
        pLast = 0x7fee360
        rShell = @0x6838e10: {<sw::Ring<SwViewShell>> = {_vptr.Ring = 0x7fffae53b9c8 <vtable for SwWrtShell+16>, m_pNext = 0x6838e10, m_pPrev = 0x6838e10}, m_xReplaceBmp = std::unique_ptr<class BitmapEx> = {get() = 0x0}, m_xErrorBmp = std::unique_ptr<class BitmapEx> = {get() = 0x0}, static sbLstAct = true, maPrtOffset = Point = {x = 0, y = 0}, maBrowseBorder = Size = {width = 8, height = 12}, maInvalidRect = SwRect = {point = Point = {x = 0, y = 0}, size = Size = {width = 0, height = 0}}, mpSfxViewShell = 0x6b6cfe0, mpImp = std::unique_ptr<class SwViewShellImp> = {get() = 0x6847b90}, mpWin = {m_rInnerRef = rtl::Reference to 0x72875e0}, mpOut = {m_rInnerRef = rtl::Reference to 0x7c4fd10}, mpOpt = std::unique_ptr<class SwViewOption> = {get() = 0x684d000}, mpAccOptions = std::unique_ptr<class SwAccessibilityOptions> = {get() = 0x16c58e0}, mbDocSizeChgd = true, mbPaintWorks = false, mbPaintInProgress = false, mbViewLocked = true, mbInEndAction = true, mbPreview = false, mbEnableSmooth = true, mbShowHeaderSeparator = false, mbShowFooterSeparator = false, mbHeaderFooterEdit = false, mbInConstructor = false, mpTargetPaintWindow = 0x0, mpBufferedOut = {m_rInnerRef = empty rtl::Reference}, mpLayout = std::shared_ptr<class SwRootFrame> (use count 1, weak count 0) = {get() = 0x65a06e0}, static spShellRes = 0x18e7c70, maVisArea = SwRect = {point = Point = {x = 0, y = 0}, size = Size = {width = 28576, height = 31066}}, maLOKVisibleArea = {<RectangleTemplate<tools::Rectangle, Point, Size>> = {<RectangleTemplateBase> = {static RECT_EMPTY = -32767, mnLeft = 0, mnTop = 0, mnRight = -32767, mnBottom = -32767}, <No data fields>}, <No data fields>}, mxDoc = rtl::Reference to 0x43bc800, mnStartAction = 1, mnLockPaint = 1, maLockPaintReasons = std::vector of length 1, capacity 1 = {LockPaintReason::OuterResize}, mbSelectAll = false, mbOutputToWindow = false, mPrePostPaintRegions = std::stack wrapping: std::deque with 0 elements, mpPrePostOutDev = {m_rInnerRef = empty rtl::Reference}, maPrePostMapMode = {mpImplMapMode = {m_pimpl = 0x142d030}}}
        pRenderContext = 0x7c4fd10
        pSect = 0x65a5070
        bCollect = false
        pFrame = 0x7fee360
#8  0x00007fffac6bcda4 in SwLayoutFrame::FormatWidthCols (this=0x65a5070, rAttrs=..., nBorder=283, nMinHeight=23)
    at /discs/fast/core/sw/source/core/layout/wsfrm.cxx:4226
        rCol = @0x7240a10: {<SfxPoolItem> = {_vptr.SfxPoolItem = 0x7fffae4aed48 <vtable for SwFormatCol+16>, m_nRefCount = 1, m_nWhich = 116, m_bStaticDefau--Type <RET> for more, q to quit, c to continue without paging--
lt = false, m_bDynamicDefault = false, m_bIsSetItem = false, m_bShareable = true, m_bNameOrIndex = false}, m_eLineStyle = SvxBorderLineStyle::NONE, m_nLineWidth = 0, m_aLineColor = rgb(0, 0, 0), m_nLineHeight = 100, m_eAdj = COLADJ_NONE, m_aColumns = std::vector of length 4, capacity 4 = {{m_nWish = 16383, m_nLeft = 0, m_nRight = 113}, {m_nWish = 16383, m_nLeft = 113, m_nRight = 113}, {m_nWish = 16383, m_nLeft = 113, m_nRight = 113}, {m_nWish = 16386, m_nLeft = 113, m_nRight = 0}}, m_nWidth = 65535, m_aWidthAdjustValue = 0, m_bOrtho = true}
        nNumCols = 4
        bEnd = true
        bBackLock = false
        pSh = 0x6838e10
        pImp = 0x6847b90
        pRenderContext = 0x7c4fd10
#9  0x00007fffac675471 in SwSectionFrame::Format (this=0x65a5070, pRenderContext=0x7c4fd10, pAttr=0x800f360)
    at /discs/fast/core/sw/source/core/layout/sectfrm.cxx:1561
        nRemaining = 283
        pFrame = 0x684ef80
        nDiff = 134280112
        aRectFnSet = {m_bVert = false, m_bVertL2R = false, m_bVertL2RB2T = false, m_fnRect = 0x7fffae4b1ce0 <aHorizontal>}
        nOldHeight = 0
        bOldLock = false
        bMaximize = false
        aExtraFormatToPosObjs = {mpSectFrame = 0x65a5070, mbExtraFormatPerformed = false}
        bHasColumns = true
        nDiff = 134280032
#10 0x00007fffac59aec2 in SwLayoutFrame::MakeAll (this=0x65a5070) at /discs/fast/core/sw/source/core/layout/calcmove.cxx:1070
        aNotify = {<SwFrameNotify> = {mpFrame = 0x65a5070, maFrame = SwRect = {point = Point = {x = 1078, y = 1135}, size = Size = {width = 10884, height = 0}}, maPrt = SwRect = {point = Point = {x = 0, y = 0}, size = Size = {width = 10884, height = 0}}, mnFlyAnchorOfst = 0, mnFlyAnchorOfstNoWrap = 0, mbHadFollow = false, mbInvaKeep = false, mbValidSize = false}, m_bLowersComplete = false}
        bVert = false
        fnRect = {m_bVert = false, m_bVertL2R = false, m_bVertL2RB2T = false, m_fnRect = 0x7fffae4b1ce0 <aHorizontal>}
        oAccess = std::optional = {[contained value] = {<SwCacheAccess> = {_vptr.SwCacheAccess = 0x7fffae391690 <vtable for SwBorderAttrAccess+16>, m_rCache = @0x1ab1500, m_pObj = 0x800f360, m_pOwner = 0x70c14e8}, m_pConstructor = 0x65a5070}}
        pAttrs = 0x800f360
#11 0x00007fffac673017 in SwSectionFrame::MakeAll (this=0x65a5070, pRenderContext=0x7c4fd10) at /discs/fast/core/sw/source/core/layout/sectfrm.cxx:931
        pSh = 0x6838e10
--Type <RET> for more, q to quit, c to continue without paging--
        bCanContainSplitSection = false
#12 0x00007fffac597b52 in SwFrame::PrepareMake (this=0x65a5070, pRenderContext=0x7c4fd10) at /discs/fast/core/sw/source/core/layout/calcmove.cxx:396
        aHack = {static s_nCnt = 1 '\001', static s_bLocked = false}
#13 0x00007fffac6a6f2a in SwFrame::Calc (this=0x65a5070, pRenderContext=0x7c4fd10) at /discs/fast/core/sw/source/core/layout/trvlfrm.cxx:1858
#14 0x00007fffac5fe79d in SwLayAction::FormatLayout (this=0x7fffffff44f0, pRenderContext=0x7c4fd10, pLay=0x65a5070, bAddRect=true)
    at /discs/fast/core/sw/source/core/layout/layact.cxx:1297
        aDeleteGuard = {m_pForbidFrame = 0x65a5070}
        aOldFrame = SwRect = {point = Point = {x = 1078, y = 1135}, size = Size = {width = 10884, height = 0}}
        aOldRect = SwRect = {point = Point = {x = 1078, y = 1135}, size = Size = {width = 10884, height = 0}}
        bNoPaint = 59
        bChanged = false
        bAlreadyPainted = false
        aFrameAtCompletePaint = SwRect = {point = Point = {x = 0, y = 0}, size = Size = {width = 0, height = 0}}
        pLow = 0x7fffffff3cb0
        bTabChanged = 255
        aBoundRect = SwRect = {point = Point = {x = 106582128, y = 140737488305488}, size = Size = {width = 140737488305520, height = 140736085339651}}
#15 0x00007fffac5ff548 in SwLayAction::FormatLayout (this=0x7fffffff44f0, pRenderContext=0x7c4fd10, pLay=0x5feeef0, bAddRect=true)
    at /discs/fast/core/sw/source/core/layout/layact.cxx:1493
        pNext = 0x0
        bChanged = false
        bAlreadyPainted = false
        aFrameAtCompletePaint = SwRect = {point = Point = {x = 0, y = 0}, size = Size = {width = 0, height = 0}}
        pLow = 0x65a5070
        bTabChanged = false
        aBoundRect = SwRect = {point = Point = {x = 100593392, y = 140737488306000}, size = Size = {width = 140737488306032, height = 140736085339651}}
#16 0x00007fffac5ff548 in SwLayAction::FormatLayout (this=0x7fffffff44f0, pRenderContext=0x7c4fd10, pLay=0x6839c30, bAddRect=true)
    at /discs/fast/core/sw/source/core/layout/layact.cxx:1493
        pNext = 0x0
        bChanged = false
        bAlreadyPainted = false
        aFrameAtCompletePaint = SwRect = {point = Point = {x = 0, y = 0}, size = Size = {width = 0, height = 0}}
        pLow = 0x5feeef0
        bTabChanged = false
--Type <RET> for more, q to quit, c to continue without paging--
        aBoundRect = SwRect = {point = Point = {x = 109288496, y = 109288760}, size = Size = {width = 140737488306512, height = 140737488307440}}
#17 0x00007fffac5fbcce in SwLayAction::InternalAction (this=0x7fffffff44f0, pRenderContext=0x7c4fd10)
    at /discs/fast/core/sw/source/core/layout/layact.cxx:611
        nLoopControlRuns_1 = 1
        nLoopControlMax = 20
        sal_detail_stream = Python Exception <class 'gdb.error'>: Attempt to extract a component of a value that is not a structure pointer.
Python Exception <class 'gdb.error'>: value has been optimized out
{<std::basic_ostream<char, std::char_traits<char> >> = {<std::basic_ios<char, std::char_traits<char> >> = <invalid address>, _vptr.basic_ostream = <optimized out>}, _M_stringbuf = }
        sal_detail_stream = Python Exception <class 'gdb.error'>: Attempt to extract a component of a value that is not a struct or union
Python Exception <class 'gdb.error'>: value has been optimized out
{<std::basic_ostream<char, std::char_traits<char> >> = {<std::basic_ios<char, std::char_traits<char> >> = <invalid address>, _vptr.basic_ostream = <optimized out>}, _M_stringbuf = }
        bTakeShortcut = false
        sal_detail_stream = Python Exception <class 'gdb.error'>: Attempt to extract a component of a value that is not a struct or union
Python Exception <class 'gdb.error'>: value has been optimized out
{<std::basic_ostream<char, std::char_traits<char> >> = {<std::basic_ios<char, std::char_traits<char> >> = <invalid address>, _vptr.basic_ostream = <optimized out>}, _M_stringbuf = }
        sal_detail_stream = Python Exception <class 'gdb.error'>: Attempt to extract a component of a value that is not a struct or union
Python Exception <class 'gdb.error'>: value has been optimized out
{<std::basic_ostream<char, std::char_traits<char> >> = {<std::basic_ios<char, std::char_traits<char> >> = <invalid address>, _vptr.basic_ostream = <optimized out>}, _M_stringbuf = }
        pPage = 0x6839c30
        nFirstPageNum = 1
        rLayoutAccess = @0x1534eb0: {_vptr.IDocumentLayoutAccess = 0x7fffae359bf0 <vtable for sw::DocumentLayoutManager+16>}
        bNoLoop = true
        nPercentPageNum = 0
        lcl_isLayoutLooping = {__this = 0x7fffffff44f0, __bNoLoop = @0x7fffffff4192, __rLayoutAccess = @0x1534eb0}
        nOuterLoopControlRuns = 1
        nOuterLoopControlMax = 10000
#18 0x00007fffac5fafc6 in SwLayAction::Action (this=0x7fffffff44f0, pRenderContext=0x7c4fd10) at /discs/fast/core/sw/source/core/layout/layact.cxx:398
#19 0x00007fffacc02688 in SwViewShell::ImplEndAction (this=0x6838e10, bIdleEnd=false) at /discs/fast/core/sw/source/core/view/viewsh.cxx:348
        aAction = {m_pRoot = 0x65a06e0, m_pImp = 0x6847b90, m_pOptTab = 0x0, m_pWait = std::unique_ptr<class SwWait> = {get() = 0x0}, m_aFrameStack = std::vector of length 2, capacity 2 = {0x5feeef0, 0x65a5070}, m_aFrameDeleteGuards = std::vector of length 2, capacity 2 = {std::unique_ptr<class SwFrameDeleteGuard> = {get() = 0x7ffba80}, std::unique_ptr<class SwFrameDeleteGuard> = {get() = 0x7ffba60}}, m_nPreInvaPage = 65535, m_nStartTicks = 4154723, m_nInputType = VclInputFlags::KEYBOARD, m_nEndPage = 65535, m_nCheckPageNum = 1, m_bPaint = false, m_bComplete = false, m_bCalcLayout = false, m_bAgain = false, m_bNextCycle = false, m_bInterrupt = false, m_bIdle = false, m_bReschedule = false, m_bCheckPages = true, m_bUpdateExpFields = false, m_bBrowseActionStop = false, m_bWaitAllowed = true, m_bPaintExtraData = false, m_bActionInProgress = true, mbFormatContentOnInterrupt = false}
        bIsShellForCheckViewLayout = true
        aCurr = {pPrev = 0x6838e10, pRoot = 0x65a06e0}
        bExtraData = false
#20 0x00007fffacc02266 in SwViewShell::EndAction (this=0x6838e10, bIdleEnd=false) at /discs/fast/core/sw/source/core/view/viewsh.cxx:295
#21 0x00007fffac0768a9 in SwCursorShell::EndAction (this=0x6838e10, bIdleEnd=false) at /discs/fast/core/sw/source/core/crsr/crsrsh.cxx:266
        g = {<comphelper::ScopeGuard<comphelper::ValueRestorationGuard_Impl<bool> >> = {m_func = {rVal = @0x6838f38, originalValue = false}, m_bDismissed = false}, <No data fields>}
        bVis = true
        bSavSVCursorVis = true
        eFlags = 0
#22 0x00007fffad1940f5 in SwView::OuterResizePixel (this=0x6b6cfe0, rOfst=Point = {...}, rSize=Size = {...})
    at /discs/fast/core/sw/source/uibase/uiview/viewport.cxx:1126
        bScroll1 = true
        bScroll2 = true
        aBorder = {nTop = 26, nRight = 12, nBottom = 12, nLeft = 0}
        aEditSz = Size = {width = 1906, height = 2072}
        bShowH = true
        bShowV = true
        bAuto = true
        bHAuto = true
        pVOpt = 0x684d000
        pDocSh = 0x1b20040
        bIsPreview = false
        aCurr = {pPrev = 0x6838e10, pRoot = 0x65a06e0}
        bRepeat = false
        nCnt = 1
        bUnLockView = true
#23 0x00007ffff4b28cad in SfxViewFrame::DoAdjustPosSizePixel
    (this=0x5e6c150, pSh=0x6b6cfe0, rPos=Point = {...}, rSize=Size = {...}, inplaceEditModeChange=false)
    at /discs/fast/core/sfx2/source/view/viewfrm.cxx:2217
#24 0x00007ffff4b2c722 in SfxViewFrame::Resize (this=0x5e6c150, bForce=false) at /discs/fast/core/sfx2/source/view/viewfrm.cxx:3014
        aSize = Size = {width = 1918, height = 2110}
        pShell = 0x6b6cfe0
#25 0x00007ffff4b39297 in SfxFrameViewWindow_Impl::Resize (this=0x5d866d0) at /discs/fast/core/sfx2/source/view/viewfrm2.cxx:70
#26 0x00007fffef3304a4 in vcl::Window::ImplCallResize (this=0x5d866d0) at /discs/fast/core/vcl/source/window/event.cxx:528
#27 0x00007fffef4251a3 in vcl::Window::Show (this=0x5d866d0, bVisible=true, nFlags=ShowFlags::NONE) at /discs/fast/core/vcl/source/window/window.cxx:2294
--Type <RET> for more, q to quit, c to continue without paging--
        pTestParent = 0x5e6c1c0
        xWindow = {m_rInnerRef = rtl::Reference to 0x5d866d0}
        bRealVisibilityChanged = false
#28 0x00007ffff4b0cb17 in SfxBaseController::ConnectSfxFrame_Impl (this=0x7e762e0, i_eConnect=SfxBaseController::E_CONNECT)
    at /discs/fast/core/sfx2/source/view/sfxbasecontroller.cxx:1183
        pEditWin = 0x72875e0
        pFrameWin = 0x5d866d0
        pViewFrame = 0x5e6c150
        bConnect = true
        nViewNo = 65535
#29 0x00007ffff4b08fd6 in SfxBaseController::attachFrame (this=0x7e762e0, xFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x1751ee0)
    at /discs/fast/core/sfx2/source/view/sfxbasecontroller.cxx:531
        aHint = {<SfxEventHint> = {<SfxHint> = {_vptr.SfxHint = 0x5cb4790, mnId = 132604640}, pObjShell = {<com::sun::star::uno::WeakReferenceHelper> = {m_pImpl = 0x7fffffff4ad0}, <No data fields>}, aEventName = "䣟䣙䣓䣍䣇䣁䢻䢵䢯䢩䢣䢝\220\000铫腈飯\000䢋 \000苫腈꣯\000カ\xffff腈냯\000ェ\xffff腈룯\000~\xffff腈샯\000r\xffff腈죯\000f\xffff腈탯\000Z\xffff腈\xd8ef\000N\xffff腈\000B\xffff䡕襈譈읈\000\000䠀䖋䣸䃇\b\000䠀䖋䣸䃇\020\000退썝䡕荈僬襈졽襈쁵襈롕荈쁽琀䡟䖋䣈䖉䣐䖋䣀䖉䣘䖋䢸䖉䣠䖋䣐䖉䣨䖋䣘䖉䣰䖋䣠䖉룸\000\000삄\xe74譈襈겒ﻞ\x17eb譈譈譈襈䣎잉ר\025退즐郃䡕襈譈썝䡕荈წ襈譈襈꽮ﻞ"..., nEventId = SfxEventHintId::NONE}, xViewController = uno::Reference to (class SwXTextView *) 0x7e76308}
        xTemp = empty uno::Reference
        aGuard = {<osl::Guard<comphelper::SolarMutex>> = {pT = 0x45ef00}, <No data fields>}
        xCloseable = uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x1751f10
#30 0x00007ffff4ae4c31 in utl::ConnectFrameControllerModel
    (xFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x1751ee0, xController=uno::Reference to (SwXTextView *) 0x7e76308, xModel=uno::Reference to (SwXTextDocument *) 0x1a405e0) at /discs/fast/core/include/unotools/fcm.hxx:57
        xModifiable = uno::Reference to (SwXTextDocument *) 0x1a405e8
        bOldModifiable = true
#31 0x00007ffff4ae2c15 in (anonymous namespace)::SfxFrameLoader_Impl::impl_createDocumentView
    (i_rModel=uno::Reference to (SwXTextDocument *) 0x1a405e0, i_rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x1751ee0, i_rViewFactoryArgs=..., i_rViewName="Default") at /discs/fast/core/sfx2/source/view/frmload.cxx:593
        xController = uno::Reference to (SwXTextView *) 0x7e76308
#32 0x00007ffff4ae3f66 in (anonymous namespace)::SfxFrameLoader_Impl::load
    (this=0x13f0e00, rArgs=uno::Sequence of length 12 = {...}, _rTargetFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x1751ee0)
--Type <RET> for more, q to quit, c to continue without paging--
    at /discs/fast/core/sfx2/source/view/frmload.cxx:813
        aGuard = {<osl::Guard<comphelper::SolarMutex>> = {pT = 0x45ef00}, <No data fields>}
        xDoc = rtl::Reference to 0x1b20040
        sViewName = "Default"
        aViewCreationArgs = Python Exception <class 'gdb.error'>: No type named std::__detail::_Hash_node<struct std::pair<rtl::OUString const, com::sun::star::uno::Any>, true>.
{maValues = std::unordered_map with 0 elements}
        nViewId = {m_value = 2}
        nViewNo = 0
        xController = uno::Reference to (SwXTextView *) 0x7e76308
        xInit = uno::Reference to (cppuhelper::ServiceManager *) 0x462ea8
        aDescriptor = Python Exception <class 'gdb.error'>: No type named std::__detail::_Hash_node<struct std::pair<rtl::OUString const, com::sun::star::uno::Any>, true>.
{maValues = std::unordered_map with 15 elements}
        xModel = uno::Reference to (SwXTextDocument *) 0x1a405e0
        bExternalModel = false
        sURL = "file:///discs/fast/core/MMT0118F10_END.docx"
        bIsFactoryURL = false
        pEmptyURLFilter = std::shared_ptr<const SfxFilter> (empty) = {get() = 0x0}
        bInitNewModel = false
        bIsDefault = false
        bLoadSuccess = false
        sal_detail_stream = Python Exception <class 'gdb.error'>: Attempt to extract a component of a value that is not a struct or union
Python Exception <class 'gdb.error'>: value has been optimized out
{<std::basic_ostream<char, std::char_traits<char> >> = {<std::basic_ios<char, std::char_traits<char> >> = <invalid address>, _vptr.basic_ostream = <optimized out>}, _M_stringbuf = }
        sal_detail_stream = Python Exception <class 'gdb.error'>: Attempt to extract a component of a value that is not a struct or union
Python Exception <class 'gdb.error'>: value has been optimized out
{<std::basic_ostream<char, std::char_traits<char> >> = {<std::basic_ios<char, std::char_traits<char> >> = <invalid address>, _vptr.basic_ostream = <optimized out>}, _M_stringbuf = }
#33 0x00007ffff588a6f5 in framework::LoadEnv::impl_loadContent (this=0x16a2738) at /discs/fast/core/framework/source/loadenv/loadenv.cxx:1180
        xTargetFrameProps = uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x1751f30
        bResult = false
        aWriteLock = {pT = 0x16a2738}
        sTarget = "_default"
        xTargetFrame = uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x1751ee0
        xTargetLock = uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x1751f08
        bHidden = false
        bMinimized = false
        bPreview = false
        bStartPres = false
--Type <RET> for more, q to quit, c to continue without paging--
        lDescriptor = uno::Sequence of length 12 = {{Name = "StatusIndicator", Handle = 0, Value = uno::Any("com.sun.star.task.XStatusIndicator": {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x152d5e8}, <No data fields>}), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "AuthenticationHandler", Handle = 0, Value = uno::Any("com.sun.star.task.XInteractionHandler": {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x5bd0f48}, <No data fields>}), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "FilterName", Handle = 0, Value = uno::Any("string": "Office Open XML Text"), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "Stream", Handle = 0, Value = uno::Any("com.sun.star.io.XStream": {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x5d308d8}, <No data fields>}), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "MacroExecutionMode", Handle = 0, Value = uno::Any("short": 3), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "InputStream", Handle = 0, Value = uno::Any("com.sun.star.io.XInputStream": {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x5d308e8}, <No data fields>}), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "InteractionHandler", Handle = 0, Value = uno::Any("com.sun.star.task.XInteractionHandler2": {<com::sun::star::task::XInteractionHandler> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x5af72d8}, <No data fields>}, <No data fields>}), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "UpdateDocMode", Handle = 0, Value = uno::Any("short": 2), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "TypeName", Handle = 0, Value = uno::Any("string": "writer_OOXML"), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "URL", Handle = 0, Value = uno::Any("string": "file:///discs/fast/core/MMT0118F10_END.docx"), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "Referer", Handle = 0, Value = uno::Any("string": "private:OpenEvent"), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "UCBContent", Handle = 0, Value = uno::Any("com.sun.star.ucb.XContent": {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x5d2c118}, <No data fields>}), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}}
        sURL = "file:///discs/fast/core/MMT0118F10_END.docx"
        xLoader = uno::Reference to ((anonymous namespace)::SfxFrameLoader_Impl *) 0x13f0e00
        xAsyncLoader = empty uno::Reference
        xSyncLoader = uno::Reference to ((anonymous namespace)::SfxFrameLoader_Impl *) 0x13f0e28
#34 0x00007ffff5886262 in framework::LoadEnv::start (this=0x16a2738) at /discs/fast/core/framework/source/loadenv/loadenv.cxx:415
        bStarted = false
#35 0x00007ffff588595a in framework::LoadEnv::startLoading
    (this=0x16a2738, sURL="file:///discs/fast/core/MMT0118F10_END.docx", lMediaDescriptor=uno::Sequence of length 4 = {...}, xBaseFrame=uno::Reference to (framework::Desktop *) 0x164bc08, sTarget="_default", nSearchFlags=0, eFeature=(LoadEnvFeatures::WorkWithUI | LoadEnvFeatures::AllowContentHandler))
    at /discs/fast/core/framework/source/loadenv/loadenv.cxx:311
        g = {pT = 0x16a2738}
        aRealURL = "file:///discs/fast/core/MMT0118F10_END.docx"
        xParser = uno::Reference to ((anonymous namespace)::URLTransformer *) 0x1a15908
        pIt = {<std::__detail::_Node_iterator_base<std::pair<comphelper::OUStringAndHashCode const, com::sun::star::uno::Any>, true>> = {_M_cur = 0x0}, <No data fields>}
        bUIMode = true
--Type <RET> for more, q to quit, c to continue without paging--
#36 0x00007ffff578ef5d in framework::LoadDispatcher::impl_dispatch
    (this=0x16a26e0, rURL=..., lArguments=uno::Sequence of length 4 = {...}, xListener=empty uno::Reference)
    at /discs/fast/core/framework/source/dispatch/loaddispatcher.cxx:107
        xThis = uno::Reference to (framework::LoadDispatcher *) 0x16a26e0
        g = {pT = 0x16a2718}
        xBaseFrame = uno::Reference to (framework::Desktop *) 0x164bc08
        xComponent = empty uno::Reference
        aRet = Python Exception <class 'AssertionError'>: 

#37 0x00007ffff578ebff in framework::LoadDispatcher::dispatchWithReturnValue (this=0x16a26e0, rURL=..., lArguments=uno::Sequence of length 4 = {...})
    at /discs/fast/core/framework/source/dispatch/loaddispatcher.cxx:60
#38 0x00007ffff659dfb9 in comphelper::SynchronousDispatch::dispatch
    (xStartPoint=uno::Reference to (framework::Desktop *) 0x164bbf8, sURL="file:///discs/fast/core/MMT0118F10_END.docx", sTarget="_default", lArguments=uno::Sequence of length 4 = {...}) at /discs/fast/core/comphelper/source/misc/synchronousdispatch.cxx:62
        aRet = uno::Any(void)
        xSyncDisp = uno::Reference to (framework::LoadDispatcher *) 0x16a2710
        aURL = {Complete = "file:///discs/fast/core/MMT0118F10_END.docx", Main = "file:///discs/fast/core/MMT0118F10_END.docx", Protocol = "file://", User = "", Password = "", Server = "", Port = 0, Path = "/discs/fast/core/", Name = "MMT0118F10_END.docx", Arguments = "", Mark = ""}
        xTrans = uno::Reference to ((anonymous namespace)::URLTransformer *) 0x5d06128
        xDispatcher = uno::Reference to (framework::LoadDispatcher *) 0x16a2708
        xProvider = uno::Reference to (framework::Desktop *) 0x164bbf8
        aComponent = empty uno::Reference
#39 0x00007ffff7c75aec in desktop::DispatchWatcher::executeDispatchRequests
    (this=0x166ad10, aDispatchRequestsList=std::vector of length 2, capacity 2 = {...}, bNoTerminate=false, pFlags=0x7fffffff5c60)
    at /discs/fast/core/desktop/source/app/dispatchwatcher.cxx:531
        aObj = {m_aAbsURIRef = "file:///discs/fast/core/MMT0118F10_END.docx", m_aScheme = {m_nBegin = 0, m_nLength = 4}, m_aUser = {m_nBegin = -1, m_nLength = 0}, m_aAuth = {m_nBegin = -1, m_nLength = 0}, m_aHost = {m_nBegin = 7, m_nLength = 0}, m_aPort = {m_nBegin = -1, m_nLength = 0}, m_aPath = {m_nBegin = 7, m_nLength = 36}, m_aQuery = {m_nBegin = -1, m_nLength = 0}, m_aFragment = {m_nBegin = -1, m_nLength = 0}, m_eScheme = INetProtocol::File, m_eSmartScheme = INetProtocol::Http}
        aArgs = std::vector of length 4, capacity 4 = {{Name = "Referer", Handle = 0, Value = uno::Any("string": "private:OpenEvent"), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "InteractionHandler", Handle = 0, Value = uno::Any("com.sun.star.task.XInteractionHandler2": {<com::sun::star::task::XInteractionHandler> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x5af72d8}, <No data fields>}, <No data fields>}), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "MacroExecutionMode", Handle = 0, Value = uno::Any("short": 3), State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "UpdateDocMode", Handle = 0, Value = uno::Any("short": 2), State = com::sun::star::b--Type <RET> for more, q to quit, c to continue without paging--
eans::PropertyState::PropertyState_DIRECT_VALUE}}
        aTarget = "_default"
        aName = "file:///discs/fast/core/MMT0118F10_END.docx"
        xDoc = empty uno::Reference
        aDispatchRequest = @0x1869cc0: {aRequestType = desktop::DispatchWatcher::REQUEST_OPEN, aURL = "./MMT0118F10_END.docx", aCwdUrl = std::optional = {[contained value] = "file:///discs/fast/core"}, aParam = "", aPreselectedFactory = ""}
        xDesktop = uno::Reference to (framework::Desktop *) 0x164bbf8
        aDispatches = std::vector of length 0, capacity 0
        bSetInputFilter = false
        aForcedInputFilter = ""
        bEmpty = 247
#40 0x00007ffff7c8f222 in desktop::RequestHandler::ExecuteCmdLineRequests (aRequest=..., noTerminate=false)
    at /discs/fast/core/desktop/source/app/officeipcthread.cxx:1317
        dispatchWatcher = rtl::Reference to 0x166ad10
        aTempList = std::vector of length 2, capacity 2 = {{aRequestType = desktop::DispatchWatcher::REQUEST_OPEN, aURL = "./instdir/program/soffice", aCwdUrl = std::optional = {[contained value] = "file:///discs/fast/core"}, aParam = "", aPreselectedFactory = ""}, {aRequestType = desktop::DispatchWatcher::REQUEST_OPEN, aURL = "./MMT0118F10_END.docx", aCwdUrl = std::optional = {[contained value] = "file:///discs/fast/core"}, aParam = "", aPreselectedFactory = ""}}
        aGuard = {pT = 0x0}
        aSetGuard = {m_pCondition = 0x0}
        aDispatchList = std::vector of length 0, capacity 0
        bShutdown = false
Comment 6 Dave Gilbert 2025-08-14 23:43:48 UTC
Skipping that huge backtrace for a second, something a little more concentrated:

/discs/fast/core/sw/source/core/layout/objectformattertxtfrm.cxx:237
237                 assert(GetPageFrame().GetPhyPageNum() == GetPgNumOfCollected(nIdx));

        const SwPageFrame& GetPageFrame() const
        {
            return mrPageFrame;
        }
(gdb) p mrPageFrame
$4 = (const SwPageFrame &) @0x5d79cd0: {<SwFootnoteBossFrame> = {<SwLayoutFrame> = {<SwFrame> = {<SwFrameAreaDefinition> = {
          _vptr.SwFrameAreaDefinition = 0x7fffb3eb2a50 <vtable for SwPageFrame+16>, maFrameArea = SwRect = {point = Point = {x = 284, y = 284},
            size = Size = {width = 12472, height = 17405}}, maFramePrintArea = SwRect = {point = Point = {x = 794, y = 510}, size = Size = {width = 10884,
              height = 15988}}, mnFrameId = 1, mbFrameAreaPositionValid = true, mbFrameAreaSizeValid = true, mbFramePrintAreaValid = true,
          static snLastFrameId = 114}, <sw::ClientBase<SwModify>> = {<sw::WriterListener> = {
            _vptr.WriterListener = 0x7fffb3eb2ba0 <vtable for SwPageFrame+352>, m_pLeft = 0x0, m_pRight = 0x0},
          m_pRegisteredIn = 0x4355b20}, <SfxBroadcaster> = {_vptr.SfxBroadcaster = 0x7fffb3eb2bf8 <vtable for SwPageFrame+440>, 
          m_RemovedPositions = std::vector of length 0, capacity 0, m_Listeners = std::vector of length 0, capacity 0}, static spCache = 0x1ad3ae0, 
        mpRoot = 0x5d799c0, mpUpper = 0x5d799c0, mpNext = 0x61e9460, mpPrev = 0x0, m_pDrawObjs = std::unique_ptr<SwSortedObjs> = {get() = 0x0}, 
        mnFrameType = SwFrameType::Page, mbInDtor = false, mbInvalidR2L = false, mbDerivedR2L = false, mbRightToLeft = false, mbInvalidVert = false, 
        mbDerivedVert = false, mbVertical = false, mbVertLR = false, mbVertLRBT = false, mbValidLineNum = false, mbFixSize = true, 
        mbCompletePaint = false, mbRetouche = false, mbInfInvalid = false, mbInfBody = false, mbInfTab = false, mbInfFly = false, mbInfFootnote = false, 
        mbInfSct = false, mbColLocked = false, m_isInDestroy = false, mnForbidDelete = 0}, m_pLower = 0x5d6e1b0, 
      m_VertPosOrientFramesFor = std::vector of length 0, capacity 0}, m_nMaxFootnoteHeight = 9223372036854775807},  
  m_pSortedObjs = std::unique_ptr<SwSortedObjs> = {get() = 0x5d7cbf0}, m_pDesc = 0x43557e0, m_nPhyPageNum = 1, m_bInvalidContent = true, 
  m_bInvalidLayout = true, m_bInvalidFlyContent = true, m_bInvalidFlyLayout = true, m_bInvalidFlyInCnt = true, m_bFootnotePage = false, 
  m_bEmptyPage = false, m_bEndNotePage = false, m_bInvalidSpelling = true, m_bInvalidSmartTags = true, m_bInvalidAutoCmplWrds = true, 
  m_bInvalidWordCount = true, m_bHasGrid = false, static snShadowPxWidth = 9 '\t'}

(gdb) p mrPageFrame.GetPhyPageNum()
$5 = 1
(gdb) p nIdx
$1 = 0
sal_uInt32 SwObjectFormatter::GetPgNumOfCollected( const sal_uInt32 _nIndex )
{
    return mpPgNumAndTypeOfAnchors ? mpPgNumAndTypeOfAnchors->GetPageNum(_nIndex) : 0;
}
(gdb) p mpPgNumAndTypeOfAnchors
$2 = std::unique_ptr<SwPageNumAndTypeOfAnchors> = {get() = 0x612ab10}
(gdb) p mpPgNumAndTypeOfAnchors->GetPageNum(0)
$3 = 2


so we have a 1 !=2
Comment 7 Dave Gilbert 2025-08-15 01:06:30 UTC
Trying to generate a minimum document seems tricky.
There are a whole bunch of things I can delete from different places that may or may not fix it; with no apparent reasoning.

(Another oddity is that trying to delete the images complains of protected stuff you can't delete - but 'cut' on the menu works).