Bug 143577 - Crash on image delete with "Show outline-folding buttons"
Summary: Crash on image delete with "Show outline-folding buttons"
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Jim Raykowski
URL:
Whiteboard: target:7.3.0 target:7.2.1
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Writer-Outline-Folding
  Show dependency treegraph
 
Reported: 2021-07-28 09:32 UTC by Timur
Modified: 2021-08-12 07:42 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
gdb.trace for fileopen (124.61 KB, text/plain)
2021-07-28 12:51 UTC, Timur
Details
gdb.trace for crash on delete (145.33 KB, text/plain)
2021-07-29 07:54 UTC, Timur
Details
bt with debug symbols (5.54 KB, text/plain)
2021-07-29 08:23 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2021-07-28 09:32:09 UTC
Open ODT attachment 169336 [details], mark image on 1st page and press Delete key.
Crash from 7.2. Regression.
Happens only with "Show outline-folding buttons" in Options-Writer-View.

commit d267c44c1503c7f93a83d60d3ec4a2bb6a1278f2
Date:   Fri May 14 06:18:42 2021 +0200
    source sha:6b09276d157abada74e1a4989700139167207778
    previous sha:6c8ca02c5935a800cff70f3c173319b454b63c41
author	Jim Raykowski <raykowj@gmail.com>	Sun Apr 18 23:00:38 2021 -0800
Outline folding experimental feature rehack
Comment 1 Julien Nabet 2021-07-28 09:55:18 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this with gen, kf5 or gtk3 rendering. I also enabled experimental features just to be sure, nothing too.

On which env are you? Would it be possible you retrieve a stacktrace? (see https://wiki.documentfoundation.org/QA/BugReport/Debug_Information)
Comment 2 Timur 2021-07-28 10:27:47 UTC
I have crash in Windows and Linux Mint 19 (based on Ubuntu 18.04) Gen and GTK3, also with LO 7.3+.
Seems to be the same as in bug 142733, not all reproduce.
Comment 3 Timur 2021-07-28 10:39:53 UTC Comment hidden (obsolete)
Comment 4 Timur 2021-07-28 12:51:42 UTC Comment hidden (obsolete)
Comment 5 gta 5 modded accounts 2021-07-28 14:30:24 UTC Comment hidden (spam)
Comment 6 Julien Nabet 2021-07-28 15:41:17 UTC
(In reply to Timur from comment #4)
> Created attachment 173915 [details]
> gdb.trace for fileopen
> 
> I tried to get backtrace in Linux, but debug crashes already on fileopen.

When you see ?? you can continue by typing "c" until you see something else than ? or ??.
I don't remember well but I think these are related with Java because of an obscure reason.
Comment 7 Timur 2021-07-29 07:54:58 UTC
Created attachment 173940 [details]
gdb.trace for crash on delete

I didn't see anything, debug build crashed when opening this ODT.
But I turned off Java and it opens it .
Here is gdb.trace for crash on delete.
Comment 8 Julien Nabet 2021-07-29 08:23:05 UTC
Created attachment 173941 [details]
bt with debug symbols

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

Sorry Timur, I had forgotten to do this:
- in Tools/Options/Advanced
Check "Enable experimental features"
- restart LO
- in Tools/Options/Writer/View
Check "Show  outline-folding buttons"
Comment 9 Julien Nabet 2021-07-29 08:30:37 UTC
Jim: I noticed 2 things
1) about the crash itself, it crashes because of this line:
207 aIdx.GetNode().GetTextNode()->GetAttrOutlineContentVisible(bVisible);
In the case of the bugtracker aIdx.GetNode() isn't a text node, it's a graph node.

2) I don't understand the adding of returns in https://cgit.freedesktop.org/libreoffice/core/commit/?id=6b09276d157abada74e1a4989700139167207778
I mean, in case we enter the return instructions, we never execute the instructions after the switch:

273     rReq.Done();
274 
275     //#i42732# - notify the edit window that from now on we do not use the input language
276     rTmpEditWin.SetUseInputLanguage( false );

Is it expected?
Comment 10 Jim Raykowski 2021-08-09 05:22:20 UTC
(In reply to Julien Nabet from comment #9)
> Jim: I noticed 2 things
> 1) about the crash itself, it crashes because of this line:
> 207 aIdx.GetNode().GetTextNode()->GetAttrOutlineContentVisible(bVisible);
> In the case of the bugtracker aIdx.GetNode() isn't a text node, it's a graph
> node.
> 

right, need to make sure the node is actually a text node. 

> 2) I don't understand the adding of returns in
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=6b09276d157abada74e1a4989700139167207778
> I mean, in case we enter the return instructions, we never execute the
> instructions after the switch:
> 
> 273     rReq.Done();
> 274 
> 275     //#i42732# - notify the edit window that from now on we do not use
> the input language
> 276     rTmpEditWin.SetUseInputLanguage( false );
> 
> Is it expected?

right again, returns should be breaks
Comment 11 Commit Notification 2021-08-11 05:11:22 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0ff5eb97b89f89e770d4397bf76f24fb7cd76b57

tdf#143577 check node is a text node before use as such

It will be available in 7.3.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 12 Xisco Faulí 2021-08-11 08:00:46 UTC
experimental feature, I don't think this should be high/major
Comment 13 Commit Notification 2021-08-11 13:06:46 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

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

tdf#143577 check node is a text node before use as such

It will be available in 7.2.1.

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 14 Timur 2021-08-12 06:55:32 UTC
I confirm there's no more crash. 
But I suspect on a regression with attachment from bug 142733. Instead of 64 pages, it opens thousands pages, regardless of "Show outline-folding buttons". 
I cannot confirm now without today's bibisect, but Jim please check.
Comment 15 Timur 2021-08-12 07:42:37 UTC
Sorry, that's different, present before, I'll check in other bug. 
I set this one as Verified.