Bug 157515 - Crash on clicking Reset when modifying Background presentation style (gtk3)
Summary: Crash on clicking Reset when modifying Background presentation style (gtk3)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: high normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:24.2.0 target:7.6.3 target:7.5.8
Keywords: bibisected, bisected, haveBacktrace, regression
: 134735 (view as bug list)
Depends on:
Blocks: ImpressDraw-Styles GTK3 Crash
  Show dependency treegraph
 
Reported: 2023-09-29 16:19 UTC by Stéphane Guillou (stragu)
Modified: 2024-04-22 23:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["SfxTabDialogController::LinkStubResetHdl(void*, weld::Button&)","libmergedlo.so","SfxTabDialogController::ResetHdl"]


Attachments
gdb backtrace with 24.2 alpha0+ debug build on Ubuntu 20.04 (179.50 KB, text/x-log)
2023-09-29 22:28 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2023-09-29 16:19:42 UTC
Steps:
1. Open Impress
2. Open Styles sidebar, go to Presentation Styles
3. Right-click on Background > Edit Style
4. Click on Reset

Result: the dialog gives no area fill options and is shrunk (that's bug 154493); clicking Reset crashes LO.

Started in 6.2. No crash with kf5 or gen VCL plugins.

Repro:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e9a0c97de95688b2f86bbb4dd8c823af5442401c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3

Versions 7.6.2.1 and 7.5.7.1
Crash report: https://crashreport.libreoffice.org/stats/crash_details/ee545791-ddbd-4753-951b-62f93ccc9ebc and https://crashreport.libreoffice.org/stats/crash_details/1c171935-0ced-4f7e-84e1-c903825a12f2
Crash signature: SfxTabDialogController::LinkStubResetHdl(void*, weld::Button&)

Versions 7.0.6.2 and 6.3.6.2
Crash reports: https://crashreport.libreoffice.org/stats/crash_details/2fd571ac-b966-4d58-99af-62b94e53ca61 and https://crashreport.libreoffice.org/stats/crash_details/6c383f1c-fdae-45bc-a14a-9d4338c0eff7
Crash signature:  libmergedlo.so

Version 6.2.0.3 
Crash report: https://crashreport.libreoffice.org/stats/crash_details/c23f90c0-8e8b-4416-a240-11a023a7e803
Crash signature:  SfxTabDialogController::ResetHdl 

... but can't reproduce with master of linux-64-6.2 bibisect repo, so marking as not bibisectable.
Comment 1 Stéphane Guillou (stragu) 2023-09-29 16:21:51 UTC
Ha turns out it had been reported before in bug 134735 but closed as "not our bug", thought to be an issue with Manjaro's build.
Comment 2 Stéphane Guillou (stragu) 2023-09-29 16:22:48 UTC
*** Bug 134735 has been marked as a duplicate of this bug. ***
Comment 3 Julien Nabet 2023-09-29 20:23:44 UTC
On pc Debian x86-64 with master sources updated today + gtk3 rendering, I don't reproduce this.

Now perhaps it could help (at least distribs like Manjaro) to have a backtrace?
(see https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU/Linux:_How_to_get_a_backtrace)
Comment 4 Stéphane Guillou (stragu) 2023-09-29 22:28:19 UTC
Created attachment 189899 [details]
gdb backtrace with 24.2 alpha0+ debug build on Ubuntu 20.04

Was updating my debug build and then forgot to come back to this.
With:

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

... it crashes as soon as the dialog is opened, with:

soffice.bin: /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/vcl/unx/gtk3/gtkinst.cxx:8916: int {anonymous}::GtkInstanceNotebook::remove_page(GtkNotebook*, std::u16string_view): Assertion `nPageNumber != -1 && "asked to remove page that doesn't exist"' failed.

Backtrace attached.
Comment 5 Caolán McNamara 2023-10-01 14:49:19 UTC
from the backtrace I can see that it comes from

sd/source/ui/dlg/prltempl.cxx SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg

and I see

    if( !SvtCJKOptions::IsAsianTypographyEnabled() )
        RemoveTabPage( "RID_SVXPAGE_PARA_ASIAN" );

    if (bBackground)
    {
...
        RemoveTabPage( "RID_SVXPAGE_PARA_ASIAN" );
...
    }

so to reproduce this, turn "off" tools, options, language/settings, languages, asian and then follow the steps in comment #1
Comment 6 Commit Notification 2023-10-01 19:11:11 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9150c8c09645be12849cdb5aad484ee344b7b313

Resolves: tdf#157515 only remove RID_SVXPAGE_PARA_ASIAN once

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 7 Caolán McNamara 2023-10-01 19:13:44 UTC
done in trunk, backports to 7-6 and 7-5 in gerrit
Comment 8 Stéphane Guillou (stragu) 2023-10-01 19:48:40 UTC
(In reply to Caolán McNamara from comment #5)
> [...]
> so to reproduce this, turn "off" tools, options, language/settings,
> languages, asian and then follow the steps in comment #1

Thanks for pointing that out, Caolán! And thanks for the quick fix.
For good measure: bibisected to 0e19bb2583717a0284e95f47b1094a5849dfeeaf.
Will verify in the next daily build.
Comment 9 Commit Notification 2023-10-02 06:08:00 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/63a93a388e191ef002abb746e8ac06f5a1592f6d

Resolves: tdf#157515 only remove RID_SVXPAGE_PARA_ASIAN once

It will be available in 7.6.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 10 Commit Notification 2023-10-02 11:39:35 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

Resolves: tdf#157515 only remove RID_SVXPAGE_PARA_ASIAN once

It will be available in 7.5.8.

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 Stéphane Guillou (stragu) 2024-04-22 23:50:34 UTC
Verified in:

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

Thanks Caolán!