Bug 134562 - Crash when focusing a figure using the Styles Inspector
Summary: Crash when focusing a figure using the Styles Inspector
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0
Keywords:
Depends on:
Blocks: Style-Inspector
  Show dependency treegraph
 
Reported: 2020-07-06 11:43 UTC by Heiko Tietze
Modified: 2020-07-30 16:08 UTC (History)
3 users (show)

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 Heiko Tietze 2020-07-06 11:43:38 UTC
Insert formatted dummy text (or something with an image) and click on the image. That crashes the app.
Comment 1 Telesto 2020-07-06 12:34:17 UTC
This is related to the styles Inspector I assume
Comment 2 Heiko Tietze 2020-07-06 13:47:29 UTC
SegFault in SwXTextRange::Impl SetMark() at StartListening(rMark.GetNotifier());
Comment 3 Shivam Kumar Singh 2020-07-06 19:16:07 UTC
(In reply to Heiko Tietze from comment #0)
> Insert formatted dummy text (or something with an image) and click on the
> image. That crashes the app.

I confirm that behaviour with 

Version: 7.1.0.0.alpha0+
Build ID: 5e9d1777db5c7f6ec6542818b056341cb90f6dd1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Calc: threaded

The issue is mainly in declaring instance of text::XTextRange in WriterInspectorTextPanel.cxx.
https://opengrok.libreoffice.org/xref/core/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx?r=4b8abb3d#132

Everytime this assumes that the current cursor point has some text node, and from that tries to extracts all the propertyset.
There should be condition check if TextNode exists or not.
Comment 4 Commit Notification 2020-07-09 12:44:28 UTC
Shivam Kumar Singh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4213a0b6929d188d5ec75a6b90e194c2b6ba9d11

tdf#134562 Added check for textnode

It will be available in 7.1.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 5 Xisco Faulí 2020-07-30 12:04:39 UTC
Hello Heiko,
Could you please verify your report is fixed in a recent master build ?
Comment 6 Heiko Tietze 2020-07-30 16:08:51 UTC
Yes, it's fixed.