Bug 117159 - REPORTBUILDER - Trying to edit chart leads to crash of whole LO
Summary: REPORTBUILDER - Trying to edit chart leads to crash of whole LO
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.4.0 target:7.3.3
Keywords: haveBacktrace
: 124508 148110 (view as bug list)
Depends on:
Blocks: Database-Reports-Builder
  Show dependency treegraph
 
Reported: 2018-04-22 15:16 UTC by Robert Großkopf
Modified: 2022-04-01 09:55 UTC (History)
9 users (show)

See Also:
Crash report or crash signature: ["pcr::FormComponentPropertyHandler::impl_getPropertyValue_throw(rtl::OUString const &)"]


Attachments
Open the report "Geschlecht_Diagramm". Try to delete the chart. (32.58 KB, application/vnd.oasis.opendocument.database)
2018-04-22 15:16 UTC, Robert Großkopf
Details
bt with debug symbols (9.75 KB, text/plain)
2018-04-24 19:32 UTC, Julien Nabet
Details
bt with debug symbols (5.56 KB, text/plain)
2022-03-31 09:52 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 2018-04-22 15:16:22 UTC
Created attachment 141541 [details]
Open the report "Geschlecht_Diagramm". Try to delete the chart.

Open the attached database.
Open the report "Geschlecht_Diagramm" for editing.
Try to mark the chart for editing the chart.
LO crashes immediately.
It is impossible to delete the chart and create a new for testing. You have to delete the report and try it again.
Could be LO doesn't understand the SQL right way. But when creating the chart it will show the content. I have only deleted one row in chart-properties, which shouldn't be shown.

Have tested this with LO 4.4.7.2, after it fails with LO 6.0.4.1 and LO 5.4.6 on OpenSUSE 42.3 64bit rpm Linux.

Expected behavior: Chart could be edited, when marking it.
Comment 1 Drew Jensen 2018-04-22 19:15:14 UTC
Can confirm this using:
Version: 5.4.6.2
Build ID: 1:5.4.6-0ubuntu0.17.10.1
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group

and daily build from 6.0.5 and 6.1Alpha

This is not hsql specific. I converted the odb to firebird (with all items working) except the report with the chart. Tried editing that report (to replace the name of the view which I needed to shorten during the migration) and crash in both 6.0.5 and 6.1Alpha.
Comment 2 Xisco Faulí 2018-04-23 10:10:56 UTC
Also reproduced in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 3 Julien Nabet 2018-04-24 19:32:38 UTC
Created attachment 141610 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
I attached bt + a bit of gdb session
Comment 4 branestawm 2018-06-10 22:40:38 UTC
Also reproduced in LO 6.0.1.1 (TDF install) under OpenSuse 42.3 x64.
Comment 5 Joao Farias 2019-01-19 13:06:36 UTC
Not reproducible on

Version: 6.3.0.0.alpha0+
Build ID: 16fffbe869785dffeda9ae0d9f7c18a6559a2093
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-01-19_01:39:11
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded

