CollaboraOnline / online

Collabora Online is a collaborative online office suite based on LibreOffice technology. This is also the source for the Collabora Office apps for iOS and Android.
https://collaboraonline.com
Other
1.77k stars 676 forks source link

Specific file is unreadable so that in nextcloud office, not even the chrome appears #6857

Closed JMoVS closed 1 year ago

JMoVS commented 1 year ago

Describe the bug Document cannot be edited with Collabora. If the same document is saved as odf, then resaved as docx, it works.

To Reproduce Steps to reproduce the behavior:

  1. try to open the magic file - nothing happens

Expected behavior Proper display of the file

Actual behavior Blank window without chrome

Screenshots grafik

Desktop (please complete the following information)

Additional context Add any other context about the problem here.

The file is confidential but I sent a sanitised version to @mmeeks and @vmiklos directly.

mmeeks commented 1 year ago

@vmiklos this looks like a floating frame issue that affects 23.05 specifically. @JMoVS can you paste the exact versions from help->about in Online (from another document). More details from IRC make this sound very multi-page-floating-frame-related =)

<JMoVS[m]> I bisected the problem down <JMoVS[m]> an extract from the document.xml <JMoVS[m]> this does not display:

mmeeks commented 1 year ago

Trace is: ` Thread 1 (Thread 0x7fc63533dbc0 (LWP 199322) "kitbroker_003"):

0 ImplLogicToPixel

1 OutputDevice::LogicToPixel(tools::Rectangle const&) const (rLogicRect=..., this=0x1) at vcl/source/outdev/map.cxx:925

2 OutputDevice::LogicToPixel(tools::Rectangle const&) const (this=this@entry=0x6a55e90, rLogicRect=...) at vcl/source/outdev/map.cxx:916

3 0x00007fc62718f600 in SwPageFrame::GetHorizontalShadowRect(SwRect const&, SwViewShell const, OutputDevice const, SwRect&, bool, bool, bool) (_rPageRect=SwRect = {...}, _pViewShell=_pViewShell@entry=0x6ae7d80, pRenderContext=pRenderContext@entry=0x6a55e90, _orHorizontalShadowRect=SwRect = {...}, bPaintLeftShadow=bPaintLeftShadow@entry=false, bPaintRightShadow=bPaintRightShadow@entry=false, bRightSidebar=true) at sw/source/core/layout/paintfrm.cxx:5937

4 0x00007fc627190941 in SwPageFrame::GetBorderAndShadowBoundRect(SwRect const&, SwViewShell const, OutputDevice const, SwRect&, bool, bool, bool) (_rPageRect=SwRect = {...}, _pViewShell=0x6ae7d80, pRenderContext=0x6a55e90, _orBorderAndShadowBoundRect=SwRect = {...}, bLeftShadow=, bRightShadow=, bRightSidebar=true) at sw/source/core/layout/paintfrm.cxx:6314

5 0x00007fc62717e820 in SwPageFrame::DestroyImpl() (this=0x6d8b780) at sw/source/core/layout/pagechg.cxx:301

6 0x00007fc6271b0906 in SwFrame::DestroyFrame(SwFrame*) (pFrame=0x6d8b780) at sw/source/core/layout/ssfrm.cxx:395

7 0x00007fc62718141a in SwRootFrame::RemovePage(SwPageFrame**, SwRemoveResult) (this=, pDelRef=, eResult=) at sw/source/core/layout/pagechg.cxx:1504

8 0x00007fc627182035 in (anonymous namespace)::doInsertPage(SwRootFrame*, SwPageFrame, SwFrameFormat, SwPageDesc, bool, SwPageFrame) (pRoot=0x6ab5330, pRefSibling=0x7ffca261f6c0, pFormat=, pDesc=0x67d9f20, bFootnote=, pRefPage=0x7ffca261f6c8) at sw/source/core/layout/pagechg.cxx:1359

9 0x00007fc627182164 in SwFrame::InsertPage(SwPageFrame*, bool) (this=this@entry=0x6d15130, pPrevPage=0x6cab110, bFootnote=bFootnote@entry=false) at sw/source/core/layout/pagechg.cxx:1414

10 0x00007fc62714f16c in SwFrame::GetNextFlyLeaf(MakePageType) (this=0x6d15130, eMakePage=MAKEPAGE_INSERT) at sw/source/core/layout/flycnt.cxx:1625

11 0x00007fc6271404e9 in SwFlowFrame::MoveFwd(bool, bool, bool) (this=this@entry=0x6d15230, bMakePage=, bPageBreak=bPageBreak@entry=false, bMoveAlways=bMoveAlways@entry=false) at sw/source/core/layout/flowfrm.cxx:2048

12 0x00007fc6271c039a in SwTabFrame::MakeAll(OutputDevice*) (this=0x6d15130, pRenderContext=) at sw/source/core/layout/tabfrm.cxx:2064

13 0x00007fc6271becf6 in SwTabFrame::MakeAll(OutputDevice*) (this=0x6a9ef00, pRenderContext=) at sw/source/core/layout/tabfrm.cxx:2685

14 0x00007fc62712f63a in SwFrame::PrepareMake(OutputDevice*) (this=0x6a9ef00, pRenderContext=0x6a55e90) at sw/source/core/layout/calcmove.cxx:375

15 0x00007fc6271c2f51 in SwFrame::Calc(OutputDevice*) const (this=this@entry=0x6a9ef00, pRenderContext=) at sw/source/core/layout/trvlfrm.cxx:1803

16 0x00007fc62716f72d in SwLayAction::FormatLayoutTab(SwTabFrame*, bool) (this=0x7ffca2620170, pTab=0x6a9ef00, bAddRect=) at sw/source/core/layout/layact.cxx:1531

17 0x00007fc627170fd2 in SwLayAction::FormatLayoutFly(SwFlyFrame*) (this=0x7ffca2620170, pFly=) at sw/source/core/layout/layact.cxx:1495

18 0x00007fc62717a8d5 in SwObjectFormatter::FormatObj_(SwAnchoredObject&) (this=0x6c6b210, _rAnchoredObj=...) at sw/source/core/layout/objectformatter.cxx:286

19 0x00007fc62717be2d in SwObjectFormatterTextFrame::DoFormatObj(SwAnchoredObject&, bool) (_bCheckForMovedFwd=false, _rAnchoredObj=..., this=0x6c6b210) at sw/source/core/layout/objectformattertxtfrm.cxx:133

20 SwObjectFormatterTextFrame::DoFormatObj(SwAnchoredObject&, bool) (this=0x6c6b210, _rAnchoredObj=..., _bCheckForMovedFwd=) at sw/source/core/layout/objectformattertxtfrm.cxx:117

21 0x00007fc62717a373 in SwObjectFormatter::FormatObjsAtFrame_(SwTextFrame*) (this=this@entry=0x6c6b210, _pMasterTextFrame=_pMasterTextFrame@entry=0x0) at sw/source/core/layout/objectformatter.cxx:408

22 0x00007fc62717c25a in SwObjectFormatterTextFrame::DoFormatObjs() (this=0x6c6b210) at sw/source/core/layout/objectformattertxtfrm.cxx:348

23 0x00007fc62717a5fa in SwObjectFormatter::FormatObjsAtFrame(SwFrame&, SwPageFrame const&, SwLayAction*) (_rAnchorFrame=..., _rPageFrame=, _pLayAction=_pLayAction@entry=0x7ffca2620170) at sw/source/core/layout/objectformatter.cxx:160

24 0x00007fc62716f0b6 in SwLayAction::FormatContent(SwPageFrame*) (this=0x7ffca2620170, pPage=0x69367e0) at sw/source/core/layout/layact.cxx:1734

25 0x00007fc627171c42 in SwLayAction::InternalAction(OutputDevice*) (this=0x7ffca2620170, pRenderContext=0x6a55e90) at sw/source/core/layout/layact.cxx:603

26 0x00007fc6271726c1 in SwLayAction::Action(OutputDevice*) (this=this@entry=0x7ffca2620170, pRenderContext=0x6a55e90) at sw/source/core/layout/layact.cxx:395

27 0x00007fc62752889b in SwViewShell::ImplEndAction(bool) (this=0x6ae7d80, bIdleEnd=) at include/rtl/ref.hxx:206

28 0x00007fc626eae794 in SwViewShell::EndAction(bool) (bIdleEnd=false, this=0x6ae7d80) at sw/inc/viewsh.hxx:633

29 SwCursorShell::EndAction(bool) (this=0x6ae7d80, bIdleEnd=bIdleEnd@entry=false) at sw/source/core/crsr/crsrsh.cxx:263

30 0x00007fc627868097 in SwView::OuterResizePixel(Point const&, Size const&) (this=0x6948a80, rOfst=, rSize=) at /usr/include/c++/11/bits/unique_ptr.h:173

31 0x00007fc6334ab633 in SfxViewFrame::DoAdjustPosSizePixel(SfxViewShell*, Point const&, Size const&, bool) (inplaceEditModeChange=, rSize=, rPos=, pSh=, this=0x6ab12b0) at sfx2/source/view/viewfrm.cxx:1967

32 SfxViewFrame::DoAdjustPosSizePixel(SfxViewShell*, Point const&, Size const&, bool) (this=0x6ab12b0, pSh=, rPos=, rSize=, inplaceEditModeChange=) at sfx2/source/view/viewfrm.cxx:1951

33 0x00007fc6334ac070 in SfxViewFrame::Resize(bool) (this=0x6ab12b0, bForce=) at sfx2/source/view/viewfrm.cxx:2761

34 0x00007fc63070531c in vcl::Window::ImplCallResize() (this=0x68aa750) at vcl/source/window/event.cxx:525

35 0x00007fc630785510 in vcl::Window::Show(bool, ShowFlags) (this=this@entry=0x68aa750, bVisible=bVisible@entry=true, nFlags=nFlags@entry=ShowFlags::NONE) at vcl/source/window/window.cxx:2297

36 0x00007fc63349feae in SfxBaseController::ConnectSfxFrame_Impl(SfxBaseController::ConnectSfxFrame) (this=0x69a6d30, i_eConnect=SfxBaseController::E_CONNECT) at sfx2/source/view/sfxbasecontroller.cxx:1185

37 0x00007fc6334a0ee4 in SfxBaseController::attachFrame(com::sun::star::uno::Reference const&) (this=0x69a6d30, xFrame=) at sfx2/source/view/sfxbasecontroller.cxx:530

38 0x00007fc633486954 in (anonymous namespace)::SfxFrameLoader_Impl::impl_createDocumentView (i_rViewName="Default", i_rViewFactoryArgs=..., i_rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl ) 0x659f360, i_rModel=uno::Reference to (SwXTextDocument ) 0x66504f0) at sfx2/source/view/frmload.cxx:584

39 (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence const&, com::sun::star::uno::Reference const&) (this=, rArgs=, _rTargetFrame=) at sfx2/source/view/frmload.cxx:759

40 0x00007fc6339f5bbc in framework::LoadEnv::impl_loadContent() (this=0x7ffca2620ca0) at framework/source/loadenv/loadenv.cxx:1176

41 0x00007fc6339f8bbc in framework::LoadEnv::start() (this=0x7ffca2620ca0) at framework/source/loadenv/loadenv.cxx:412

42 0x00007fc6339f92e6 in framework::LoadEnv::startLoading(rtl::OUString const&, com::sun::star::uno::Sequence const&, com::sun::star::uno::Reference const&, rtl::OUString const&, int, LoadEnvFeatures) (this=0x7ffca2620ca0, sURL=, lMediaDescriptor=, xBaseFrame=, sTarget=, nSearchFlags=0, eFeature=LoadEnvFeatures::NONE) at framework/source/loadenv/loadenv.cxx:308

43 0x00007fc6339f9b12 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference const&, com::sun::star::uno::Reference const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence const&) (xLoader=uno::Reference to (framework::Desktop ) 0x4cb4708, xContext=uno::Reference to (cppu::(anonymous namespace)::ComponentContext ) 0x17aab90, sURL="file:///tmp/user/docs/6HzoblRSFEa5jP1C/TS.docx", sTarget="_blank", nSearchFlags=nSearchFlags@entry=0, lArgs=uno::Sequence of length 5 = {...}) at framework/source/loadenv/loadenv.cxx:168

44 0x00007fc633a0a49f in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence const&) (this=0x4cb4690, sURL="file:///tmp/user/docs/6HzoblRSFEa5jP1C/TS.docx", sTargetFrameName="_blank", nSearchFlags=0, lArguments=uno::Sequence of length 5 = {...}) at framework/source/services/desktop.cxx:595

45 0x00007fc634ee50ef in lo_documentLoadWithOptions(LibreOfficeKit, char const, char const*) (pThis=0x173fa00, pURL=, pOptions=) at desktop/source/lib/init.cxx:2808

46 0x0000000000612c60 in lok::Office::documentLoad(char const, char const) (this=0x65254f0, pUrl=0x652e400 "file:///tmp/user/docs/6HzoblRSFEa5jP1C/TS.docx", pFilterOptions=0x6407290 ",DeviceFormFactor=desktop,EnableMacrosExecution=false,MacroSecurityLevel=1,Timezone=Europe/London") at include/LibreOfficeKit/LibreOfficeKit.hxx:926

47 0x000000000062d08d in Document::load(std::shared_ptr const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (this=0x652f220, session=std::shared_ptr (use count 3, weak count 1) = {...}, renderOpts="") at kit/Kit.cpp:1569`

JMoVS commented 1 year ago
COOLWSD Version:
23.05.1.2 git hash: 
[a708901](javascript:void(window.open('https://github.com/CollaboraOnline/online/commits/a708901'));)
(E)
LOKit Version:
built on 
[a great technology base](javascript:void(window.open('http://col.la/lot'));)
Collabora Office 23.05.1.2 git hash: 
[cc6b8db](javascript:void(window.open('https://hub.libreoffice.org/git-core/cc6b8db'));)
Angeboten von: Debian GNU/Linux 12 (bookworm) 
[007e203d](https://office.phelas.com/hosting/discovery)

Copyright © 2023, Collabora Productivity Limited
vmiklos commented 1 year ago

I can reproduce a layout loop, which is indeed specific to multi-page floating tables. I'll take a look.

vmiklos commented 1 year ago

https://gerrit.libreoffice.org/c/core/+/154343 fix for master is pending CI here, still need to backport it.

mmeeks commented 1 year ago

Nice work fixing it and also generating an anonymized unit test - thanks Miklos =)

vmiklos commented 1 year ago

The backport was submitted to co-23.05 on Monday, closing.