Bug 160154 - regression: component-schema xsd files starting with an <info/> element will not work anymore
Summary: regression: component-schema xsd files starting with an <info/> element will ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0 target:24.2.3
Keywords: bibisectNotNeeded, regression
Depends on:
Blocks:
 
Reported: 2024-03-11 15:11 UTC by Oliver Brinzing
Modified: 2024-03-28 16:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Brinzing 2024-03-11 15:11:22 UTC
i noticed a problem (regression ?) with LO 24.2.1 (no problem with LO 7.6.5)

configmgr/source/components.cxx:660: error reading myconfig.xcs 
com.sun.star.uno.RuntimeException message: "bad member <component> in myconfig.xcs at D:/sources/libo-core/configmgr/source/xcsparser.cxx:289"

<?xml version="1.0" encoding="UTF-8"?>
<oor:component-schema oor:name="MyConfig" oor:package="my.org" 
xml:lang="en-US" xmlns:oor="http://openoffice.org/2001/registry"
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <info>
  <desc>THIS ELEMENT CAUSES THE PROBLEM</desc>
 </info>
 <templates>
  <group oor:name="MyGroup">
   <info>
     <desc>Contains data describing the structure of my module</desc>
   </info>
   ...
  </group>
 </templates>
 <component>
   <group oor:name="Settings">
    <info>
     <desc>Contains settings used by ...</desc>
    </info>
     ...
Comment 2 Stéphane Guillou (stragu) 2024-03-28 16:06:11 UTC
Fixing commit:

commit 8350404ec1c02df8b4f6b4f48947ddbff53d91e5
author	Michael Stahl 	Thu Mar 21 18:47:03 2024 +0100
committer	Michael Stahl 	Fri Mar 22 08:46:04 2024 +0100
configmgr: fix parse error if subelements of <info> used
The unused but valid child elements of <info> such as <author> may be
used by exentions. This fails with:
  warn:configmgr:15104:10916:configmgr/source/components.cxx:660: error reading "file:///instdir/program/../share/uno_packages/cache/uno_packages/....xcs" com.sun.star.uno.RuntimeException message: "bad member <component> in ....xcs at configmgr/source/xcsparser.cxx:289"
Because ending the first such element sets bIsParsingInfo_ to false.
This fix just concatenates all the characters in all the children,
should work well enough for extensions.
(regression from commit db3078bd8c8e3ce3a99fc3987bb6e93b609990c1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165143

Fix is cherrypicked to 24.2 as 27526cde7fb6cdcf23f23349cdc7ebdaa3d9bcfa.

Thanks Michael!