Bug 167033 - assert failure when copy a shape with attached text box to clipboard in debug build
Summary: assert failure when copy a shape with attached text box to clipboard in debug...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:26.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-15 19:22 UTC by Regina Henschel
Modified: 2025-06-16 11:37 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2025-06-15 19:22:15 UTC
1. Start Writer, write some dummy text.
2. Insert a shape and anchor it to paragraph.
3. From context menu of the shape select "Add Text Box".
4. Enter some text into this box.
5. Click outside to deselect the shape
6. Select shape and use Ctrl+C to copy the shape to the clipboard (or any other way to copy to clipboard).

Assertion fails in line 1786 in
/xmloff/source/text/txtparae.cxx
assert(std::find(maDocumentNodeOrder.begin(), maDocumentNodeOrder.end(), index)
                   == maDocumentNodeOrder.end());

I see this in an own debug build
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e933a61be0e796de415e53645a44dbcc1e8200fe
CPU threads: 32; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded
Comment 1 Regina Henschel 2025-06-16 06:34:53 UTC
Copy works now, but pasting to Draw gives a failing assertion. => bug 167039.
Comment 2 Mike Kaganski 2025-06-16 07:44:11 UTC
https://gerrit.libreoffice.org/c/core/+/186546
Comment 3 Commit Notification 2025-06-16 11:37:15 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/801debfc365b4c5e6bf63324aaef82f449ddb443

tdf#167033: allow double processing of Writer shapes' text frame nodes

It will be available in 26.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.