Bug 154282 - editeng/source/items/frmitems.cxx:772: virtual bool SvxTextLeftMarginItem::QueryValue(uno::Any &, sal_uInt8) const: Assertion `false' failed.
Summary: editeng/source/items/frmitems.cxx:772: virtual bool SvxTextLeftMarginItem::Qu...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.6.0
Keywords: bibisectRequest, haveBacktrace
Depends on:
Blocks: Crash-Assert
  Show dependency treegraph
 
Reported: 2023-03-20 10:21 UTC by Buovjaga
Modified: 2023-05-17 14:03 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
GDB trace of assertion crash (21.89 KB, text/plain)
2023-03-20 10:21 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Buovjaga 2023-03-20 10:21:33 UTC
Created attachment 186087 [details]
GDB trace of assertion crash

Using a debug build,
1. In Writer, View - User interface - Tabbed compact

I did this also in Safe Mode and hit the assertion likewise. Same with all VCL UIs.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 926095df6b444866cd7e245b6a7befa6c2e29424
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 20 March 2023
Comment 1 Rafael Lima 2023-03-23 00:37:49 UTC
I can confirm this bug. Simply switching to Tabbed Compact crashes LO.

After that, LO Writer won't even start. To get it back working, I need to reset the user profile.

Other apps will open fine.

System info

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e845332e73f454cd863e0324241aa7f7d52c5164
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded
Comment 2 Rafael Lima 2023-03-23 00:48:25 UTC
Apparently this is related to .uno:LeftParaMargin command, that only exists in the Tabbed Compact and Tabbed user interfaces.

This is actually a control defined in:
/core/include/svx/ParaSpacingControl.hxx
/core/svx/source/sidebar/paragraph/ParaSpacingControl.cxx
Comment 3 Buovjaga 2023-03-23 06:30:49 UTC
(In reply to Rafael Lima from comment #1)
> I can confirm this bug. Simply switching to Tabbed Compact crashes LO.
> 
> After that, LO Writer won't even start. To get it back working, I need to
> reset the user profile.

Note that if you only changed Writer to Tabbed Compact, you can change it back by applying Standard "to all" in another application.
Comment 4 Jim Raykowski 2023-03-26 16:37:08 UTC
(In reply to Buovjaga from comment #3)
> Note that if you only changed Writer to Tabbed Compact, you can change it
> back by applying Standard "to all" in another application.
Good tip! I was using the --safe-mode method to reset the user profile myself.

There is another asser(false) at editeng/source/items/frmitems.cxx:1118 that I've had to comment out in debug builds to test Tabbed Compact.
Comment 5 Rafael Lima 2023-04-20 12:59:16 UTC
This one is a bit serious... there's a regression somewhere that caused this issue.

This issue is affecting gtk3, kf5 and gen. And is reproducible all the time.

Simply changing to the Tabbed UI in Writer will cause the issue:
1) On an empty profile, open Writer
2) Go to View - User Interface
3) Select Tabbed
4) Click OK -> CRASH

I'm basically unable to use Writer with the Tabbed UI since some time now in the master branch.

System info

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: df3719ee6419efbb64aab86779619373db2c14b7
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded
Comment 6 Rafael Lima 2023-04-26 21:09:06 UTC
Actually these two asserts that fail with the Tabbed UI were introduced in:

https://gerrit.libreoffice.org/c/core/+/147023

@Michael, can you please take a look?

Apparently the commands .uno:LeftParaMargin and .uno:RightParaMargin do not have a state set when Writer is started.
Comment 7 Justin L 2023-05-05 12:03:05 UTC
(In reply to Rafael Lima from comment #5)
> This one is a bit serious... there's a regression...
This is only an assert crash (a developer's I want to find out when this happens crash). It isn't a crash in bibisect - so it isn't a regression. It is just an annoyance for developers working on/testing the notebookbar.

But sure, a bug report about it is OK I guess.
Comment 8 Andreas Heinisch 2023-05-07 16:13:12 UTC
Gave it a try in https://gerrit.libreoffice.org/c/core/+/151472, but my insight in this part of the code base is limited. So maybe someone with more knowledge can give a review.
Comment 9 Commit Notification 2023-05-08 11:33:46 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

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

tdf#154282 - Prevent crash for LeftParaMargin and RightParaMargin

It will be available in 7.6.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 10 Commit Notification 2023-05-09 15:48:28 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#154282: sw_uiwriter3: Add unittest

It will be available in 7.6.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 11 Rafael Lima 2023-05-17 14:03:40 UTC
Thanks @Andreas for fixing this issue.

Verified with:

Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 00ede35a5241925d7060dd44fb81b71f7b03091c
CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded