Bug 155687 - Crash in: sw::GetZOrderLayer::operator()(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const &)
Summary: Crash in: sw::GetZOrderLayer::operator()(com::sun::star::uno::Reference<com::...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium critical
Assignee: Not Assigned
Whiteboard: target:7.3.0 target:
Depends on:
Blocks: Save Crash
  Show dependency treegraph
Reported: 2023-06-05 12:50 UTC by sstoneb
Modified: 2024-01-05 23:55 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["sw::GetZOrderLayer::operator()(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const &)"]

Source document for the copy-paste operation. (51.34 KB, application/vnd.oasis.opendocument.text)
2023-06-05 12:50 UTC, sstoneb

Note You need to log in before you can comment on or make changes to this bug.
Description sstoneb 2023-06-05 12:50:00 UTC
Created attachment 187731 [details]
Source document for the copy-paste operation.

This bug was filed from the crash reporting server and is br-7fc1c902-1466-452c-a2ee-3f4d8ebfb5cc.
Crash occurred when I tried to save a document into which I had pasted content from another document. Specifically, I was pasting a row of a table (comprising the entire table in this case) in which each cell contained a single equation object. I was also pasting INTO a pre-existing table and some of those pre-existing cells also contained equations. Before pasting, I highlighted the cells in the target document that I wanted to paste into. It was the same number and arrangement of cells as in the source data. The application operates as normal UNTIL the save is attempted.

The crash caused all LO windows to disappear and the document recovery system came up. The front dialog named "Documents Are Being Saved" didn't make any progress, so I simply hit the 'X' button to stop it.

I'm able to reproduce this consistently with the source document in question, which I'm attaching to this bug. This is something that has happened to me in the past as well, always when pasting table contents that include equations into an existing table and then attempting to save the document I had pasted into. It doesn't happen often, though, and seems to be related to specific documents, tables, cells, or equations. In the past, if when I've just deleted the table and recreated it and its contents this would "cure" the document.

When testing just now by pasting into a new blank document, I first copied the table into the blank doc and was able to save. Pasting two separate instances of the table in, one below the other, is also fine. But if I paste the table into a blank document, and then paste again into that table, then saving causes either a crash as described above or the save process hangs: the window remains open but the "saving document" progress bar at the bottom of the window never advances. I'm not sure how to control which type of crash I get.

I'm attaching a copy of the source document that I'm copying from, leading to these errors. Select/highlight the entire table, copy, and then paste into another document to test it on your end. If pasting into an existing table, as I said, I first select/highlight the cells I want to paste into and then do the paste operation.
Comment 1 Julien Nabet 2023-06-05 13:17:49 UTC
Could you give a try to 7.4.7 or even 7.5.3 ?
Comment 2 Stéphane Guillou (stragu) 2023-06-07 13:34:08 UTC
Looking at the crash signature, it was seen for the last time in 7.2.1, so very likely to be resolved in current versions.
Comment 3 QA Administrators 2023-12-05 03:18:29 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2024-01-05 03:14:01 UTC Comment hidden (obsolete)
Comment 5 Stéphane Guillou (stragu) 2024-01-05 22:21:54 UTC
Reproduced on Linux with signature:

std::_Function_handler<unsigned int (com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&), sw::GetZOrderLayer>::_M_invoke(std::_Any_data const&, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&) 


With steps:
1. Open attachment
2. Copy top table
3. Paste in four empty cells in second table, then again on the same cells
4. Save

Version: / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

No repro in:

Version: / LibreOffice Community
Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Fix bibisected to:

commit a0d28d03ff40a77a2c88704a7b2bedb68e68563f
author	Michael Stahl Thu Sep 09 18:52:49 2021 +0200
committer	Michael Stahl Fri Sep 10 12:44:58 2021 +0200
xmloff: ODF export: avoid mysterious crash while sorting shapes
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121860

...which references the OP's crash signature.

Thank you sstoneb and Michael!