Bug 146848 - Assert pasting content in Debug build
Summary: Assert pasting content in Debug build
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0 target:7.3.2
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2022-01-18 23:38 UTC by Xisco Faulí
Modified: 2022-02-15 20:21 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
sample file (19.67 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-01-18 23:38 UTC, Xisco Faulí
Details
gdb bt (25.67 KB, text/plain)
2022-01-19 12:29 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2022-01-18 23:38:28 UTC
Created attachment 177642 [details]
sample file

Issue found by https://gerrit.libreoffice.org/c/core/+/128580

Steps to reproduce:
1. Open sw/qa/extras/ooxmlimport/data/groupshape-relsize.docx or the attached file in a debug build
2. Select all
3. Copy
4. Paste

-> Crash

Reproduced in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 5db574727f4564238a54159a1a0673eaa2884b69
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 1 Timur 2022-01-19 10:58:20 UTC
Since that is Debug build only, maybe Julien can confirm.
Comment 2 Xisco Faulí 2022-01-19 12:22:23 UTC
soffice.bin: /home/xisco/libreoffice/sw/source/core/txtnode/atrfld.cxx:713: void SwTextInputField::UpdateTextNodeContent(const rtl::OUString&): Assertion `IsFieldInDoc() && "<SwTextInputField::UpdateTextNodeContent(..)> - misusage as Input Field is not in document content."' failed.
Comment 3 Julien Nabet 2022-01-19 12:29:08 UTC
Created attachment 177646 [details]
gdb bt

On pc Debian x86-64 with master sources updated today, I could reproduce this.

I provided a bt + console logs even it can help.
Comment 4 Xisco Faulí 2022-01-19 15:55:49 UTC
sw/qa/extras/uiwriter/data/tdf77014.odt also hits the same assert
Comment 5 Commit Notification 2022-02-15 10:30:01 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/71e8a947753d359bd5b4d1174f4d6332eaf4a309

tdf#146848 sw: fix assert about input field in undo nodes

It will be available in 7.4.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 6 Commit Notification 2022-02-15 11:54:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

tdf#146848 sw: fix assert about input field in undo nodes

It will be available in 7.3.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 7 Commit Notification 2022-02-15 19:52:54 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2bf59e3b60a0d5c6ebcd4498f5038d6d2e86db62

tdf#146848: sw_uiwriter3: Add unittest

It will be available in 7.4.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 8 Xisco Faulí 2022-02-15 20:21:55 UTC
I guess we can close this.
@Michael, Thanks for fixing this issue!!