Bug 161606 - Creating new gallery theme crashes LibreOffice Writer
Summary: Creating new gallery theme crashes LibreOffice Writer
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: x86-64 (AMD64) Windows (All)
: high critical
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0
Keywords: bibisectNotNeeded, haveBacktrace, regression
: 163415 163492 163767 (view as bug list)
Depends on:
Blocks: Gallery Crash
  Show dependency treegraph
 
Reported: 2024-06-17 02:09 UTC by Ming Hua
Modified: 2024-11-04 21:13 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
WinDbg backtrace for 24.8 beta1 (7.86 KB, text/plain)
2024-06-24 13:01 UTC, Stéphane Guillou (stragu)
Details
windbg stack trace at point of crash creating a New Theme from SB Gallery deck dialog (33.71 KB, text/plain)
2024-10-20 12:11 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ming Hua 2024-06-17 02:09:13 UTC
Description:
Using the "New..." button in the Gallery sidebar of LibreOffice Writer causes crash.

Steps to Reproduce:
1. Open Gallery sidebar in LibreOffice Writer.
2. Click the "New..." button at the bottom that creates a new gallery theme.
3. Click either "OK" or "Cancel" button to exit the dialog.

Actual Results:
Writer crashes.

Expected Results:
No crash, creates new theme (OK) or resume previous work (Cancel).


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.8.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 318462181c709ed29c01eb3239b4d600d7b82ecc
CPU threads: 12; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: CL threaded

Does not happen for 24.2 or 7.6, so possible regression.

I have "send crash reports" enabled but couldn't send due to network problems (the dialog after clicking "Send Report" says something like can not connect the server).  I do have dump files in my profile directory and can send them manually if needed.
Comment 1 Stéphane Guillou (stragu) 2024-06-17 02:43:52 UTC
No repro in:

Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 4; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win

Reproduced after clicking Cancel in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9b41d33a00763bebd5fc70787052222d35a98a52
CPU threads: 4; OS: Windows 11 (10.0 build 22631); UI render: Skia/Raster; VCL: win

No repro on Linux (tried gen and gtk3 VCL plugins).
Comment 2 Xisco Faulí 2024-06-17 09:47:22 UTC
No crash in 

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 567dbcf68711402736f65f4a0a47ef57549fe50f
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: x11
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 3 Julien Nabet 2024-06-24 10:36:15 UTC
On pc Debian x86-64 with master sources updated today + gen rendering, I don't reproduce this.

Would it be possible someone to retrieve a backtrace? https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#Windows:_How_to_get_a_backtrace
Comment 4 Stéphane Guillou (stragu) 2024-06-24 13:01:45 UTC
Created attachment 194927 [details]
WinDbg backtrace for 24.8 beta1

Version: 24.8.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 318462181c709ed29c01eb3239b4d600d7b82ecc
CPU threads: 4; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Comment 5 Stéphane Guillou (stragu) 2024-06-24 13:02:50 UTC
Oliver, wondering if it has anything to do with the new search feature?
Comment 6 Gabor Kelemen (allotropia) 2024-06-24 14:38:36 UTC
(In reply to Stéphane Guillou (stragu) from comment #5)
> Oliver, wondering if it has anything to do with the new search feature?

I can't reproduce this in bibisect-win-248, as this repo was updated on June 10th last:

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: bf02c5fa586d2ff7dbfac37d3ea0a07675efc15e
CPU threads: 14; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default

I see it in the nightly. The search feature is somewhat older than this.
Comment 7 Ming Hua 2024-09-28 02:47:45 UTC
Still reproducible with 24.8.2:
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 12; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: CL threaded

So what Xisco saw in https://bugs.documentfoundation.org/show_bug.cgi?id=162593#c1 should be this bug instead of 162593.
Comment 8 V Stuart Foote 2024-10-13 14:38:02 UTC
*** Bug 163415 has been marked as a duplicate of this bug. ***
Comment 9 Xisco Faulí 2024-10-17 18:38:59 UTC
*** Bug 163492 has been marked as a duplicate of this bug. ***
Comment 10 Julien Nabet 2024-10-20 07:57:51 UTC
On Windows 10 with master sources updated yesterday, I don't reproduce this.

Could someone else give it a try with a daily nightly build from 25.2 ?
Comment 11 Regina Henschel 2024-10-20 10:56:29 UTC
Still crashes for me with Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 341f3618866c622fa511f153a1b48621e04ddd17
CPU threads: 32; OS: Windows 11 X86_64 (10.0 build 22631); UI render: default; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded
Comment 12 V Stuart Foote 2024-10-20 11:38:56 UTC
Same crash for me as well with STR of dupe bug 163415

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 341f3618866c622fa511f153a1b48621e04ddd17
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 13 Mike Kaganski 2024-10-20 11:51:57 UTC
I suspect, that the problem is some existing content in other custom gallery panels. To check, possibly this would not fail in clean profile. We had some discussion with Cor in bug 162593 about that; but ultimately, even with Cor's profile, I wasn't able to repro. The blind attempts were, obviously, ineffective :-)

