Bug 162136 - Crash when formatting data series in Histogram chart
Summary: Crash when formatting data series in Histogram chart
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: x86-64 (AMD64) All
: medium critical
Assignee: Julien Nabet
URL:
Whiteboard: target:25.2.0
Keywords: haveBacktrace, implementationError
Depends on:
Blocks: Crash Histogram-Chart
  Show dependency treegraph
 
Reported: 2024-07-22 03:00 UTC by Stéphane Guillou (stragu)
Modified: 2024-07-29 03:46 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
gdb bt (12.81 KB, text/plain)
2024-07-23 12:38 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2024-07-22 03:00:51 UTC
The histogram chart was implemented in 25.2 by 07ae0e5ada7cb595eb4815413a5bdd442c32a6ab for bug 82716.

Steps:
1. Open Calc
2. Enter some numbers in column A
3. Select column A
4. Insert > Chart > Histogram > OK
5. Double-click a bar
6. In Area tab, change fill colour and click "OK".

Result: crash.
Also happens if e.g. changing line style in "Borders" tab.
In console:

terminate called after throwing an instance of 'com::sun::star::beans::UnknownPropertyException'

Tested in own trunk build:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ba0e0093b0ed2816a18e54eef0a92220d7b04a4d
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 1 m_a_riosv 2024-07-22 10:42:17 UTC
Reproducible
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ba0e0093b0ed2816a18e54eef0a92220d7b04a4d
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 2 Julien Nabet 2024-07-23 12:38:08 UTC
Created attachment 195450 [details]
gdb bt

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 3 Julien Nabet 2024-07-23 13:02:36 UTC
I've submitted a patch about this here:
https://gerrit.libreoffice.org/c/core/+/170902

but there's another pb after this one (see comment of the patch).
Comment 4 Commit Notification 2024-07-25 08:49:21 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

Related tdf#162136: typo GapWidthSequence instead of GapwidthSequence

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.
Comment 5 Julien Nabet 2024-07-26 08:53:14 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/171065
Comment 6 Commit Notification 2024-07-26 13:05:29 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#162136: fix crash when formatting data series in Histogram chart

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.
Comment 7 Devansh Varshney 2024-07-27 13:23:18 UTC
I am actually unable to login in my gerrit -

The connection has timed out

An error occurred during a connection to auth.documentfoundation.org. 

So, adding my question here :)
------------------------------------------------------

I actually removed the PROP_HISTOGRAMCHARTTYPE_OVERLAP_SEQUENCE as I thought this is not needed for the Histogram as opposed to BarChart.

The crash was caused by an UnknownPropertyException being thrown when trying to access a property that didn't exist. In this case, the property was OverlapSequence?

Since we're inheriting the BarChart in the view to render the bars, we're essentially reusing the bar chart's rendering logic to display the histogram.

In a bar chart, the OverlapSequence property is used to control the overlap between bars. However, in a histogram, the bars are typically not overlapping, as they represent distinct bins of data.

Maybe I've answered myself.
Comment 8 Julien Nabet 2024-07-27 17:10:52 UTC
(In reply to Devansh Varshney from comment #7)
> ...
> In a bar chart, the OverlapSequence property is used to control the overlap
> between bars. However, in a histogram, the bars are typically not
> overlapping, as they represent distinct bins of data.
> 
> Maybe I've answered myself.

If you can make it work without using PROP_HISTOGRAMCHARTTYPE_OVERLAP_SEQUENCE, no pb to revert the last patch.
But let's wait you can access gerrit again so you can submit a patch.
Comment 9 Stéphane Guillou (stragu) 2024-07-29 03:46:09 UTC
Thanks Justin, fix verified with:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 233af54afb6e493c3538efe7c93d0f53f1b4c3ab
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded