Bug 149184 - Crash during save to DOCX after removing footer
Summary: Crash during save to DOCX after removing footer
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.1.2 release
Hardware: All All
: medium normal
Assignee: Hossein
URL:
Whiteboard: target:7.4.0 target:7.3.5 target:7.3.4
Keywords: bibisected, bisected, regression
: 149233 (view as bug list)
Depends on:
Blocks: DOCX-Header-Footer
  Show dependency treegraph
 
Reported: 2022-05-19 14:17 UTC by Vasily Melenchuk (CIB)
Modified: 2022-06-01 09:26 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample DOCX file (17.75 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-05-19 14:17 UTC, Vasily Melenchuk (CIB)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vasily Melenchuk (CIB) 2022-05-19 14:17:16 UTC
Description:
LibreOffice does crash on saving of document with removed footer.

Steps to Reproduce:
1. Open attached document in LO (simplefooter.docx)
2. *completely* delete footer from document (click on footer and select "Delete Footer" in footer menu).
3. Try to save doc.

Actual Results:
-

Expected Results:
-


Reproducible: Always


User Profile Reset: No



Additional Info:
In log:

warn:legacy.osl:97860:94324:sw/source/filter/ww8/wrtw8sty.cxx:2089: Footer text is not here

And then it does crash.

I'm not sure about version. 7.2.1.2 is affected. 7.0.2.2 and below are okay.
Comment 1 Vasily Melenchuk (CIB) 2022-05-19 14:17:43 UTC
Created attachment 180227 [details]
Sample DOCX file
Comment 2 Hossein 2022-05-19 19:55:16 UTC
Reproduced with LibreOffice 7.4 master:

Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: c621299682c210ed8d89224d3347ddf359df9e9c
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Reproducible with LibreOffice 7.2:

Version: 7.2.4.1 / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Not reproducible with LibreOffice 6.4:

Version: 6.4.0.1
Build ID: 1b6477b31f0334bd8620a96f0aeeb449b587be9f
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 3 Hossein 2022-05-19 20:01:38 UTC Comment hidden (obsolete)
Comment 4 Hossein 2022-05-19 20:03:39 UTC
Crash report:

https://crashreport.libreoffice.org/stats/crash_details/f176cbcd-700c-4090-9690-0c2a3539921d

Marking as regression, because the bugs is not reproducible with 7.0 (as stated in the bug description), but reproducible with LibreOffice 7.2.
Comment 5 Hossein 2022-05-20 08:21:23 UTC
This stack trace is created using Qt Creator:

1 SfxItemSet::Count  itemset.hxx  96  0x7ffff427a93e 
2 SfxItemSet::Get  itemset.cxx  748 0x7ffff42b2677 
3 SfxItemSet::Get<SwFormatContent>  itemset.hxx  103 0x7fffc4232b3d 
4 SwAttrSet::GetContent  fmtcntnt.hxx  53  0x7fffc422ab44 
5 SwFormat::GetContent  fmtcntnt.hxx  56  0x7fffc422ab74 
6 MSWordExportBase::WriteHeaderFooterText  wrtw8sty.cxx  2090 0x7fffc44307b7 
7 WW8_WrPlcSepx::OutHeaderFooter  wrtw8sty.cxx  1236 0x7fffc442cde6 
8 WW8Export::WriteHeadersFooters  wrtw8sty.cxx  1539 0x7fffc442e39e 
9 MSWordExportBase::SectionProperties  wrtw8sty.cxx  1961 0x7fffc442fab4 
10 WW8_WrPlcSepx::WriteKFText  wrtw8sty.cxx  1989 0x7fffc442fd95 
11 WW8Export::StoreDoc1  wrtww8.cxx  3104 0x7fffc4474439 
12 WW8Export::ExportDocument_Impl  wrtww8.cxx  3552 0x7fffc44774ed 
13 MSWordExportBase::ExportDocument  wrtww8.cxx  3391 0x7fffc44761c9 
14 SwWW8Writer::WriteStorageImpl  wrtww8.cxx  3830 0x7fffc4479287 
15 SwWW8Writer::WriteStorage  wrtww8.cxx  3742 0x7fffc447883c 
16 StgWriter::Write  writer.cxx  506 0x7fffc907f3a0 
17 Writer::Write  writer.cxx  248 0x7fffc907d7c8 
18 Writer::Write  writer.cxx  285 0x7fffc907dcf3 
19 SwWW8Writer::Write  wrtww8.cxx  3847 0x7fffc4479390 
20 SwWriter::Write  shellio.cxx  860 0x7fffc8f2bdf6 
21 SwDocShell::ConvertTo  docsh.cxx  778 0x7fffc9140164 
22 SfxObjectShell::SaveTo_Impl  objstor.cxx  1554 0x7ffff4c98a05 
23 SfxObjectShell::PreDoSaveAs_Impl  objstor.cxx  2961 0x7ffff4ca1756 
24 SfxObjectShell::CommonSaveAs_Impl  objstor.cxx  2751 0x7ffff4ca020a 
25 SfxObjectShell::APISaveAs_Impl  objserv.cxx  318 0x7ffff4c7e2c2 
26 SfxBaseModel::impl_store  sfxbasemodel.cxx  3140 0x7ffff4cf92a7 
27 SfxBaseModel::storeAsURL  sfxbasemodel.cxx  1730 0x7ffff4cf00b6 
28 SfxStoringHelper::GUIStoreModel  guisaveas.cxx  1679 0x7ffff4c59999 
29 SfxObjectShell::ExecFile_Impl  objserv.cxx  970 0x7ffff4c82923 
30 SfxStubSfxObjectShellExecFile_Impl  sfxslots.hxx  207 0x7ffff4c7d579 
31 SfxDispatcher::Call_Impl  dispatch.cxx  254 0x7ffff4949d22 
32 SfxDispatcher::Execute_  dispatch.cxx  753 0x7ffff494d0b9 
33 SfxBindings::Execute_Impl  bindings.cxx  1060 0x7ffff4938ae3 
34 SfxDispatchController_Impl::dispatch  unoctitm.cxx  700 0x7ffff4a0a604 
35 SfxOfficeDispatch::dispatch  unoctitm.cxx  262 0x7ffff4a084a4 
36 framework::MenuBarManager::Select  menubarmanager.cxx  802 0x7ffff5e7e5a0 
37 framework::MenuBarManager::LinkStubSelect  menubarmanager.cxx  766 0x7ffff5e7e271 
38 Link<Menu *, bool>::Call  link.hxx  111 0x7fffeeee41ef 
39 Menu::Select  menu.cxx  358 0x7fffeeed516a 
40 Menu::ImplCallSelect  menu.cxx  2107 0x7fffeeeddaf3 
41 Menu::LinkStubImplCallSelect  menu.cxx  2104 0x7fffeeeddac1 
42 Link<void *, void>::Call  link.hxx  111 0x7fffeefec49d 
43 ImplHandleUserEvent  winproc.cxx  2229 0x7fffeefe9507 
44 ImplWindowFrameProc  winproc.cxx  2799 0x7fffeefeb39c 
45 SalFrame::CallCallback  salframe.hxx  308 0x7fffefa35ade 
46 SalGenericDisplay::ProcessEvent  gendisp.cxx  66  0x7fffefa5bf9d 
47 operator()  salusereventlist.cxx 119 0x7fffef63d92e 
48 SalUserEventList::DispatchUserEvents  salusereventlist.cxx 120 0x7fffef63dc07 
49 SalGenericDisplay::DispatchInternalEvent  gendisp.cxx  51  0x7fffefa5bf09 
50 SalX11Display::Yield  saldisp.cxx  1889 0x7fffe4d2a10b 
51 DisplayYield  saldisp.cxx  381 0x7fffe4d2206d 
52 (anonymous namespace)::YieldEntry::HandleNextEvent saldata.cxx  562 0x7fffe4d1ceed 
53 SalXLib::Yield  saldata.cxx  658 0x7fffe4d1d731 
54 X11SalInstance::DoYield  salinst.cxx  192 0x7fffe4d3f92b 
55 ImplYield  svapp.cxx  474 0x7fffef6f7ca3 
56 Application::Yield  svapp.cxx  558 0x7fffef6f883b 
57 Application::Execute  svapp.cxx  452 0x7fffef6f7997 
58 desktop::Desktop::Main  app.cxx  1600 0x7ffff7c2c719 
59 ImplSVMain  svmain.cxx  202 0x7fffef716c9e 
60 SVMain  svmain.cxx  234 0x7fffef716dc7 
61 soffice_main  sofficemain.cxx  94  0x7ffff7c933cc 
62 sal_main  main.c  51  0x5555555549ed 
63 main  main.c  49  0x5555555549cf
Comment 6 Gabor Kelemen (allotropia) 2022-05-20 09:38:48 UTC
Bibisected with win-7.2 to:

https://git.libreoffice.org/core/+/88e6a1bfeac86e0c89d2ff08c908c2b5ae061177

author	Daniel Arato (NISZ) <arato.daniel@nisz.hu>	Fri Feb 05 12:07:48 2021 +0100
committer	László Németh <nemeth@numbertext.org>	Tue May 04 19:14:22 2021 +0200

tdf#69635 DOCX: export hidden (shared) headers/footers

Adding CC to: NISZ team
Comment 7 Telesto 2022-05-22 19:33:30 UTC
*** Bug 149233 has been marked as a duplicate of this bug. ***
Comment 8 Commit Notification 2022-05-23 14:30:59 UTC
Hossein committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3eda5d345f14f8926358df7b425c452a8a165c7d

tdf#149184 DOCX: fix crash removing footer, then saving to doc

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2022-05-24 07:36:09 UTC
Hossein committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/7b09579295579045c4ad76578df09356f3d5b8d0

tdf#149184 DOCX: fix crash removing footer, then saving to doc

It will be available in 7.3.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2022-06-01 09:26:17 UTC
Hossein committed a patch related to this issue.
It has been pushed to "libreoffice-7-3-4":

https://git.libreoffice.org/core/commit/18c2a7d4cf10564b3f9c48ec190c1c3be8122f6a

tdf#149184 DOCX: fix crash removing footer, then saving to doc

It will be available in 7.3.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.