Bug 159816 - Crash in drag-n-drop of multiple paragraphs with a bookmark
Summary: Crash in drag-n-drop of multiple paragraphs with a bookmark
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:24.8.0 target:24.2.2 target:7.6.6
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Bookmarks Drag-and-Drop Crash-BigPtrArray
  Show dependency treegraph
 
Reported: 2024-02-21 09:48 UTC by Mike Kaganski
Modified: 2024-02-22 10:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["SwNodes::RemoveNode(o3tl::strong_int%3Clong,Tag_SwNodeOffset%3E,o3tl::strong_int%3Clong,Tag_SwNodeOffset%3E,bool)","BigPtrArray::Index2Block(int) const"]


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2024-02-21 09:48:27 UTC
1. Create a new text document;
2. Press [Enter] 6 times (now it has 7 empty paragraphs);
3. While at the last paragraph: Insert->Bookmark->[Insert];
4. Select All (Ctrl+A);
5. Drag-and-drop to the very end of the document.

=> Crash.

Related, but different than bug 159813.
Comment 1 Commit Notification 2024-02-21 13:55:51 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159813, tdf#159816: Use correct copied PaM

It will be available in 24.8.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 2 Commit Notification 2024-02-21 20:16:46 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/344c18c8e54a4382f7b990b58ed4c083d0568f74

tdf#159813, tdf#159816: Use correct copied PaM

It will be available in 24.2.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.
Comment 3 Stéphane Guillou (stragu) 2024-02-22 02:53:00 UTC
Repro in 7.6 with signature "BigPtrArray::Index2Block(int) const": https://crashreport.libreoffice.org/stats/crash_details/83ee60d8-13cd-452e-9bde-aa7b3b15e575

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

In linux-64-releases bibisect repo, first version affected was libreoffice-7.2.2.1

With linux-64-7.2, bibisected to [81621057eed4d1e2a48f14bf911bd5e6686b4cb3] which is 8885bdf2f564bb7b56181c50baf39ff99d551ec9 which is a cherrypick of:

commit 4bf04dea9afb30a9395e80b07a81d1908937ee8b
author	Michael Stahl 	Fri Aug 27 14:38:18 2021 +0200
committer	Michael Stahl 	Fri Aug 27 17:09:29 2021 +0200
tdf#128106 sw: copy bookmarks at start if whole node is copied
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121147

Thanks for fixing it, Mike!
Comment 4 Commit Notification 2024-02-22 10:19:12 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

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

tdf#159813, tdf#159816: Use correct copied PaM

It will be available in 7.6.6.

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.