Bug Hunting Session
Bug 106557 - Crash in: SfxItemSet::Get(unsigned short,bool)
Summary: Crash in: SfxItemSet::Get(unsigned short,bool)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.2.5.1 release
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:5.4.0 target:5.3.2 target:5.2.7
Keywords:
: 104266 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-03-15 19:34 UTC by puttheshot
Modified: 2017-03-21 15:25 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["SfxItemSet::Get(unsigned short,bool)"]


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description puttheshot 2017-03-15 19:34:44 UTC
This bug was filed from the crash reporting server and is br-dd72c410-b876-4b63-8893-d932db81c5fa.
=========================================

Open a blank LibreOffice Draw document.
Open the "Text Formatting" toolbar. Be sure it is positioned such that the "Line Spacing" tool is not displayed, but must be accessed via the expansion arrows on the left side of the toolbar.
Expand the toolbar using the expansion arrows and select the "Line Spacing" tool.
Crash.
Comment 1 Xisco Faulí 2017-03-15 20:15:56 UTC
Hello,
thanks for reporting.
I can reproduce it in

Version: 5.3.0.3
Build ID: 1:5.3.0~rc3-0ubuntu1~yakkety1.1
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; Layout Engine: new; 
Locale: es-ES (ca_ES.UTF-8); Calc: group

but not in 

Version: 5.4.0.0.alpha0+
Build ID: d3b5bd4a07a619db6bee1c39c32280ac3c620532
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

so it has been fixed in the meantime. Closing as RESOLVED WORKSFORME

Adding backportRequest:5:3
Comment 2 Xisco Faulí 2017-03-15 20:16:28 UTC
*** Bug 104266 has been marked as a duplicate of this bug. ***
Comment 3 Aron Budea 2017-03-15 21:45:23 UTC
The fixing commit is below. However, it's not a good backport candidate as stated by Maxim in [1]. This has to be fixed differently in 5.3, thus resetting status to NEW.

Maxim, do you think there could be a quick fix to this crash in 5.3?

https://cgit.freedesktop.org/libreoffice/core/commit/?id=81d4fbc0daa54889ccb09e6a3fadff9c70d99448
author		Maxim Monastirsky <momonasmon@gmail.com>	2017-02-12 20:14:48 (GMT)
committer	Maxim Monastirsky <momonasmon@gmail.com>	2017-02-12 21:56:29 (GMT)

"tdf#42029 Use a floating toolbar to show clipped items"

[1] https://bugs.documentfoundation.org/show_bug.cgi?id=42029#c44
Comment 4 Xisco Faulí 2017-03-15 22:21:59 UTC
Hi Aron,
Thanks you for bisecting the fix.
It seems the crash was introduced when the toolbar was reworked in commit d38f7b74daf91ad47557bf8eca8946fd0ad97cf8. Adding Caolán as well to see if it can be easily fixed and backported.
Comment 5 Maxim Monastirsky 2017-03-15 23:46:56 UTC
This is not fixed in master, e.g right click the toolbar and choose "Line Spacing", or run this BASIC macro:

dim document   as object
dim dispatcher as object
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(document, ".uno:LineSpacing", "", 0, Array())

Similarly this can't be a regression from the toolbar changes, because one could customize the toolbar or run the BASIC macro before that too.

In addition, SfxItemSet::Get crashes can happen in many places in the codebase, and for completely different reasons. So Bug 104266 is unrelated to this one, and should be reopened.
Comment 6 Commit Notification 2017-03-16 10:54:43 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ab10f03ec4dc7d5d7659fb62c59972c80221f733

Resolves: tdf#106557 don't crash on missing line spacing argument

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Caolán McNamara 2017-03-16 10:55:28 UTC
well, now it doesn't crash. Doesn't do anything, but doesn't crash. backports of that to 5-3 and 5-2 in gerrit
Comment 8 Commit Notification 2017-03-16 16:13:11 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d0b73f86c667e3637cc439868cb84e7182d98786&h=libreoffice-5-3

Resolves: tdf#106557 don't crash on missing line spacing argument

It will be available in 5.3.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2017-03-21 15:25:20 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5d1c37e416d856a07c3dc6a51381eabb13c467ae&h=libreoffice-5-2

Resolves: tdf#106557 don't crash on missing line spacing argument

It will be available in 5.2.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.