Bug 138596 - Applying Formatting Aids twice crashes the application
Summary: Applying Formatting Aids twice crashes the application
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
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.1.0.0.beta2 target:7.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2020-12-01 12:48 UTC by Heiko Tietze
Modified: 2020-12-03 08:39 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-12-01 12:48:37 UTC
In Tools > Options > Writer > Writing Aids, with or without change to the settings, applying the first time works well but the second time crashes the app.

It's caused by  sw/source/ui/config/optpage.cxx 

    const SwDocDisplayItem* pOldAttr = static_cast<const SwDocDisplayItem*>(
                        GetOldItem(GetItemSet(), FN_PARAM_DOCDISP));

where the old itemset is NULL.
Comment 1 Heiko Tietze 2020-12-01 12:55:34 UTC
Version: 7.2.0.0.alpha0+
Build ID: 3b594e1e50bdc2ad374321fa3da304596bb15ffa
CPU threads: 8; OS: Linux 5.9; UI render: default; VCL: kf5|gtk3|gen
Locale: de-DE (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 2 Buovjaga 2020-12-01 12:57:52 UTC
I repro on Win. Not yet in latest commit of Linux 7.1 repo (24 Nov).

Version: 7.2.0.0.alpha0+ (x64)
Build ID: f7e2f5bca938aa916830e07895d2da6820282055
CPU threads: 2; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: threaded
Comment 3 Xisco Faulí 2020-12-01 13:06:04 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=75bada928cf08d2afc6efe52ba99b45088bc9eec

author	Caolán McNamara <caolanm@redhat.com>	2020-11-16 15:54:04 +0000
committer	Caolán McNamara <caolanm@redhat.com>	2020-11-17 09:55:03 +0100
commit 75bada928cf08d2afc6efe52ba99b45088bc9eec (patch)
tree d1cf8f5c57394231bf89232fa0e24372e6da9cdd
parent f98735583a666e0f06d018cf93b79c74b7ce7b80 (diff)
tdf#137930 Apply button changes values to previous ones

Bisected with: bibisect-linux64-7.1

Adding Cc: to Caolán McNamara
Comment 4 Caolán McNamara 2020-12-01 15:59:54 UTC
formatting aids rather than writing aids I assume
Comment 5 Heiko Tietze 2020-12-01 16:03:00 UTC
(In reply to Caolán McNamara from comment #4)
> formatting aids rather than writing aids I assume

Sure ;-)
Comment 6 Buovjaga 2020-12-01 17:16:36 UTC
(In reply to Caolán McNamara from comment #4)
> formatting aids rather than writing aids I assume

Crashes with either one, I originally tested language settings - writing aids.
Comment 7 Commit Notification 2020-12-02 20:07:14 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/62c0d42e179476da5fcad02722a9d3c6f83ef258

tdf#138596 don't destroy SfxItemSet that are still in use

It will be available in 7.1.0.0.beta2.

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 Commit Notification 2020-12-02 20:08:30 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

tdf#138596 don't destroy SfxItemSet that are still in use

It will be available in 7.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 9 Caolán McNamara 2020-12-02 20:11:14 UTC
that seems to work
Comment 10 Commit Notification 2020-12-02 22:15:47 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#138596: sw: Add UItest

It will be available in 7.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 11 Heiko Tietze 2020-12-03 08:39:56 UTC
Thanks, Caolan!