Bug 156978 - Crash on load of ODT with headings/ToC if Navigator open
Summary: Crash on load of ODT with headings/ToC if Navigator open
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All Linux (All)
: high critical
Assignee: Not Assigned
URL:
Whiteboard: target:24.2.0
Keywords: bibisected, bisected, haveBacktrace
Depends on:
Blocks: Navigator GTK3
  Show dependency treegraph
 
Reported: 2023-08-28 20:11 UTC by Timur
Modified: 2023-08-30 18:29 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Test ODT (19.47 KB, application/vnd.oasis.opendocument.text)
2023-08-28 20:11 UTC, Timur
Details
gdbtrace.log (12.07 KB, text/x-log)
2023-08-28 20:12 UTC, Timur
Details
bt (4.64 KB, text/plain)
2023-08-29 13:07 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2023-08-28 20:11:34 UTC
Created attachment 189215 [details]
Test ODT

I see crash with LO 24.2 soon after the attached file with ToC is open. 
Not sure if a general issue or some problem with my build. 

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6c0f772aedf505460812b76403583bcde6b9a903
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Timur 2023-08-28 20:12:08 UTC
Created attachment 189216 [details]
gdbtrace.log
Comment 2 Timur 2023-08-28 20:29:10 UTC
Seems this is the culprit: https://gerrit.libreoffice.org/c/core/+/155881
Jim, please see.
Comment 3 Timur 2023-08-28 20:46:31 UTC
I also have this crash:
Open empty document, open Sidebar, click Styles deck.
Comment 4 Stéphane Guillou (stragu) 2023-08-28 21:59:20 UTC
Confirmed in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e7496f41562b75ea9732ca48f9aa0c07b69e424f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

I also get a crash on hovering the outline in the Navigator, with outline folding on.
Comment 5 Stéphane Guillou (stragu) 2023-08-28 22:04:16 UTC
No repro with gen VCL plugin, setting to Linux-only for now.
Comment 6 Julien Nabet 2023-08-29 13:03:47 UTC
Just for the record, on pc Debian x86-64 with master sources updated today + gtk rendering, I don't reproduce this (even with navigator opened and trying to hover each title).
Did I miss something?
Comment 7 Julien Nabet 2023-08-29 13:07:19 UTC
Created attachment 189227 [details]
bt

Sorry, when reopening the file, I could reproduce this.

It seems you need to have navigator enabled "before" opening the file.
Comment 8 Jim Raykowski 2023-08-29 17:46:46 UTC
Gtk3 doesn't like the get_sensitive call used to determine if a heading visibility in the document layout is different than what is indicated in the Navigator. 

if (pCnt->IsInvisible() != m_xTreeView->get_sensitive(*xEntry, -1))

I am unsure if it is a gtk3 bug or how get_sensitive is used here. Easy enough to go back to not showing Headings entries when they are not in the document layout instead of greying them out.
Comment 9 Commit Notification 2023-08-30 03:29:54 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/33ae7c12bbdf19b76ced472ca8aed6cf66477bbe

tdf#156978 SwNavigator: fix gtk3 crash on treeview get_sensitive

It will be available in 24.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.
Comment 10 Timur 2023-08-30 17:51:55 UTC
No crash, thanks.