The "Geschlecht_Diagramm" open for edition normally.
Comment 6 Robert Großkopf 2019-01-19 15:30:42 UTC
(In reply to Joao Farias from comment #5)
> Not reproducible on
> 
> The "Geschlecht_Diagramm" open for edition normally.

Did you really tried to edit the chart in this report? Opening the report for editing isn't the content of this bug.

Tested with
Version: 6.3.0.0.alpha0+
Build ID: 9eacb42ca081302faa62ac0f8c0af0adfa0e920b
CPU threads: 6; OS: Linux 4.12; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-12-18_01:17:19
Locale: de-DE (de_DE.UTF-8); UI-Language: en-US
Calc: threaded

If I open the report for editing and click on the chart (for editing the chart) LO crashes immediately.
Comment 7 Regina Henschel 2019-01-19 16:18:21 UTC
It crashes in Version: 6.3.0.0.alpha0+ (x64)
Build ID: be70ea5ee6a4222383b6324ee16bcde053df605d
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded
Comment 8 Julien Nabet 2019-04-02 19:36:10 UTC
*** Bug 124508 has been marked as a duplicate of this bug. ***
Comment 9 Robert Großkopf 2020-07-20 14:36:15 UTC
Had to copy all content of old reports to new reports, because it is impossible to delete the old charts, which aren't working any more.

Then I tried to create a separate report with a chart. It is possible to create a new report with a chart. It is also possible to create such a report, close Base and reopen it and trying to edit the chart.

Tested with LO 6.4.4.2 on OpenSUSE 15.1 64bit rpm Linux
... but when I test this with LO 7.0.0.2 I will get again a crash when I try to select the chart.

But see also: If a chart has been created the content of the chart will be shown only while the editor-window is opened. After saving the report and closing it the chart will never appear again.
Comment 10 Robert Großkopf 2021-07-14 05:56:13 UTC
Seems this bug disappeared and now has come back.

In LO 7.0.0.3 and all newer version a click with the mouse will immediately lead to crash of LO. With LO 6.4.7.2 I could click on the chart, also with LO 6.3.5.2. No crash will happen there.
Comment 11 Julien Nabet 2021-08-26 15:57:56 UTC
*** Bug 144101 has been marked as a duplicate of this bug. ***
Comment 12 Mike Kaganski 2021-08-31 12:29:44 UTC
The problem is that chart::InternalDataProvider does not implement css::beans::XPropertySet, which makes PropertyHandler::inspect (called from DataProviderHandler::inspect) to assign nullptr to the m_xComponent, and then dereferencing it inside DataProviderHandler::getPropertyValue segfaults.

The code in FormComponentPropertyHandler methods (e.g., impl_getPropertyValue_throw) seems to dereference m_xComponent unconditionally - that seems odd. But I have no idea which should be the fix - if the interface is needed (and then it should throw when the interface is null) or the dereference should be guarded by checks (because it may be null for a good reason) (and I am not working on this - just placing it here for whoever has the idea).
Comment 13 Mike Kaganski 2021-08-31 12:43:52 UTC
FTR: the crash happens at the time of updating properties panel; so closing the panel "workarounds" the crash at chart selection.
Comment 14 Mike Kaganski 2022-03-21 14:30:17 UTC
*** Bug 148110 has been marked as a duplicate of this bug. ***
Comment 15 Robert Großkopf 2022-03-21 16:14:35 UTC Comment hidden (obsolete)
Comment 16 Commit Notification 2022-03-31 09:35:17 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6c0dca63cd93c393b12bdbd2ce777c275a9279ff

Resolves: tdf#117159 don't crash with chart selected in database report edit

It will be available in 7.4.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 17 Caolán McNamara 2022-03-31 09:39:48 UTC
just bandaids really, but nevertheless doesn't crash for me now
Comment 18 Robert Großkopf 2022-03-31 09:51:29 UTC
Have tested this with 
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: aca4b5708207962935ca34adc70fed3a9ffb6074
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
(2022-03-31)

When taking a simple database with a chart it will work. If I take this special report "Geschlecht_Diagramm" the chart won't be shown and deleting the chart would lead to a crash.

Note: This crash will appear after solving bug 117162.
Comment 19 Julien Nabet 2022-03-31 09:52:40 UTC
Created attachment 179230 [details]
bt with debug symbols

Here's an updated bt (about an assertion) on pc Debian x86-64 with master sources updated today but BEFORE patch "Resolves: tdf#117159 don't crash with chart selected in database report edit"

Then I'll gonna update my local repo and give a new try.
Comment 20 Robert Großkopf 2022-03-31 09:54:17 UTC
Sorry, seems I have to wait a little bit for a newer version of daily build.
Comment 21 Julien Nabet 2022-03-31 09:59:58 UTC
After having updated locally (to retrieve "Resolves: tdf#117159 don't crash with chart selected in database report edit" patch), I confirm I don't reproduce the crash anymore and could delete the chart and save the report.

Just for info, I noticed some logs like:
warn:vcl:15034:15034:vcl/source/outdev/text.cxx:675: Alternate: Wrong assumption!
warn:vcl:15034:15034:vcl/source/outdev/text.cxx:675: Alternate: Wrong assumption!
warn:vcl:15034:15034:vcl/source/outdev/text.cxx:675: Alternate: Wrong assumption!
warn:legacy.osl:15034:15034:svx/source/svdraw/svdmrkv1.cxx:311: SdrMarkView::UndirtyMrkPnt(): Selected points on an object that is not a PolyObj!
warn:legacy.osl:15034:15034:svx/source/svdraw/svdmrkv1.cxx:311: SdrMarkView::UndirtyMrkPnt(): Selected points on an object that is not a PolyObj!
warn:vcl:15034:15034:vcl/source/outdev/text.cxx:675: Alternate: Wrong assumption!
warn:vcl:15034:15034:vcl/source/outdev/text.cxx:675: Alternate: Wrong assumption!
warn:vcl:15034:15034:vcl/source/outdev/text.cxx:675: Alternate: Wrong assumption!
warn:vcl:15034:15034:vcl/source/outdev/text.cxx:675: Alternate: Wrong assumption!
warn:legacy.osl:15034:15034:reportdesign/source/core/sdr/UndoEnv.cxx:549: OXUndoEnvironment::switchListening: how should I listen at a NULL object?
warn:vcl:15034:15034:vcl/source/outdev/text.cxx:675: Alternate: Wrong assumption!
warn:vcl:15034:15034:vcl/source/outdev/text.cxx:675: Alternate: Wrong assumption!
warn:vcl:15034:15034:vcl/source/outdev/text.cxx:675: Alternate: Wrong assumption!
warn:vcl:15034:15034:vcl/source/outdev/text.cxx:675: Alternate: Wrong assumption!
warn:chart2:15034:15034:chart2/source/model/filter/XMLFilter.cxx:564: Exception caught! com.sun.star.uno.RuntimeException message: "unsatisfied query for interface of type com.sun.star.chart2.data.XDatabaseDataProvider! at /home/julien/lo/libreoffice/include/com/sun/star/uno/Reference.hxx:83"
warn:chart2.tools:15034:15034:chart2/source/tools/WrappedPropertySet.cxx:137: found no inner property set to map to
warn:chart2:15034:15034:chart2/source/tools/LifeTime.cxx:117: This component is already disposed 
warn:vcl:15034:15034:vcl/source/outdev/text.cxx:675: Alternate: Wrong assumption!

Anyway, let's put this one to VERIFIED.
Comment 22 Commit Notification 2022-04-01 09:55:48 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/7c4d18cb87e871bef9d1be19a79ce63b5ff7dd7d

Resolves: tdf#117159 don't crash with chart selected in database report edit

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