Bug 113841 - Assertion failed in SvXMLNamespaceMap::GetQNameByKey when opening a certain XLSX, and ODF format version is set to 1.2 (strict)
Summary: Assertion failed in SvXMLNamespaceMap::GetQNameByKey when opening a certain X...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha1+
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Crash-Assert
  Show dependency treegraph
 
Reported: 2017-11-15 01:33 UTC by Aron Budea
Modified: 2020-12-30 07:44 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (13.60 KB, text/plain)
2018-12-30 10:54 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2017-11-15 01:33:57 UTC
Open attachment 114686 [details] from bug 90511 with a debug build (asserts are only checked in debug builds).

=> Assertion failed.

// ... if it isn't, this is a Bad Thing, assert and return the local name
assert(false);
https://opengrok.libreoffice.org/xref/core/xmloff/source/core/nmspmap.cxx#264

These are the parameters:
nKey = 40
rLocalName = width
bCache = true

And indeed, there's no namespace entry with key 40 in the checked containers.
I have a vague memory there was no assert 3 weeks ago, but can't say for sure.

Observed using a fresh LO 6.0 master build (b56479e88edeabd6c6fe51cc0095a23543229856) / Windows 7.
Comment 1 Aron Budea 2017-11-15 01:40:45 UTC
And indeed, had a debug build lying around from October 6, where there is no assert (da82b030e8b10f4b0b79220bf32eadd8d022684e).
=> regression, notBibisectable (except maybe using Linux daily dbgutil repo, if it occurs on Linux)
Comment 2 Aron Budea 2017-11-15 13:18:50 UTC
No assert in Linux, so apparently this is Win-only, and thus not bibisectable (unless there is a noticeable bug with a non-debug build).

Version: 6.0.0.0.alpha1+
Build ID: a3a917748892a6a3194ebfc4db64cfd764cc054a
CPU threads: 16; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 3 Aron Budea 2017-11-15 20:05:45 UTC
Ok, this is somewhat of a user error, but there's still an assert.
In Options, Load/Save -> General -> 'ODF format version' has to be set to 1.2 for the assert to trigger.
Comment 4 Kevin Suo 2017-11-27 04:54:32 UTC
Just for the record, under Fedora 26 with a dbgutil build I get the following in terminal:

