Created attachment 141543 [details] Execute the report "charttest" - no charts were shown. Open the attached database. Execute the report "charttest". If you do this with LO 5.3.7.2 and versions before two charts will be shown. LO 5.4.0.3 and all newer versions up to LO 6.0.4.1 won't show the chart. Its the same buggy behavior as it has been fixed since LO 4.3.6. Tested with OpenSUSE 42.3 64bit rpm Linux
Confirmed with both Version: 6.1.0.0.alpha0+ Build ID: 66c02d16dd078613e754dcc775f366413fad13f0 and Version: Version: 6.0.5.0.0+ Build ID: e58dc868a6ac0df24adf88f32f90a9e4fc6fdae9 The report does not display the chart and if you edit the odt file you find the chart objects are in the file, but display no parameter information. Chart type dialog is blank, Data range is all empty controls. I see a number of open issues dealing with charts in reports ie. https://bugs.documentfoundation.org/show_bug.cgi?id=87012 This looks perhaps different.
Created attachment 141548 [details] chart type dialog from generated odt file.
Regression introduced by: author Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> 2017-02-26 22:48:06 +0100 committer Tomaž Vajngerl <quikee@gmail.com> 2017-04-04 13:39:29 +0000 commit 9009663deb8f0862f419fd99bf0b761c7f923eff (patch) tree ea25976de0919f9d2161037d83be0eace4c1070b parent 1931b5b01c6fdaa204d26ec4b9675dad16373cf2 (diff) tdf#83257 [API-CHANGE] Pivot chart implementation This is a squashed commit of the pivot chart implementation. Bisected with: bibisect-linux-64-5.4 Adding Cc: to Tomaž Vajngerl
*** Bug 117313 has been marked as a duplicate of this bug. ***
Steps to Reproduce: 1. In LibreOffice Base create a table with some data (two fields at least) or a query. 2. Create a report with the ReportBuilder. 3. Insert a chart in the report body and choose the source data for the chart (the table or the query of point 1). 4. From menu: Edit -> Run the Report (at menu bottom). 5. It's expected the chart is OK in a Writer document. 6. Save the report. 7. Close the report. 8. Open the report from Base main screen to check that now there isn't any chart visible. 9. Edit the report. 10. Once more from menu: Edit -> Run the Report (it's in menu bottom) to check that there isn't any chart visible as well. 11. Doubleclick on the chart and select data range (Menu -> Format -> data ranges (at menu bottom)) to check now the data fields are missing. 12. Another check: from chart properties menu, choose match master fields and check that fields from chart data source are missing. Because the chart is displayed correctly before saving the report, I think the issue could be in saving the report or in reading the chart data when the report is executed after it's been saved.
On Win10 with master sources updated today, I could reproduce this. I noticed these specific logs: warn:legacy.osl:7248:34908:chart2/source/model/filter/XMLFilter.cxx:576: Exception caught! warn:chart2:7248:34908:chart2/source/view/main/ChartView.cxx:1405: DBG_UNHANDLED_EXCEPTION in void __cdecl chart::`anonymous-namespace'::lcl_setDefaultWritingMode(const class std::shared_ptr<class chart::DrawModelWrapper> &,class chart::ChartModel &) exception: com.sun.star.beans.UnknownPropertyException message: PageStyle context: class reportdesign::OReportDefinition warn:chart2:7248:34908:chart2/source/view/main/ChartView.cxx:495: com.sun.star.lang.IndexOutOfBoundsException warn:chart2.tools:7248:34908:chart2/source/tools/WrappedPropertySet.cxx:137: found no inner property set to map to
Lionel: noticing warn:legacy.osl:151246:151246:embeddedobj/source/commonembedding/persistence.cxx:209: Consider implementing interface XInitialization to avoid duplicate construction, I tried to implement this. + warn:legacy.osl:152196:152196:chart2/source/model/filter/XMLFilter.cxx:574: Exception caught! I noticed this was due to: 301 m_xDatabaseDataProvider.set(m_xModel->getDataProvider(),uno::UNO_QUERY_THROW); 302 if ( !m_xDatabaseDataProvider->getActiveConnection().is() ) 303 throw uno::Exception("no active connection", nullptr); See https://opengrok.libreoffice.org/xref/core/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx?r=f13c6ad5#303 I could confirm this when moving this block some lines after in following "if" "if ( !sCommand.isEmpty() )" Indeed, when creating a report with just by default chart, it doesn't create a command (since there's no SQL). However, when reopening the report, instead of 1 graph, I had 3. So I thought about implementing "XInitialization" and retrieving the connection. Here's the beginning: diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx index 436550c9aa3f..1e4d9d663d4b 100644 --- a/reportdesign/inc/ReportDefinition.hxx +++ b/reportdesign/inc/ReportDefinition.hxx @@ -32,6 +32,7 @@ #include <com/sun/star/frame/XTitle.hpp> #include <com/sun/star/frame/XTitleChangeBroadcaster.hpp> #include <com/sun/star/frame/XUntitledNumbers.hpp> +#include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XTypeProvider.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> @@ -65,6 +66,7 @@ namespace reportdesign , css::document::XDocumentEventBroadcaster , css::lang::XServiceInfo , css::frame::XModule + , css::lang::XInitialization , css::lang::XUnoTunnel , css::util::XNumberFormatsSupplier , css::frame::XTitle @@ -171,6 +173,10 @@ namespace reportdesign /** this function is called upon disposing the component */ virtual void SAL_CALL disposing() override; + + // css::lang::XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override; + public: explicit OReportDefinition(css::uno::Reference< css::uno::XComponentContext > const & _xContext); explicit OReportDefinition(css::uno::Reference< css::uno::XComponentContext > const & _xContext diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 296419e4f2db..aed2ec364a83 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -587,6 +587,17 @@ OReportDefinition::~OReportDefinition() dispose(); } } +void SAL_CALL OReportDefinition::initialize( const uno::Sequence< uno::Any >& rArguments ) +{ + fprintf(stderr, "TODO OReportDefinition::initialize\n"); + uno::Reference<sdbc::XConnection> xCon(getContext()->getValueByName("ActiveConnection") ,uno::UNO_QUERY); + setActiveConnection(xCon); + ::comphelper::NamedValueCollection aArguments( rArguments ); + uno::Sequence< beans::PropertyValue > aProps; + aArguments >>= aProps; + + attachResource("", aProps); +} The pb is I don't know how to retrieve connection in brand new "OReportDefinition::initialize" method. Any idea?
*** Bug 115410 has been marked as a duplicate of this bug. ***
Let's give it a bit more priority since: - it's a regression - it blocks a useful feature (at least for those who use Base) - there are duplicates - it blocks testing other bugs
Just for info, here are the console logs I got, just opening the file: warn:legacy.osl:100678:100678:dbaccess/source/core/dataaccess/ModelImpl.cxx:771: ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage from! warn:legacy.osl:100678:100678:dbaccess/source/core/dataaccess/ModelImpl.cxx:771: ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage from! warn:legacy.osl:100678:100678:dbaccess/source/core/dataaccess/ModelImpl.cxx:771: ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage from! warn:dbaccess:100678:100678:dbaccess/source/filter/xml/xmlComponent.cxx:67: unknown attribute http://www.w3.org/1999/xlink xlink:type value=simple warn:dbaccess:100678:100678:dbaccess/source/filter/xml/xmlComponent.cxx:67: unknown attribute http://www.w3.org/1999/xlink xlink:type value=simple warn:dbaccess:100678:100678:dbaccess/source/filter/xml/xmlComponent.cxx:67: unknown attribute http://www.w3.org/1999/xlink xlink:type value=simple warn:dbaccess:100678:100678:dbaccess/source/filter/xml/xmlComponent.cxx:67: unknown attribute http://www.w3.org/1999/xlink xlink:type value=simple warn:dbaccess:100678:100678:dbaccess/source/filter/xml/xmlTable.cxx:78: unknown attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0 db:command value=SELECT "Geschlecht" || ' ' || LEFT( "Altersklasse", CHAR_LENGTH ( "Altersklasse" ) - 2 ) "Altersklasse", COUNT( DISTINCT ( "ID" ) ) "Anzahl", "Geschlecht", "Altersklasse" "Altersklasse_sort" FROM "Meldung" GROUP BY "Altersklasse_sort", "Geschlecht" ORDER BY "Geschlecht", "Altersklasse_sort" warn:dbaccess:100678:100678:dbaccess/source/filter/xml/xmlQuery.cxx:56: unknown attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0 db:name value=Altersklasse_Anzahl_Geschlecht warn:dbaccess:100678:100678:dbaccess/source/filter/xml/xmlTable.cxx:78: unknown attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0 db:command value=SELECT "Geschlecht", CASE WHEN "Geschlecht" = 'w' THEN 'weiblich' ELSE 'männlich' END "Geschlecht_vollständig", COUNT( "ID" ) "Anzahl" FROM "Teilnehmer" GROUP BY "Geschlecht", "Geschlecht_vollständig" warn:dbaccess:100678:100678:dbaccess/source/filter/xml/xmlQuery.cxx:56: unknown attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0 db:name value=Bericht_Geschlecht warn:dbaccess:100678:100678:dbaccess/source/filter/xml/xmlTable.cxx:78: unknown attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0 db:command value=SELECT "Sportalter".*, CASE WHEN "Sportalter" > 19 THEN CEILING( "Sportalter" / 10 ) * 10 ELSE "Sportalter" - MOD( "Sportalter", 2 ) END "Altersklasse" FROM "Sportalter" warn:dbaccess:100678:100678:dbaccess/source/filter/xml/xmlQuery.cxx:56: unknown attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0 db:name value=Meldung warn:dbaccess:100678:100678:dbaccess/source/filter/xml/xmlTable.cxx:78: unknown attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0 db:command value=SELECT "Teilnehmer"."ID", "Teilnehmer"."Vorname", "Teilnehmer"."Nachname", "Teilnehmer"."Geburtstag", "Teilnehmer"."Geschlecht", "Sportart"."Sportart", EXTRACT( YEAR FROM CURRENT_DATE ) - EXTRACT( YEAR FROM "Geburtstag" ) "Sportalter" FROM "Teilnehmer" LEFT JOIN "rel_Teilnehmer_Sportart" ON "rel_Teilnehmer_Sportart"."ID_Teilnehmer" = "Teilnehmer"."ID" LEFT JOIN "Sportart" ON "rel_Teilnehmer_Sportart"."ID_Sportart" = "Sportart"."ID" warn:dbaccess:100678:100678:dbaccess/source/filter/xml/xmlQuery.cxx:56: unknown attribute urn:oasis:names:tc:opendocument:xmlns:database:1.0 db:name value=Sportalter then the logs I got when opening the report: warn:svl.items:100678:100678:svl/source/items/itempool.cxx:358: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty. warn:legacy.osl:100678:100678:embeddedobj/source/commonembedding/persistence.cxx:212: Consider implementing interface XInitialization to avoid duplicate construction warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:363: OUnoObject::EndListening: not listening currently! warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:346: OUnoObject::StartListening: already listening! warn:reportdesign:100678:100678:reportdesign/source/filter/xml/xmlGroup.cxx:160: unknown attribute http://openoffice.org/2005/report rpt:sort-expression value=Geschlecht warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:363: OUnoObject::EndListening: not listening currently! warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:346: OUnoObject::StartListening: already listening! warn:reportdesign:100678:100678:reportdesign/source/filter/xml/xmlCell.cxx:77: unknown attribute urn:oasis:names:tc:opendocument:xmlns:office:1.0 office:value-type value=string warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:363: OUnoObject::EndListening: not listening currently! warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:346: OUnoObject::StartListening: already listening! warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:363: OUnoObject::EndListening: not listening currently! warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:346: OUnoObject::StartListening: already listening! warn:reportdesign:100678:100678:reportdesign/source/filter/xml/xmlCell.cxx:77: unknown attribute urn:oasis:names:tc:opendocument:xmlns:office:1.0 office:value-type value=string warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:363: OUnoObject::EndListening: not listening currently! warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:346: OUnoObject::StartListening: already listening! warn:xmloff:100678:100678:xmloff/source/draw/shapeimport.cxx:441: unknown attribute http://www.w3.org/1999/xlink xlink:type value=simple warn:xmloff:100678:100678:xmloff/source/draw/shapeimport.cxx:441: unknown attribute http://www.w3.org/1999/xlink xlink:show value=embed warn:xmloff:100678:100678:xmloff/source/draw/shapeimport.cxx:441: unknown attribute http://www.w3.org/1999/xlink xlink:actuate value=onLoad warn:xmloff:100678:100678:xmloff/source/draw/shapeimport.cxx:441: unknown attribute urn:oasis:names:tc:opendocument:xmlns:text:1.0 text:anchor-type value=paragraph warn:legacy.osl:100678:100678:reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx:337: No document handler available! warn:chart2:100678:100678:chart2/source/model/filter/XMLFilter.cxx:464: failed to instantiate com.sun.star.comp.report.ImportDocumentHandler com.sun.star.uno.Exception message: no delegatee and no model /home/julien/lo/libreoffice/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx:339 warn:legacy.osl:100678:100678:reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx:337: No document handler available! warn:chart2:100678:100678:chart2/source/model/filter/XMLFilter.cxx:464: failed to instantiate com.sun.star.comp.report.ImportDocumentHandler com.sun.star.uno.Exception message: no delegatee and no model /home/julien/lo/libreoffice/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx:339 warn:legacy.osl:100678:100678:reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx:337: No document handler available! warn:chart2:100678:100678:chart2/source/model/filter/XMLFilter.cxx:464: failed to instantiate com.sun.star.comp.report.ImportDocumentHandler com.sun.star.uno.Exception message: no delegatee and no model /home/julien/lo/libreoffice/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx:339 warn:xmloff.chart:100678:100678:xmloff/source/chart/contexts.cxx:141: SchXMLBodyContext instantiated with no <office:chart> element warn:xmloff:100678:100678:xmloff/source/chart/SchXMLChartContext.cxx:388: unknown attribute http://www.w3.org/1999/xlink xlink:type value=simple warn:xmloff:100678:100678:xmloff/source/draw/shapeimport.cxx:355: unknown element http://openoffice.org/2005/report rpt:detail warn:i18nlangtag:100678:100678:i18nlangtag/source/languagetag/languagetag.cxx:1648: LanguageTag::getRegionFromLangtag: pRegionT==NULL for 'eo-EO' warn:i18nlangtag:100678:100678:i18nlangtag/source/languagetag/languagetag.cxx:1648: LanguageTag::getRegionFromLangtag: pRegionT==NULL for 'eo-EO' warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:363: OUnoObject::EndListening: not listening currently! warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:346: OUnoObject::StartListening: already listening! warn:reportdesign:100678:100678:reportdesign/source/filter/xml/xmlCell.cxx:77: unknown attribute urn:oasis:names:tc:opendocument:xmlns:office:1.0 office:value-type value=string warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:363: OUnoObject::EndListening: not listening currently! warn:legacy.osl:100678:100678:reportdesign/source/core/sdr/RptObject.cxx:346: OUnoObject::StartListening: already listening! warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family paragraph with mismatching mapper ! P25SvXMLExportPropertyMapper 30XMLTextExportPropertySetMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family table-column with mismatching mapper ! P25SvXMLExportPropertyMapper 25SvXMLExportPropertyMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family table-row with mismatching mapper ! P25SvXMLExportPropertyMapper 25SvXMLExportPropertyMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family table-cell with mismatching mapper ! P25SvXMLExportPropertyMapper 28XMLShapeExportPropertyMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family graphic with mismatching mapper ! P25SvXMLExportPropertyMapper 28XMLChartExportPropertyMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family paragraph with mismatching mapper ! P25SvXMLExportPropertyMapper 28XMLChartExportPropertyMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family text with mismatching mapper ! P25SvXMLExportPropertyMapper 28XMLChartExportPropertyMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family paragraph with mismatching mapper ! P25SvXMLExportPropertyMapper 30XMLTextExportPropertySetMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family table-column with mismatching mapper ! P25SvXMLExportPropertyMapper 25SvXMLExportPropertyMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family table-row with mismatching mapper ! P25SvXMLExportPropertyMapper 25SvXMLExportPropertyMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family table-cell with mismatching mapper ! P25SvXMLExportPropertyMapper 28XMLShapeExportPropertyMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family graphic with mismatching mapper ! P25SvXMLExportPropertyMapper 28XMLChartExportPropertyMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family paragraph with mismatching mapper ! P25SvXMLExportPropertyMapper 28XMLChartExportPropertyMapper warn:xmloff:100678:100678:xmloff/source/style/impastpl.cxx:380: Adding duplicate family text with mismatching mapper ! P25SvXMLExportPropertyMapper 28XMLChartExportPropertyMapper warn:chart2:100678:100678:chart2/source/model/filter/XMLFilter.cxx:572: Exception caught! com.sun.star.uno.RuntimeException message: unsatisfied query for interface of type com.sun.star.chart2.data.XDatabaseDataProvider! /home/julien/lo/libreoffice/include/com/sun/star/uno/Reference.hxx:83 warn:chart2.tools:100678:100678:chart2/source/tools/WrappedPropertySet.cxx:137: found no inner property set to map to warn:sal.osl:100678:100678:sal/osl/unx/module.cxx:155: dlopen(/home/julien/lo/libreoffice/instdir/program/libjava_gcc3.so, 257): /home/julien/lo/libreoffice/instdir/program/libjava_gcc3.so: cannot open shared object file: No such file or directory warn:sal.osl:100678:100678:sal/osl/unx/module.cxx:155: dlopen(/home/julien/lo/libreoffice/instdir/program/libgcc3_java.so, 257): /home/julien/lo/libreoffice/instdir/program/libgcc3_java.so: cannot open shared object file: No such file or directory Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.AbstractBoot start INFO: LibSerializer 1.1.6.10682 started. Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.AbstractBoot start INFO: LibBase 1.1.6.10682 started. Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.AbstractBoot start INFO: LibLoader 1.1.6.10682 started. Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.AbstractBoot start INFO: LibRepository 1.1.6.10682 started. Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.AbstractBoot start INFO: LibFonts 1.1.6.10682 started. Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.AbstractBoot start INFO: LibLayout null started. Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.AbstractBoot start INFO: LibFormula 1.1.7.10682 started. Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.AbstractBoot start INFO: LibXML 1.1.7.10682 started. Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.PackageManager loadModule WARNING: Exception while loading module: org.pentaho.reporting.libraries.base.boot.DefaultModuleInfo={ModuleClass=org.jfree.report.modules.gui.swing.common.SwingCommonModule} : java.lang.NullPointerException Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.PackageManager loadModule WARNING: Exception while loading module: org.pentaho.reporting.libraries.base.boot.DefaultModuleInfo={ModuleClass=org.jfree.report.modules.gui.swing.html.SwingHtmlModule} : java.lang.NullPointerException Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.PackageManager loadModule WARNING: Exception while loading module: org.pentaho.reporting.libraries.base.boot.DefaultModuleInfo={ModuleClass=org.jfree.report.modules.gui.swing.pdf.SwingPdfModule} : java.lang.NullPointerException Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.PackageManager loadModule WARNING: Exception while loading module: org.pentaho.reporting.libraries.base.boot.DefaultModuleInfo={ModuleClass=org.jfree.report.modules.gui.swing.preview.SwingPreviewModule} : java.lang.NullPointerException Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.PackageManager loadModule WARNING: Exception while loading module: org.pentaho.reporting.libraries.base.boot.DefaultModuleInfo={ModuleClass=org.jfree.report.modules.gui.swing.printing.SwingPrintingModule} : java.lang.NullPointerException Jul 13, 2021 10:33:20 PM org.pentaho.reporting.libraries.base.boot.AbstractBoot start INFO: Pentaho Reporting Flow-Engine null started. Jul 13, 2021 10:33:21 PM org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlReadHandler startElement WARNING: Unknown tag <urn:oasis:names:tc:opendocument:xmlns:office:1.0:chart>: Start to ignore this element and all of its childs. [Location: Line=2 Column=4057] Jul 13, 2021 10:33:21 PM org.libreoffice.report.pentaho.output.OleProducer produceOle SEVERE: ReportProcessing failed: org.libreoffice.report.ReportExecutionException: Index 0 out of bounds for length 0 Jul 13, 2021 10:33:21 PM org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlReadHandler startElement WARNING: Unknown tag <urn:oasis:names:tc:opendocument:xmlns:office:1.0:chart>: Start to ignore this element and all of its childs. [Location: Line=2 Column=4057] Jul 13, 2021 10:33:21 PM org.libreoffice.report.pentaho.output.OleProducer produceOle SEVERE: ReportProcessing failed: org.libreoffice.report.ReportExecutionException: Index 0 out of bounds for length 0 warn:xmloff:100678:100678:xmloff/source/text/XMLTextFrameContext.cxx:1066: unknown attribute urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:class-id value=12DCAE26-281F-416F-A234-C3086127382E warn:xmloff:100678:100678:xmloff/source/text/XMLTextFrameContext.cxx:1066: unknown attribute http://www.w3.org/1999/xlink xlink:type value=simple warn:xmloff:100678:100678:xmloff/source/text/XMLTextFrameContext.cxx:1066: unknown attribute http://www.w3.org/1999/xlink xlink:show value=embed warn:xmloff:100678:100678:xmloff/source/text/XMLTextFrameContext.cxx:1066: unknown attribute http://www.w3.org/1999/xlink xlink:actuate value=onLoad warn:xmloff:100678:100678:xmloff/source/text/XMLTextFrameContext.cxx:1066: unknown attribute urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:text-style-name value=P1 warn:xmloff:100678:100678:xmloff/source/text/XMLTextFrameContext.cxx:1066: unknown attribute urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:class-id value=12DCAE26-281F-416F-A234-C3086127382E warn:xmloff:100678:100678:xmloff/source/text/XMLTextFrameContext.cxx:1066: unknown attribute http://www.w3.org/1999/xlink xlink:type value=simple warn:xmloff:100678:100678:xmloff/source/text/XMLTextFrameContext.cxx:1066: unknown attribute http://www.w3.org/1999/xlink xlink:show value=embed warn:xmloff:100678:100678:xmloff/source/text/XMLTextFrameContext.cxx:1066: unknown attribute http://www.w3.org/1999/xlink xlink:actuate value=onLoad warn:xmloff:100678:100678:xmloff/source/text/XMLTextFrameContext.cxx:1066: unknown attribute urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:text-style-name value=P1 warn:svx:100678:100678:svx/source/svdraw/svdmodel.cxx:199: SdrModel::~SdrModel: Not all incarnations of SdrObjects deleted, possible memory leak (!) warn:svl.items:100678:100678:svl/source/items/itempool.cxx:358: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty. For this bugtracker, I think the pb is in: warn:legacy.osl:100678:100678:reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx:337: No document handler available! warn:chart2:100678:100678:chart2/source/model/filter/XMLFilter.cxx:464: failed to instantiate com.sun.star.comp.report.ImportDocumentHandler com.sun.star.uno.Exception message: no delegatee and no model /home/julien/lo/libreoffice/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx:339 Some debug show that only m_xDelegatee.is() is false, m_xModel.is() is true. Now, I got no idea how to debug this. I got lost between, service, implementation, Reference, filter fragments, idl, weak ref, etc. I don't succeed in neither getting the whole picture nor how to split this in several parts, very frustrating.
One silly behavior: There is a new created report "Diagramm_Vorlage" in the example database. I could create a chart, connected to view "Ansicht_Altersklasse_Anzahl_Geschlecht". The content of the view will be shown in the chart. I link the field "Geschlecht" and could execute the report while it is opened. I could save the report and execute the open report - chart is shown. I close the report and execute the report - no chart. Remember: You couldn't edit a chart in a report with many versions of LO, see bug 117159 . So I deleted the charts in LO 6.4.7.2 (there I could click on a chart without crash) and then created the new chart with LO 7.1.5.1 under OpenSUSE 15.2.
On pc Debian x86-64 with master sources updated today, the situation is worse, the report doesn't load, it seems it entered in a never ending loop. Mike/Noel: any idea what could be wrong here? (there are quite a lot of console logs). I put tdf#117159 in cc since both may be related.
(In reply to Julien Nabet from comment #12) > On pc Debian x86-64 with master sources updated today, the situation is > worse, the report doesn't load, it seems it entered in a never ending loop. > > Mike/Noel: any idea what could be wrong here? (there are quite a lot of > console logs). > I put tdf#117159 in cc since both may be related. Mike: I think there's a pb with https://cgit.freedesktop.org/libreoffice/core/commit/?id=6362c905cf19f2f6cb67bf634091b14c2a8e90ec tdf#143514: Avoid double-free in dbgutil code SdrObject::Free may start a chain of deletions, removing more than one object from maAllIncarnatedObjects. Trying to free them for the second time after that would lead to crash. Indeed, here what I did: - created a brand new odb file with by default embedded HSQL - with wizard, I created a new table - then using report wizard, I created a new report containing all the fields of the table, when clicking "Finish" button, it hangs here: // SdrObjectLifetimeWatchDog: if(!maAllIncarnatedObjects.empty()) { SAL_WARN("svx","SdrModel::~SdrModel: Not all incarnations of SdrObjects deleted, possible memory leak (!)"); // calling SdrObject::Free will change maAllIncarnatedObjects, and potentially remove more // than one - do not copy to another container, to not try to free already removed object. do { SdrObject* pCandidate(const_cast<SdrObject*>(*maAllIncarnatedObjects.begin())); SdrObject::Free(pCandidate); } while (!maAllIncarnatedObjects.empty()); } maAllIncarnatedObjects always contains 48 elements, it never decreases. See https://opengrok.libreoffice.org/xref/core/svx/source/svdraw/svdmodel.cxx?r=6362c905#199 After some gdb debug, I saw that LO always entered line 491 here: 473 void SdrObject::Free( SdrObject*& _rpObject ) 474 { 475 SdrObject* pObject = _rpObject; _rpObject = nullptr; 476 477 if(nullptr == pObject) 478 { 479 // nothing to do 480 return; 481 } 482 483 SvxShape* pShape(pObject->getSvxShape()); 484 485 if(pShape) 486 { 487 if(pShape->HasSdrObjectOwnership()) 488 { 489 // only the SvxShape is allowed to delete me, and will reset 490 // the ownership before doing so 491 return; 492 } 493 else 494 { 495 // not only delete pObject, but also need to dispose uno shape 496 try 497 { 498 pShape->InvalidateSdrObject(); 499 uno::Reference< lang::XComponent > xShapeComp( pObject->getWeakUnoShape(), uno::UNO_QUERY_THROW ); 500 xShapeComp->dispose(); 501 } 502 catch( const uno::Exception& ) 503 { 504 DBG_UNHANDLED_EXCEPTION("svx"); 505 } 506 } 507 } 508 509 delete pObject; 510 } (see https://opengrok.libreoffice.org/xref/core/svx/source/svdraw/svdobj.cxx?r=8c8d8786#491)
(In reply to Julien Nabet from comment #13) Then it might make sense to have a copy, but still before each deletion of an object in that copy, check if it still exists in the main list. Or something like that.
(In reply to Mike Kaganski from comment #14) > (In reply to Julien Nabet from comment #13) > > Then it might make sense to have a copy, but still before each deletion of > an object in that copy, check if it still exists in the main list. Or > something like that. Here is the result of printing at 2 moments maAllIncarnatedObjects, they seem identical: $6 = std::__debug::unordered_set with 48 elements = {[0] = 0x9c22b90, [1] = 0x9f7c210, [2] = 0xa5308e0, [3] = 0xa2e3700, [4] = 0x9d2f970, [5] = 0x9e4cb30, [6] = 0xa2c05e0, [7] = 0x9fece30, [8] = 0x9d67a10, [9] = 0x9d69930, [10] = 0x9ca3d00, [11] = 0xa7cc460, [12] = 0x579acf0, [13] = 0x5914820, [14] = 0x9d773d0, [15] = 0x9fedbb0, [16] = 0x9cac200, [17] = 0x9c4e8e0, [18] = 0x69e1ae0, [19] = 0x9e4fe90, [20] = 0x9e35de0, [21] = 0xa8074a0, [22] = 0xa403dc0, [23] = 0xa4ce360, [24] = 0x9bf4970, [25] = 0xa546670, [26] = 0x9d1aaf0, [27] = 0x9f9ba10, [28] = 0x9cb0370, [29] = 0x5fae0f0, [30] = 0x9d2a7d0, [31] = 0x9ca6470, [32] = 0x9c32630, [33] = 0x9c3bd60, [34] = 0x9cc5a80, [35] = 0xa355b90, [36] = 0x9cde0b0, [37] = 0xa570c10, [38] = 0x5ee91f0, [39] = 0xa251b30, [40] = 0x9d32570, [41] = 0x9d372e0, [42] = 0xa35e340, [43] = 0xa548240, [44] = 0x9d1fa10, [45] = 0xa35b780, [46] = 0x9ff3490, [47] = 0x9d15030} $7 = std::__debug::unordered_set with 48 elements = {[0] = 0x9c22b90, [1] = 0x9f7c210, [2] = 0xa5308e0, [3] = 0xa2e3700, [4] = 0x9d2f970, [5] = 0x9e4cb30, [6] = 0xa2c05e0, [7] = 0x9fece30, [8] = 0x9d67a10, [9] = 0x9d69930, [10] = 0x9ca3d00, [11] = 0xa7cc460, [12] = 0x579acf0, [13] = 0x5914820, [14] = 0x9d773d0, [15] = 0x9fedbb0, [16] = 0x9cac200, [17] = 0x9c4e8e0, [18] = 0x69e1ae0, [19] = 0x9e4fe90, [20] = 0x9e35de0, [21] = 0xa8074a0, [22] = 0xa403dc0, [23] = 0xa4ce360, [24] = 0x9bf4970, [25] = 0xa546670, [26] = 0x9d1aaf0, [27] = 0x9f9ba10, [28] = 0x9cb0370, [29] = 0x5fae0f0, [30] = 0x9d2a7d0, [31] = 0x9ca6470, [32] = 0x9c32630, [33] = 0x9c3bd60, [34] = 0x9cc5a80, [35] = 0xa355b90, [36] = 0x9cde0b0, [37] = 0xa570c10, [38] = 0x5ee91f0, [39] = 0xa251b30, [40] = 0x9d32570, [41] = 0x9d372e0, [42] = 0xa35e340, [43] = 0xa548240, [44] = 0x9d1fa10, [45] = 0xa35b780, [46] = 0x9ff3490, [47] = 0x9d15030} About the ownership, I checked it's done at 3 locations: reportdesign/source/core/sdr/RptObject.cxx:434: pShape->TakeSdrObjectOwnership(); svx/source/customshapes/EnhancedCustomShapeEngine.cxx:260: pShape->TakeSdrObjectOwnership(); svx/source/svdraw/svdobj.cxx:2835: mpSvxShape->TakeSdrObjectOwnership(); Here's the comment in reportdesign/source/core/sdr/RptObject.cxx: "UNDO in the report designer is implemented at the level of the XShapes, not at the level of SdrObjects. That is, if an object is removed from the report design, then this happens by removing the XShape from the UNO DrawPage, and putting this XShape (resp. the ReportComponent which wraps it) into an UNDO action. Unfortunately, the SvxDrawPage implementation usually deletes SdrObjects which are removed from it, which is deadly for us. To prevent this, we give the XShape implementation the ownership of the SdrObject, which ensures the SvxDrawPage won't delete it. " Knowing that in svx/source/svdraw/svdobj.cxx, it indicates this: "// I think this may never happen... But I am not sure enough .-)" perhaps ownership mechanism needs some cleaning/review/refactoring and there could be a way to remove TakeSdrObjectOwnership so we could avoid all these pbs.
That maAllIncarnatedObjects mechanism is dbgutil-only, and is quite a hack. I would suggest adding a check in that loop that bails out if the count does not change after a call to SdrObject::Free.
I tried: if (maAllIncarnatedObjects.find(pSdrObject) != maAllIncarnatedObjects.end()) + { + auto checkSize = maRemainingObjects.size(); SdrObject::Free(pCandidate); + if (maRemainingObjects.size() != (checkSize - 1)) + std::cerr << "TODO maRemainingObjects.size()=" << maRemainingObjects.size() << " checkSize - 1=" << (checkSize - 1) << "\n"; + else + fprintf(stderr, "TODO no pb\n"); + } } and if (maAllIncarnatedObjects.find(pSdrObject) != maAllIncarnatedObjects.end()) + { + auto checkSize = maRemainingObjects.size(); SdrObject::Free(pCandidate); + if (maAllIncarnatedObjects.size() != (checkSize - 1)) + std::cerr << "TODO maAllIncarnatedObjects.size()=" << maAllIncarnatedObjects.size() << " checkSize - 1=" << (checkSize - 1) << "\n"; + else + fprintf(stderr, "TODO no pb\n"); + } } Then I opened the report Each time, there's no decrease in the size, I got always: TODO maRemainingObjects.size()=8 checkSize - 1=7 / TODO maAllIncarnatedObjects.size()=8 checkSize - 1=7
wrt the problem in comment #1 I think at this point we have two problems both of which need to be fixed for the charts to appear again. The original commit identified in the bisect and later on a change to "fastsaxparser"
https://gerrit.libreoffice.org/c/core/+/132285 + https://gerrit.libreoffice.org/c/core/+/132286 seems to work to restore the chart of comment #1
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/70f3a94949cce612be9eff14fca94976acfc61a4 tdf#117162 ImportDocumentHandler expected XDocumentHandler argument 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.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/78f7bd90b96ac168fdacd1e0cb0693ab3861872a Resolves: tdf#117162 ImportDocumentHandler expects data provider to exist 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.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/fc6d597a933f9ca71b479864b31682dac17724c3 Related: tdf#117162 use a marginally tidier but riskier fix for trunk 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.
On pc Debian x86-64 with master sources updated today (c434041f9abfc6fb3c9a2570f742a4c79885f2b4) so also including fc6d597a933f9ca71b479864b31682dac17724c3 (Related: tdf#117162 use a marginally tidier but riskier fix for trunk), I confirm reports appear! Great job Caolán (as always)!!
Let's call this fixed then, backport to 7-3 in gerrit (I don't do 7-2 as there is only one release left there and no space to do another if there are sideeffects). Put any remaining problems in new bugs. And this needs some sort of test added to it can't happen again.
Confirming that the charts in the test file are now visible, thanks Caolán !
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/456fdfefd7d01c6fe4386266254045cdd33c8ed0 Resolves: tdf#117162 ImportDocumentHandler expects data provider to exist 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.