Bug 152983 - crash in layout with chained text frames anchored in footer
Summary: crash in layout with chained text frames anchored in footer
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.3.2 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.6.0 target:7.5.5
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: File-Opening Crash-Report
  Show dependency treegraph
 
Reported: 2023-01-11 17:07 UTC by seinfeld@jsli.org
Modified: 2023-06-23 20:51 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
docx doc that is triggering a persistent crash when trying to open (270.36 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-01-11 17:08 UTC, seinfeld@jsli.org
Details
bt with debug symbols + console logs (20.43 KB, text/plain)
2023-01-11 20:11 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description seinfeld@jsli.org 2023-01-11 17:07:34 UTC
Description:
Usually it opens docs I've created with Word. But today, there is a doc that I created with Word that it won't open, continues to crash. I tried installing the newest build 7.4.3.2 but it didn't help. Other docx docs are opening fine.

The doc was created with Word for Mac 2011. 

Steps to Reproduce:
1.Open Libre Office
2.Open doc
3.Crash

Actual Results:
Crash

Expected Results:
Open doc


Reproducible: Always


User Profile Reset: No

Additional Info:
Other docs are opening, but not this one. This was created in the same way as the other ones, as far as I know. The other ones are in the same directory and not causing a crash, so I know it isn't a directory issue.

I resaved the doc from Word as "test doc" and it's still causing the crash. I will send this to you. Since it's not crashing for other docs, I'm not resetting my profile at this time.
Comment 1 seinfeld@jsli.org 2023-01-11 17:08:33 UTC
Created attachment 184598 [details]
docx doc that is triggering a persistent crash when trying to open
Comment 2 Julien Nabet 2023-01-11 20:11:16 UTC
Created attachment 184599 [details]
bt with debug symbols + console logs

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

I attached bt + console logs.
Comment 3 raal 2023-01-11 20:31:16 UTC
This seems to have begun at the below commit.
Adding Cc: to Michael Stahl ; Could you possibly take a look at this one?
Thanks
 f1d8f96bc30af74cb43934749ca2304d828bd66f is the first bad commit
commit f1d8f96bc30af74cb43934749ca2304d828bd66f
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Nov 17 01:14:39 2020 +0100

    source b9ef71476fd70bc13f50ebe80390e0730d1b7afb

https://gerrit.libreoffice.org/c/core/+/105810
Comment 4 Julien Nabet 2023-01-11 20:45:45 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/145364
Comment 5 Julien Nabet 2023-01-13 10:48:50 UTC
(In reply to Julien Nabet from comment #4)
> I gave a try with https://gerrit.libreoffice.org/c/core/+/145364

Patch is wrong and so has been abandoned.
=>uncc myself since I got no idea about root cause.
Comment 6 seinfeld@jsli.org 2023-05-28 20:06:42 UTC
Bug still occurring. New doc available that is triggering crash again. Common denominator seems to be docs created with Word for Mac 2011 (v 14.7.7 - 170905)
Comment 7 Commit Notification 2023-06-02 15:18:56 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/710af7d183370ca6fdd2699ea9f4550d9e53918a

tdf#152983 sw: layout: fix crash in SwContentFrame::Cut()

It will be available in 7.6.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 Michael Stahl (allotropia) 2023-06-02 15:24:45 UTC
i'm surprised to report that Julien's fix was basically the right one :)

usually things are rarely this simple, but when you have a footer containing an anchor of a text box and another text box is chained to the first one, it actually happens that a text frame is deleted while it's not connected to the page frame yet.
Comment 9 Commit Notification 2023-06-23 20:51:20 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#152983 sw: layout: fix crash in SwContentFrame::Cut()

It will be available in 7.5.5.

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.