Bug 164077 - CRASH: pasting content
Summary: CRASH: pasting content
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2024-11-28 09:14 UTC by Xisco Faulí
Modified: 2024-11-28 21:03 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (24.00 KB, application/msword)
2024-11-28 09:17 UTC, Xisco Faulí
Details
bt (7.41 KB, text/plain)
2024-11-28 21:00 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2024-11-28 09:14:08 UTC
Steps to reproduce:
1. Open attachment 72222 [details] from bug 58831
2. Select all 3 times
3. Copy
4. Paste

-> Crash

Reproduced in

Version: 25.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: fe7fe79feef8561d1cbd731d1bd53357eef902be
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: x11
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2024-11-28 09:14:54 UTC
Regression introduced by:

commit 3e9658a201f60dee95bd1bd8421b18bf8905c308	[log]
author	Oliver Specht <oliver.specht@cib.de>	Tue Nov 12 11:55:25 2024 +0100
committer	Thorsten Behrens <thorsten.behrens@allotropia.de>	Tue Nov 19 01:15:43 2024 +0100
tree e3ebfd0c4ff0d017c3db799bab5ed51d902b29b9
parent 43b9ab55a3b6ac1497bcadd6a71a5a133ece4d3d [diff]

tdf#163340 pasting paragraphs with lists changed again

Bisected with: bibisect-linux64-25.2
Comment 2 Xisco Faulí 2024-11-28 09:17:40 UTC
Created attachment 197834 [details]
sample file

another file affected by the same issue
Comment 3 m_a_riosv 2024-11-28 10:19:43 UTC
I cannot reproduce with either file.
Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 4 Xisco Faulí 2024-11-28 10:21:55 UTC
yep, is master only
Comment 5 m_a_riosv 2024-11-28 10:30:13 UTC
Sorry @Xisco I got the wrong version.
Reproducible with:
Version: 25.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: ec958b578bd01071b4a6061f57007df6fec93aee
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: default; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 6 Julien Nabet 2024-11-28 21:00:58 UTC
Created attachment 197843 [details]
bt

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 7 Julien Nabet 2024-11-28 21:03:38 UTC
With this straightforward (but perhaps naive and wrong) patch, it doesn't crash:
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 7df477784ba7..25e652f9627c 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -488,6 +488,8 @@ namespace
     {
         const SwTextNode* pTextNd = rPam.Start()->GetNode().GetTextNode();
         const SwTextNode* pEndTextNd = rPam.End()->GetNode().GetTextNode();
+        if (!pTextNd)
+            return false;
         bool bRet = pTextNd->IsInListFromStyle();
         //prefer list if it's a single paragraph with list from style
         if (pTextNd == pEndTextNd && bRet)