Bug 144729 - Crash when trying to modify a style (gtk3 only)
Summary: Crash when trying to modify a style (gtk3 only)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All Linux (All)
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.3.0 target:7.2.2
Keywords: haveBacktrace, regression
: 144791 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-09-25 23:00 UTC by Jean-Baptiste Faure
Modified: 2021-09-29 11:39 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (11.17 KB, text/plain)
2021-09-26 08:31 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Baptiste Faure 2021-09-25 23:00:18 UTC
Description:
LibreOffice Writer crashes when I try to modify a style

Steps to Reproduce:
1. Open a new text document
2. Open the stylist and select a style
3. right click and choose "Modify"

Actual Results:
Crash

Expected Results:
No crash


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: a78190da867864485b5d0a91238616bd4090b5b5
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Ubuntu_20.04_x86-64
Calc: threaded

In the console, I get the following error messages:
(soffice:3939551): Gdk-WARNING **: 00:49:32.937: Couldn't map window 0x557f24f31440 as subsurface because its parent is not mapped.

(soffice:3939551): Gdk-WARNING **: 00:49:32.937: Couldn't map as window 0x557f24f31440 as popup because it doesn't have a parent

(soffice:3939551): GLib-GObject-CRITICAL **: 00:49:32.939: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed

Same crash in LO 7.2.3.0.0+
Version: 7.2.3.0.0+ / LibreOffice Community
Build ID: a928bab9fb68ff8fe45aca212b3c794799db31f6
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu_20.04_x86-64
Calc: threaded
Comment 1 Julien Nabet 2021-09-26 08:31:18 UTC
Created attachment 175277 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today and with gtk3 rendering only (not with kf5 or gen rendering), I could reproduce this.

Here's an even more straightforward to reproduce this.
- launch Writer
- Click Style menu
- Select Edit Style...
=> Crash
Comment 2 Julien Nabet 2021-09-26 08:33:58 UTC
I don't reproduce this with LO Debian package 7.2.1.2
Comment 3 Julien Nabet 2021-09-26 09:29:02 UTC
Here's a straightforward patch but is it the right way to fix this?

diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 435cd489d482..361503690f9b 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -824,6 +824,7 @@ bool FrameSelectorImpl::SelectedBordersEqual() const
 
 FrameSelector::FrameSelector()
 {
+    mxImpl.reset( new FrameSelectorImpl( *this ) );
 }
 
 void FrameSelector::SetDrawingArea(weld::DrawingArea* pDrawingArea)
Comment 4 Caolán McNamara 2021-09-26 14:51:30 UTC
I'd just move the line to before the set_size_request which triggers the crashign callback
Comment 5 Caolán McNamara 2021-09-26 14:52:15 UTC
https://gerrit.libreoffice.org/c/core/+/122631
Comment 6 Jean-Baptiste Faure 2021-09-26 15:01:13 UTC
(In reply to Caolán McNamara from comment #5)
> https://gerrit.libreoffice.org/c/core/+/122631

This patch fixes the crash for me. 

Best regards. JBF
Comment 7 Commit Notification 2021-09-26 16:11:53 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

tdf#144729 create FrameSelectorImpl before setting size request

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 8 Caolán McNamara 2021-09-26 16:13:02 UTC
done in trunk, backport to 7-2 in gerrit
Comment 9 Julien Nabet 2021-09-26 18:44:16 UTC
I confirm I don't reproduce the crash after your patch Caolán, thank you! :-)
Comment 10 Commit Notification 2021-09-27 04:53:11 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/2b96bf1fd8f4287a06b79dbec14114ca6c035731

tdf#144729 create FrameSelectorImpl before setting size request

It will be available in 7.2.3.

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 Commit Notification 2021-09-27 10:58:39 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-2-2":

https://git.libreoffice.org/core/commit/44dd4ea32bf4b21385f6eb8e96aa4115291adebf

tdf#144729 create FrameSelectorImpl before setting size request

It will be available in 7.2.2.

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 Jean-Baptiste Faure 2021-09-27 14:35:44 UTC
(In reply to Julien Nabet from comment #9)
> I confirm I don't reproduce the crash after your patch Caolán, thank you! :-)

Idem for me on both master and LO 7.2.3.0.0+. Thank you very much Caolán!

Best regards. JBF
Comment 13 Caolán McNamara 2021-09-29 11:39:49 UTC
*** Bug 144791 has been marked as a duplicate of this bug. ***