warn:sfx.control:18940:18940:sfx2/source/control/dispatch.cxx:1374: Childwindow slot missing: 25917
warn:sfx.control:18940:18940:sfx2/source/control/dispatch.cxx:1374: Childwindow slot missing: 25917
warn:sfx.control:18940:18940:sfx2/source/control/dispatch.cxx:1374: Childwindow slot missing: 25917
warn:legacy.tools:18940:18940:svx/source/form/fmvwimp.cxx:444: FmXFormView::~FmXFormView: Window list not empty!
warn:chart2:18940:18940:chart2/source/tools/LifeTime.cxx:118: This component is already disposed 
warn:svl.items:18940:18940:svl/source/items/itempool.cxx:395: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:chart2:18940:18940:chart2/source/tools/LifeTime.cxx:118: This component is already disposed 
warn:svl.items:18940:18940:svl/source/items/itempool.cxx:395: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:legacy.osl:18940:18940:chart2/source/model/main/DataPoint.cxx:175: data point needs a parent property set to provide values correctly
warn:chart2:18940:18940:chart2/source/tools/LifeTime.cxx:118: This component is already disposed 
warn:svl.items:18940:18940:svl/source/items/itempool.cxx:395: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:sfx.control:18940:18940:sfx2/source/control/dispatch.cxx:1374: Childwindow slot missing: 25917
warn:sfx.dialog:18940:18940:sfx2/source/dialog/filtergrouping.cxx:355: already have an element for WordPerfect
warn:sfx.dialog:18940:18940:sfx2/source/dialog/filtergrouping.cxx:355: already have an element for writerweb8_writer_template
warn:sfx.dialog:18940:18940:sfx2/source/dialog/filtergrouping.cxx:355: already have an element for writerglobal8
warn:oox:18940:18940:oox/source/docprop/docprophandler.cxx:321: OOXMLDocPropHandler::startFastElement: unknown element 5619
warn:oox:18940:18940:oox/source/docprop/docprophandler.cxx:321: OOXMLDocPropHandler::startFastElement: unknown element 3197
warn:oox:18940:18940:oox/source/docprop/docprophandler.cxx:321: OOXMLDocPropHandler::startFastElement: unknown element 5619
warn:oox:18940:18940:oox/source/docprop/docprophandler.cxx:321: OOXMLDocPropHandler::startFastElement: unknown element 2748
warn:oox:18940:18940:oox/source/docprop/docprophandler.cxx:321: OOXMLDocPropHandler::startFastElement: unknown element 3197
warn:oox:18940:18940:oox/source/docprop/docprophandler.cxx:321: OOXMLDocPropHandler::startFastElement: unknown element 3197
warn:oox:18940:18940:oox/source/docprop/docprophandler.cxx:321: OOXMLDocPropHandler::startFastElement: unknown element 3197
warn:oox:18940:18940:oox/source/docprop/docprophandler.cxx:321: OOXMLDocPropHandler::startFastElement: unknown element 3197
warn:vcl:18940:18940:vcl/source/window/winproc.cxx:836: ImplHandleKey: Keyboard-Input is sent to a frame without focus
warn:sc.core:18940:18940:sc/source/core/tool/token.cxx:951: ScTableRefToken::GetSheet - maybe adapt caller to know about TableRef?
warn:sc.core:18940:18940:sc/source/core/tool/token.cxx:951: ScTableRefToken::GetSheet - maybe adapt caller to know about TableRef?
warn:oox:18940:19064:oox/source/helper/progressbar.cxx:65: ProgressBar::setPosition - invalid position
warn:oox:18940:19064:oox/source/helper/progressbar.cxx:65: ProgressBar::setPosition - invalid position
warn:oox:18940:19064:oox/source/helper/progressbar.cxx:65: ProgressBar::setPosition - invalid position
warn:oox:18940:18940:oox/source/drawingml/shapecontext.cxx:126: ShapeContext::onCreateContext: unhandled element: 3638
warn:oox:18940:18940:oox/source/drawingml/shapecontext.cxx:126: ShapeContext::onCreateContext: unhandled element: 1030
warn:svx.uno:18940:18940:svx/source/unodraw/unoshape.cxx:1620: Unknown Property: GraphicColorMode
warn:legacy.osl:18940:18940:oox/source/drawingml/chart/titleconverter.cxx:164: TitleConverter::convertFromModel - multiple text properties
warn:oox:18940:18940:oox/source/drawingml/shapecontext.cxx:126: ShapeContext::onCreateContext: unhandled element: 3638
warn:oox:18940:18940:oox/source/drawingml/shapecontext.cxx:126: ShapeContext::onCreateContext: unhandled element: 1030
warn:svx.uno:18940:18940:svx/source/unodraw/unoshape.cxx:1620: Unknown Property: GraphicColorMode
warn:legacy.osl:18940:18940:oox/source/drawingml/chart/objectformatter.cxx:1099: ObjectFormatter::convertNumberFormat - cannot create number format ''
warn:legacy.osl:18940:18940:oox/source/drawingml/chart/titleconverter.cxx:164: TitleConverter::convertFromModel - multiple text properties
warn:oox:18940:18940:oox/source/drawingml/shapecontext.cxx:126: ShapeContext::onCreateContext: unhandled element: 3638
warn:oox:18940:18940:oox/source/drawingml/shapecontext.cxx:126: ShapeContext::onCreateContext: unhandled element: 1030
warn:svx.uno:18940:18940:svx/source/unodraw/unoshape.cxx:1620: Unknown Property: GraphicColorMode
warn:legacy.osl:18940:18940:oox/source/drawingml/chart/titleconverter.cxx:164: TitleConverter::convertFromModel - multiple text properties
warn:oox:18940:18940:oox/source/drawingml/shapecontext.cxx:126: ShapeContext::onCreateContext: unhandled element: 3972
warn:oox:18940:18940:oox/source/drawingml/shapecontext.cxx:126: ShapeContext::onCreateContext: unhandled element: 3972
warn:oox:18940:18940:oox/source/drawingml/shapecontext.cxx:126: ShapeContext::onCreateContext: unhandled element: 3972
warn:oox:18940:18940:oox/source/drawingml/shapecontext.cxx:126: ShapeContext::onCreateContext: unhandled element: 3972
warn:chart2:18940:18940:chart2/source/view/main/ShapeFactory.cxx:2129: Exception caught. N3com3sun4star3uno9ExceptionE
warn:chart2:18940:18940:chart2/source/view/main/ShapeFactory.cxx:2129: Exception caught. N3com3sun4star3uno9ExceptionE
warn:chart2:18940:18940:chart2/source/view/main/ShapeFactory.cxx:2129: Exception caught. N3com3sun4star3uno9ExceptionE
warn:legacy.osl:18940:18940:svx/source/sdr/contact/viewcontactofe3dscene.cxx:372: No need to get ViewInformation3D from an empty scene (!)
warn:chart2:18940:18940:chart2/source/view/main/ShapeFactory.cxx:2129: Exception caught. N3com3sun4star3uno9ExceptionE
warn:chart2:18940:18940:chart2/source/view/main/ShapeFactory.cxx:2129: Exception caught. N3com3sun4star3uno9ExceptionE
warn:chart2.tools:18940:18940:chart2/source/tools/WrappedPropertySet.cxx:151: found no inner property set to map to
warn:chart2.tools:18940:18940:chart2/source/tools/WrappedPropertySet.cxx:151: found no inner property set to map to
warn:chart2.tools:18940:18940:chart2/source/tools/WrappedPropertySet.cxx:151: found no inner property set to map to
warn:sfx.control:18940:18940:sfx2/source/control/dispatch.cxx:1374: Childwindow slot missing: 25917
warn:sfx.control:18940:18940:sfx2/source/control/dispatch.cxx:1374: Childwindow slot missing: 25917
warn:legacy.tools:18940:18940:svx/source/form/fmvwimp.cxx:444: FmXFormView::~FmXFormView: Window list not empty!
Comment 5 Xisco Faulí 2018-01-24 09:39:44 UTC
Confirmed in

