Create a Draw document, put there something (e.g., a line, or a rectangle), and execute the following Basic code: Sub AddToGallery oGalleryProvider = createUnoService("com.sun.star.gallery.GalleryThemeProvider") oTheme = oGalleryProvider.insertNewByName("_TestTheme1") oTheme.insertDrawingByIndex(ThisComponent, 0) End Sub => Crash
https://gerrit.libreoffice.org/c/core/+/172196
(In reply to Mike Kaganski from comment #0) > oTheme.insertDrawingByIndex(ThisComponent, 0) > ... > => Crash It should not crash... OTOH, it is not expected to pass the document as argument, since it requires a Drawing. Was to test, or?
(In reply to Cor Nouws from comment #2) It expects an XComponent, so any XComponent should do. And ThisComponent is a good option for the intended use, why not?
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0afb4cfc5ed1e926dfd287007c5a35585584daec tdf#162555: change rtl::Reference creation order It will be available in 25.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.
made a fresh build Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 2c9821d391c243ae83a408163f054d7a7a9a1daa CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded Added TestTheme as gallery theme. Could 'add' elements via the UI (find files, add, ok) But these were not visible. Closed and restarted. Opened Impress. Trying to open the Gallery reliably crashes. Have a backtrace.log available..
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/5d9181f479513826d0eedc49520ede7f05b6f7b5 tdf#162555: change rtl::Reference creation order It will be available in 24.8.1. 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.