Bug 148395 - CRASH: doubleclick on chart OLE Object
Summary: CRASH: doubleclick on chart OLE Object
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2022-04-05 11:31 UTC by Xisco Faulí
Modified: 2022-04-11 20:48 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (7.59 KB, text/plain)
2022-04-05 19:19 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2022-04-05 11:31:50 UTC
Steps to reproduce:
1. Open Writer
2. Insert - Object - OLE Object - LibreOffice Chart
3. Double click on the chart

-> Crash

Reproduced in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: b812150696c574aea0a173d11f178e8d458b1a3e
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í 2022-04-05 11:32:39 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=5a4b75dcb5abc2e925870614a28e1c2876df8ed9

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 2022-04-05 19:19:32 UTC
Created attachment 179331 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 3 Julien Nabet 2022-04-05 19:32:31 UTC
band-aid fix:
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 78ed71f1830e..74081d3a34ed 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -151,7 +151,9 @@ ChartModel::ChartModel( const ChartModel & rOther )
 
         Reference< util::XModifyListener > xListener;
         Reference< chart2::XTitle > xNewTitle = CreateRefClone< chart2::XTitle >()( rOther.m_xTitle );
-        rtl::Reference< ::chart::Diagram > xNewDiagram = new ::chart::Diagram( *rOther.m_xDiagram );
+        rtl::Reference< ::chart::Diagram > xNewDiagram;
+        if (rOther.m_xDiagram.is())
+            xNewDiagram  = new ::chart::Diagram( *rOther.m_xDiagram );
         rtl::Reference< ::chart::PageBackground > xNewPageBackground = new PageBackground( *rOther.m_xPageBackground );
         rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager; // does not implement XCloneable
         rtl::Reference< ::chart::NameContainer > xXMLNamespaceMap = new NameContainer( *rOther.m_xXMLNamespaceMap );
Comment 4 Julien Nabet 2022-04-05 20:31:02 UTC
I gave a try with this bandaid
https://gerrit.libreoffice.org/c/core/+/132591

I don't assign myself because there may be a better fix than this.
Comment 5 Commit Notification 2022-04-06 16:56:47 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#148395: CRASH: doubleclick on chart OLE Object (bandaid)

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 6 Julien Nabet 2022-04-06 16:58:23 UTC
Since the commit was only on 7.4, let's put this one to FIXED.
Comment 7 Commit Notification 2022-04-11 20:48:23 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#148395: sw: Add UItest

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.