Version: 6.1.0.0.alpha0+
Build ID: 2453c5a62cd2c4364d0258f7488ab23b83b5478b
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF-dbg, Branch:master, Time: 2018-01-07_23:15:27
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded
Comment 6 Julien Nabet 2018-12-30 10:54:15 UTC
Created attachment 147898 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 7 Julien Nabet 2018-12-30 11:06:09 UTC
Regina: according to the bt, the problem seems due to legend-expansion-aspect-ratio.
Indeed, this patch prevents from having the assert:
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 1e59110e84b8..b694d65abf7e 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1372,7 +1372,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
 
                 // export legend size
                 const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
-                if( xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 )
+                if( xLegendShape.is() && nCurrentODFVersion > SvtSaveOptions::ODFVER_012 )
                 {
                     try
                     {


but this attribute should be ok in ODF1.2 according to 
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1417936_253892949

Did I miss something?
Comment 8 Julien Nabet 2018-12-30 11:16:56 UTC
Argh, forget my last comment, it's not related to legend-expansion-aspect-ratio but to "width" in XML_NAMESPACE_CHART_EXT
Comment 9 Julien Nabet 2018-12-30 11:33:28 UTC
Depending of bIsOOoNamespace, either it's true and we use XML_NAMESPACE_CHART_EXT or it's false and we use XML_NAMESPACE_SVG.
In our case, the var is put to true, so it's expected we assert if we use ODF 1.2

I must recognize I don't know if bIsOOoNamespace should be put to false here, just found these related commits about it:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=e26194b675380ad6b6a1287f97bce93006be176c
https://cgit.freedesktop.org/libreoffice/core/commit/?id=c0f7a3f7cf33debd0f6049c415c412d14526a79e

If this variable should indeed be put to true, we should just test that nCurrentODFVersion > SvtSaveOptions::ODFVER_012 to call addSize method or not.
This would give:
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 1e59110e84b8..02b03a677599 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1386,7 +1386,8 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
                             if( nLegendExpansion == chart::ChartLegendExpansion_CUSTOM)
                             {
                                 awt::Size aSize( xLegendShape->getSize() );
-                                addSize( aSize, true );
+                                if( nCurrentODFVersion > SvtSaveOptions::ODFVER_012 )
+                                    addSize( aSize, true );
                                 OUStringBuffer aAspectRatioString;
                                 ::sax::Converter::convertDouble(
                                     aAspectRatioString,
Comment 10 QA Administrators 2020-12-30 03:39:12 UTC Comment hidden (obsolete)
Comment 11 Aron Budea 2020-12-30 07:44:23 UTC
No assert in a recent master debug build, closing as WFM.

Version: 7.2.0.0.alpha0+
Build ID: 765b13b67e46aa8c8618fdad8582f8586bffce9e
CPU threads: 16; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded