Bug 133933 - CRASH: Undoing paste of table with images of cats
Summary: CRASH: Undoing paste of table with images of cats
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:7.2.0 target:7.1.3
Keywords: bibisected, bisected, haveBacktrace
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2020-06-12 14:48 UTC by Xisco Faulí
Modified: 2021-03-23 14:16 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["SwUndoTableCpyTable::UndoImpl(sw::UndoRedoContext%20&)"]


Attachments
bt with debug symbols (gtk3) (10.12 KB, text/plain)
2020-06-12 17:24 UTC, Julien Nabet
Details
Document with an empty paragraph at start to uncover the hidden root cause (473.56 KB, application/vnd.oasis.opendocument.text)
2021-03-17 10:21 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2020-06-12 14:48:12 UTC
Steps to reproduce:
1. Open attachment 160406 [details] from bug 132744
2. Select all
3. Copy
4. Paste
5. Undo

Reproduced in

Version: 7.1.0.0.alpha0+
Build ID: ff508f6d8a3e58d29e9e7622006a7103fb0a2849
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2020-06-12 14:49:45 UTC
Regression introduced by:

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

author	Miklos Vajna <vmiklos@collabora.co.uk>	2015-01-03 11:40:41 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2015-01-03 13:09:26 +0100
commit fa39e7970496537258eaad1f5351db2d675225b6 (patch)
tree 1b90dadaed9d6941a5921e961c2a627d9eb02bfe
parent b33cd811cb5456a146916ee374aaf1ce11b2031e (diff)
fdo#72486 SwWrtShell::SelAll: if in table, then call extended select all ...

Bisected with: bibisect-50max

Adding Cc: to Miklos Vajna
Comment 2 Telesto 2020-06-12 15:07:41 UTC Comment hidden (obsolete)
Comment 3 Xisco Faulí 2020-06-12 15:35:19 UTC Comment hidden (obsolete)
Comment 4 Julien Nabet 2020-06-12 17:24:21 UTC
Created attachment 161928 [details]
bt with debug symbols (gtk3)

On pc Debian x86-64 with master sources updated today, I got an assertion at second step (copy).
It may be related...
Comment 5 Telesto 2020-06-12 17:53:14 UTC
Ok, repro with
Version: 7.1.0.0.alpha0+ (x86)
Build ID: 26483950760f0aac7bc45e93db4127f66a98fdc6
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

So an old bug reappeared
Comment 6 libre officer 2020-06-14 13:06:50 UTC
Crashed when following exactly Xisco steps.

https://crashreport.libreoffice.org/stats/crash_details/2b3f8403-dc63-4809-a131-91a05402a1ee

https://crashreport.libreoffice.org/stats/crash_details/a910478c-cd5e-4161-960d-3f7cc26285ec


Cannot reproduce in:

Version: 7.0.0.0.beta1 (x64)
Build ID: 94f789cbb33335b4a511c319542c7bdc31ff3b3c
CPU threads: 4; OS: Windows 10.0 Build 17763; UI render: Skia/Raster; VCL: win
Locale: fr-CH (fr_FR); UI: en-GB
Calc: threaded
Comment 7 Miklos Vajna 2021-03-16 16:33:34 UTC
Ah, this points to the above commit because previously the whole doc was selected (and with this commit, only the table is selected), so SwDoc::InsCopyOfTable() is not called. If you press enter after opening the document (so there is an empty paragraph before the table) and then you do the same steps, this crashes even before the above commit.

Xisco: could you please check if the empty-paragraph version was always broken or possible to bisect that as well? Thanks.
Comment 8 Miklos Vajna 2021-03-17 10:21:53 UTC
Created attachment 170528 [details]
Document with an empty paragraph at start to uncover the hidden root cause
Comment 9 Miklos Vajna 2021-03-17 10:24:51 UTC
Steps to reproduce:
1. Open attachment attachment 170528 [details]
2. Press the "down" arrow to enter the table
3. Select all
4. Copy
5. Paste
6. Undo

Crashes with 
linux-43all.git 'oldest' already, so it looks like this is not a regression after all. (AOO crashes as well.)

Xisco: any objections to adjust keywords accordingly?
Comment 10 Timur 2021-03-17 11:20:33 UTC
I change to Inherited from OO. No bibisect possible.
Comment 11 Commit Notification 2021-03-19 07:09:19 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e782937228479054336b564a4c34697a12530469

Related: tdf#133933 sw: fix assertion failure in the SwIndexReg dtor

It will be available in 7.2.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 12 Commit Notification 2021-03-22 09:37:32 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/982f8408286bc0519c2d9d73fb4e59142e03f00a

Related: tdf#133933 sw: show SwUndoTableCpyTable in doc model xml dump

It will be available in 7.2.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 13 Commit Notification 2021-03-23 07:56:08 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/140192fd5a2fc5e9d250d077d00bcebc014f7cbf

tdf#133933 sw: fix crash on undo of redlined pasted table

It will be available in 7.2.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 14 Miklos Vajna 2021-03-23 08:00:28 UTC
It may make sense to file a follow-up non-crash bug for the remaining problem (that is also interhited from OOo, as far as I see), that the reproducer steps no longer crash, but result in unexpected images.
Comment 15 Commit Notification 2021-03-23 09:55:35 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/b18bffb5b4948bbdaece90a68a4c9341ad9df084

Related: tdf#133933 sw: fix assertion failure in the SwIndexReg dtor

It will be available in 7.1.3.

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 16 Commit Notification 2021-03-23 14:16:16 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/ac1056f9d9a922660b84f20ea86e5aabbe0e8716

tdf#133933 sw: fix crash on undo of redlined pasted table

It will be available in 7.1.3.

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.