Bug 150222 - REPORTBUILDER - Starting to set font for a text box crashes whole LO
Summary: REPORTBUILDER - Starting to set font for a text box crashes whole LO
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.4.0.0 beta1+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0 target:7.4.1
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2022-08-01 18:22 UTC by Robert Großkopf
Modified: 2022-08-10 07:08 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By: Samuel Mehrbrodt


Attachments
Open database file and report for editing. Try to change font for text box. (16.72 KB, application/vnd.oasis.opendocument.database)
2022-08-01 18:22 UTC, Robert Großkopf
Details
bt with debug symbols (7.82 KB, text/plain)
2022-08-02 18:20 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2022-08-01 18:22:14 UTC
Created attachment 181535 [details]
Open database file and report for editing. Try to change font for text box.

Open the attached database.
Open the report "Bericht" for editing, not executing.
Click on text box "=Birthdate".
If you don't see properties for this box on the right go to View → Properties.
Try to set the font to anything else than the default, which is shown: Press the button with the […] (3 dots).
LO crashes immediately.

This bug appears in LO 7.4.0.2 on OpenSUSE 15.3 64bit rpm Linux.
Version: 7.4.0.2 / LibreOffice Community
Build ID: 1512ce97d7ed39dce3121f7e15651fd8895f950e
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

Bug doesn't appear with
Version: 7.3.5.2 / LibreOffice Community
Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

So it's a regression.
Comment 1 Julien Nabet 2022-08-02 18:20:46 UTC
Created attachment 181553 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I got an assertion.
Comment 2 Hossein 2022-08-02 19:17:12 UTC
Not reproducible with 7.4.0.1

Version: 7.4.0.1 / LibreOffice Community
Build ID: 43e5fcfbbadd18fccee5a6f42ddd533e40151bcf
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Reproducible with the latest 7.5 dev master:

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 915f3959fe6b3e756b9797a9222b95d9b8c3d293
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

and also:

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 915f3959fe6b3e756b9797a9222b95d9b8c3d293
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 3 Hossein 2022-08-02 21:06:08 UTC
bibisected to:

commit c4cf2e82e8d0aaef9b1daedc033d6edf647e5284
Author: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Date:   Mon Jun 13 08:53:22 2022 +0200

    tdf#128150 Add OOXML import/export for "use background fill"
    
    and allow editing this fill property in area dlg
Comment 4 Julien Nabet 2022-08-04 15:56:20 UTC
Assertion can be fixed with:
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index b77f3f77a77b..9e1b4a3d27a1 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -119,6 +119,7 @@
 #include <svx/xflhtit.hxx>
 #include <svx/xflftrit.hxx>
 #include <svx/xsflclit.hxx>
+#include <svx/xfilluseslidebackgrounditem.hxx>
 
 #define ITEMID_FONT                     TypedWhichId<SvxFontItem>(XATTR_FILL_LAST + 1)
 #define ITEMID_FONTHEIGHT               TypedWhichId<SvxFontHeightItem>(XATTR_FILL_LAST + 2)
@@ -573,6 +574,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
         { XATTR_FILLBMP_POSOFFSETX,     true },
         { XATTR_FILLBMP_POSOFFSETY,     true },
         { XATTR_FILLBACKGROUND,     true },
+        { XATTR_FILLUSESLIDEBACKGROUND,     true },
 
         { SID_ATTR_CHAR_FONT, true },
         { SID_ATTR_CHAR_FONTHEIGHT, true },
@@ -643,6 +645,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
         new XFillBmpPosOffsetXItem,
         new XFillBmpPosOffsetYItem,
         new XFillBackgroundItem,
+        new XFillUseSlideBackgroundItem,
 
         new SvxFontItem(ITEMID_FONT),
         new SvxFontHeightItem(240,100,ITEMID_FONTHEIGHT),

but then we got:
warn:svl.items:232815:232815:svl/source/items/itempool.cxx:248: No point mapping a SID to itself, just put a 0 here in the SfxItemInfo array, at index 0
soffice.bin: /home/julien/lo/libreoffice/svl/source/items/itempool.cxx:249: SfxItemPool::SfxItemPool(const rtl::OUString &, sal_uInt16, sal_uInt16, const SfxItemInfo *, std::vector<SfxPoolItem *> *): Assertion `false' failed.
Unspecified Application Error
Comment 5 Julien Nabet 2022-08-04 16:17:08 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/137811
Comment 6 Julien Nabet 2022-08-05 06:51:13 UTC
Following comments on the patch, it's not the right thing to do.
I abandoned the patch + unassign myself.
Comment 7 Julien Nabet 2022-08-06 07:06:52 UTC
Just for information, Noel submitted this patch on gerrit:
https://gerrit.libreoffice.org/c/core/+/137867
Comment 8 Commit Notification 2022-08-06 07:10:35 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9a444884c3b221c9bd7b0aa4476c160921c7fc35

tdf#150222 reporbuilder, set font for a text box crashes

It will be available in 7.5.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 Commit Notification 2022-08-10 07:08:54 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#150222 reporbuilder, set font for a text box crashes

It will be available in 7.4.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.