Bug 162180 - CRASH: copying table from document, or selecting it with 2 × Ctrl + A
Summary: CRASH: copying table from document, or selecting it with 2 × Ctrl + A
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: All All
: high critical
Assignee: Xisco Faulí
URL:
Whiteboard: target:25.2.0 target:24.8.0.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Writer-Tables-Select Cut-Copy Crash
  Show dependency treegraph
 
Reported: 2024-07-25 07:05 UTC by Xisco Faulí
Modified: 2024-07-26 11:03 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
simplified sample (10.68 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-07-25 10:28 UTC, Xisco Faulí
Details
macOS crash log when using the steps in comment #4 (124.23 KB, text/plain)
2024-07-25 14:43 UTC, Patrick (volunteer)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2024-07-25 07:05:30 UTC
Steps to reproduce:
1. Open attachment 93613 [details] from bug 74676
2. Select all
3. Copy

-> Crash

Reproduced in

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1b74b95bba6b84225248e5b7badf1de7ae401a79
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2024-07-25 07:06:34 UTC
Regression introduced by:

author	Adam Seskunas <adamseskunas@gmail.com>	2024-03-14 06:09:08 -0700
committer	Hossein <hossein@libreoffice.org>	2024-05-14 18:56:44 +0200
commit 3e7de6b1bc9f28ba6b69489e7f5c7dc645abc695 (patch)
tree 5abb3437f5f64cfa761eb70acacf9eb270fcabe6
parent 779a3b26edb31c3bb70e96e2cfa7ca17f53496ce (diff)
tdf#144576 Copy a table from Writer to plain text editor as a Matrix

Bisected with: bibisect-linux64-24.8
Comment 2 Xisco Faulí 2024-07-25 10:28:26 UTC
Created attachment 195494 [details]
simplified sample
Comment 3 Hossein 2024-07-25 10:33:01 UTC
(In reply to Xisco Faulí from comment #2)
> Created attachment 195494 [details]
> simplified sample
This is the output when copying the table in MS Word:

2010	2011
All Projects
Pending	
USA	West	Approved
	Central	Pending
	East	Approved
Comment 4 Stéphane Guillou (stragu) 2024-07-25 13:19:02 UTC
Repro comment 0 in:

Version: 24.8.0.1 (X86_64) / LibreOffice Community
Build ID: 6fd6cae02baed1e82d14ed2da1f2458092354dab
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

With attachment 195494 [details], I also get:

1. Place cursor in 2010
2. Ctrl + A twice

-> crash, without the need to copy.
Started at the same commit.
Comment 5 Patrick (volunteer) 2024-07-25 14:43:34 UTC
Created attachment 195501 [details]
macOS crash log when using the steps in comment #4
Comment 6 Patrick (volunteer) 2024-07-25 14:54:22 UTC
Does the following patch stop the crashing for anyone else?:

https://gerrit.libreoffice.org/c/core/+/171018
Comment 7 Patrick (volunteer) 2024-07-25 15:12:02 UTC
(In reply to Patrick Luby (volunteer) from comment #6)
> Does the following patch stop the crashing for anyone else?:
> 
> https://gerrit.libreoffice.org/c/core/+/171018

Nevermind. My patch just duplicates the https://gerrit.libreoffice.org/c/core/+/171007 patch.

Interestingly, on macOS I don't immediately see a crash. Instead, after I do the steps in comment #4 a few times, the crash doesn't occur until I close the document window when the document's selection is pushed to the system clipboard.
Comment 8 Commit Notification 2024-07-25 19:42:13 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/145c606d01e0ee673dee69271477155fef6aa81b

tdf#162180: GetTableBox might return nullptr

It will be available in 25.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 9 Stéphane Guillou (stragu) 2024-07-26 04:21:26 UTC
Thanks Xisco! Verified for comment 0 and comment 4 with own build:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: dc9486f2443fa52588b625c0a2a288bff56a7a45
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 10 Commit Notification 2024-07-26 11:03:05 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

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

tdf#162180: GetTableBox might return nullptr

It will be available in 24.8.0.2.

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.