Yet, it would be great to be able to narrow down to a specific cause...
Comment 14 Regina Henschel 2024-10-20 11:59:54 UTC
(In reply to Mike Kaganski from comment #13)
> I suspect, that the problem is some existing content in other custom gallery
> panels. To check, possibly this would not fail in clean profile.

It crashes for me with a clean profile.
Comment 15 V Stuart Foote 2024-10-20 12:11:42 UTC
Created attachment 197167 [details]
windbg stack trace at point of crash creating a New Theme from SB Gallery deck dialog

(In reply to Mike Kaganski from comment #13)
> I suspect, that the problem is some existing content in other custom gallery
> panels. To check, possibly this would not fail in clean profile. We had some
> discussion with Cor in bug 162593 about that; but ultimately, even with
> Cor's profile, I wasn't able to repro. The blind attempts were, obviously,
> ineffective :-)
> 
> Yet, it would be great to be able to narrow down to a specific cause...

@Mike, *

If it helps, here is another stack trace, windbg with symbols on 24.8.2.1 and STR of creating a "New Theme" in a clean profile. Maybe something jumps out...
Comment 16 Mike Kaganski 2024-10-20 12:25:14 UTC
Could it be bisected?
Comment 17 Julien Nabet 2024-10-20 12:41:34 UTC
Mike: both stack traces show FilterEntry.

Taking a look at FilterEntry, it's just a struct containing an OUString
(see https://opengrok.libreoffice.org/xref/core/cui/source/inc/cuigaldlg.hxx?r=116b9d6d#44).

I don't think it'll help but at least we could simplify this and remove FilterEntry struct and just use OUString ?
Comment 18 V Stuart Foote 2024-10-20 13:07:19 UTC
(In reply to Mike Kaganski from comment #16)
> Could it be bisected?

Sorry, don't think I can. I don't/shouldn't build on Windows from source and not setup on Linux at the moment. So just can run windbg with the published community symbols... dumping the stack of attached soffice.bin process, or against a captured dump file.
Comment 19 Julien Nabet 2024-10-20 13:09:38 UTC
(In reply to Julien Nabet from comment #17)
> ...
> I don't think it'll help but at least we could simplify this and remove
> FilterEntry struct and just use OUString ?

Here's what I got in mind for simplifying this part:
https://gerrit.libreoffice.org/c/core/+/175257
Comment 20 Julien Nabet 2024-10-20 20:17:22 UTC
Mike: I could reproduce the pb on Windows 10 (with same bt) with master sources updated today before my patch after having:
1) added --enable-mergelibs=more in autogen.input
2) rebuilt the whole thing (so make clean && ./autogen.sh && make)

Then I updated my local repo to retrieve my patch (BTW, thank you for the review!) and I don't reproduce this.

Hope it wasn't just a coincidence, I wouldn't like to provide false hope.

Unless I get pb with it, I'll definitely keep the --enable-mergelibs=more option on my Windows laptop, I think it'll increase chance to reproduce the Windows related bugs.
Comment 21 Xisco Faulí 2024-10-21 07:46:58 UTC
Hi Julien,
I can't reproduce the issue anymore with

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: dd41459378bca78a18f32e61bfac77aa48fabb8d
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: threaded

So I believe it's not a coincidence and your patch fixed the issue. Thanks a lot for that.
Closing
Comment 22 Julien Nabet 2024-10-21 08:55:52 UTC
(In reply to Xisco Faulí from comment #21)
> ...
> So I believe it's not a coincidence and your patch fixed the issue. Thanks a
> lot for that.
> Closing

Happy to read this! :-) Thank you for the feedback!
Comment 23 V Stuart Foote 2024-10-21 11:46:12 UTC
Verified. No issue now with STR to create a new gallery.

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: dd41459378bca78a18f32e61bfac77aa48fabb8d
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 24 Ming Hua 2024-10-29 07:01:03 UTC
As the original reporter, I'd also like to confirm that this bug is fixed in the 20241027 daily build for me:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7ee9cc0f6fdf7d459817f87018bd2bde31c7aa1f
CPU threads: 12; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: CL threaded

Thanks Julien!
Comment 25 Julien Nabet 2024-11-04 21:13:43 UTC
*** Bug 163767 has been marked as a duplicate of this bug. ***