Bug 155231 - CRASH: with embedded OLE chart
Summary: CRASH: with embedded OLE chart
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:7.5.4
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2023-05-10 11:23 UTC by Xisco Faulí
Modified: 2023-05-15 08:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["chart::DiagramHelper::isCategoryDiagram(rtl::Reference<chart::Diagram> const &)"]


Attachments
bt with debug symbols (11.06 KB, text/plain)
2023-05-10 16:41 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2023-05-10 11:23:23 UTC
Steps to reproduce:
1. Open Writer
2. Insert - Object - OLE Object - Chart
3. Right Click on the chart - Data Ranges

-> Crash

reproduced in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8cd29dac4046e38bcf14784accab94ad1b4ac4d7
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2023-05-10 11:24:33 UTC
Regression introduced by:

author	Noel Grandin <noelgrandin@gmail.com>	2022-01-15 22:03:55 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2022-01-16 12:29:27 +0100
commit 5a4b75dcb5abc2e925870614a28e1c2876df8ed9 (patch)
tree 5fe1f89c70f9c6d90d3eea8f9eb9a68e91f2dec0
parent dab0d4e1f36faace21145a51733bd3a946992624 (diff)
use more concrete types in chart2, Diagram

Bisected with: bibisect-linux64-7.4

Adding Cc: To Noel Grandin
Comment 2 Julien Nabet 2023-05-10 16:41:06 UTC
Created attachment 187190 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I got an assertion.
Comment 3 Julien Nabet 2023-05-10 17:30:30 UTC
When fixed, a second bt:
#6  0x00007fc66e0b29b2 in rtl::Reference<chart::Diagram>::operator->() const (this=0x7ffce5f5c9b0) at include/rtl/ref.hxx:216
#7  0x00007fc66e1b00d8 in chart::DialogModel::getCategories() const (this=0x5590bff92f10) at /home/julien/lo/libreoffice/chart2/source/controller/dialogs/DialogModel.cxx:601
#8  0x00007fc66e1b0474 in chart::DialogModel::getCategoriesRange() const (this=0x5590bff92f10) at /home/julien/lo/libreoffice/chart2/source/controller/dialogs/DialogModel.cxx:637
#9  0x00007fc66e238141 in chart::DataSourceTabPage::updateControlsFromDialogModel() (this=0x5590c00c4030) at /home/julien/lo/libreoffice/chart2/source/controller/dialogs/tp_DataSource.cxx:316
Comment 4 Julien Nabet 2023-05-10 17:33:22 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/151642
Comment 5 Commit Notification 2023-05-10 19:44:22 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#155231: fix CRASH: with embedded OLE chart

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 6 Xisco Faulí 2023-05-11 07:47:56 UTC
There are other scenarios where LibreOffice crashes:

1. Open Writer
2. Insert - Object - OLE Object - Chart
3. Right Click on the chart - Data Ranges -> After Julen's fix the dialog is displayed.
4. Click OK

-> Crash
Comment 7 Noel Grandin 2023-05-11 09:31:21 UTC
(In reply to Xisco Faulí from comment #6)
> There are other scenarios where LibreOffice crashes:
> 


fixes for that https://gerrit.libreoffice.org/c/core/+/151664
Comment 8 Julien Nabet 2023-05-11 10:43:03 UTC
Thank you Noel for the help here!
Let's rather put this to NEW since it's the fix work is done by more than 1 person.
Comment 9 Commit Notification 2023-05-11 12:24:02 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/39848b5f802c539e5d630bb7905d3d9b8d966c26

tdf#155231 CRASH: with embedded OLE chart

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 Xisco Faulí 2023-05-11 13:35:11 UTC
Hi Noel, Julien,
Thanks for fixing this issue.
The original report is also reproduced in LibreOffice 7.5 but after all the refactoring in chart2, it's hard to know what needs to be backported.
Do you have any idea what needs to be backported ?
Comment 11 Noel Grandin 2023-05-14 12:47:10 UTC
cherry-pick to 7-5 is https://gerrit.libreoffice.org/c/core/+/151735
Comment 12 Xisco Faulí 2023-05-15 08:03:56 UTC
(In reply to Noel Grandin from comment #11)
> cherry-pick to 7-5 is https://gerrit.libreoffice.org/c/core/+/151735

thanks a lot!!
Comment 13 Commit Notification 2023-05-15 08:04:46 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#155231 CRASH: with embedded OLE chart

It will be available in 7.5.4.

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.