Giter Club home page Giter Club logo

Comments (15)

ChristopherLea avatar ChristopherLea commented on May 30, 2024

Call stack is below.

    Read [FAIL] : System.Xml.XmlException : The ':' character, hexadecimal value 0x3A, cannot be included in a name.
10-27 14:08:57.525 I/mono-stdout( 3838):    Read [FAIL] : System.Xml.XmlException : The ':' character, hexadecimal value 0x3A, cannot be included in a name.
          at System.Xml.XmlConvert.VerifyNCName (System.String name, System.Xml.ExceptionType exceptionType) [0x00045] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml/System/Xml/XmlConvert.cs:395 
10-27 14:08:57.527 I/mono-stdout( 3838):          at System.Xml.XmlConvert.VerifyNCName (System.String name, System.Xml.ExceptionType exceptionType) [0x00045] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml/System/Xml/XmlConvert.cs:395 
          at System.Xml.XmlConvert.VerifyNCName (System.String name) [0x00000] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml/System/Xml/XmlConvert.cs:380 
          at System.Xml.Linq.XName..ctor (System.Xml.Linq.XNamespace ns, System.String localName) [0x0000d] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:48 
10-27 14:08:57.528 I/mono-stdout( 3838):          at System.Xml.XmlConvert.VerifyNCName (System.String name) [0x00000] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml/System/Xml/XmlConvert.cs:380 
          at System.Xml.Linq.XNamespace.GetName (System.String localName, System.Int32 index, System.Int32 count) [0x00017] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:427 
10-27 14:08:57.528 I/mono-stdout( 3838):          at System.Xml.Linq.XName..ctor (System.Xml.Linq.XNamespace ns, System.String localName) [0x0000d] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:48 
10-27 14:08:57.529 I/mono-stdout( 3838):          at System.Xml.Linq.XNamespace.GetName (System.String localName, System.Int32 index, System.Int32 count) [0x00017] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:427 
          at System.Xml.Linq.XNamespace.GetName (System.String localName) [0x00011] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:278 
10-27 14:08:57.531 I/mono-stdout( 3838):          at System.Xml.Linq.XNamespace.GetName (System.String localName) [0x00011] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:278 
          at System.Xml.Linq.XName.Get (System.String expandedName) [0x0009a] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:100 
10-27 14:08:57.532 I/mono-stdout( 3838):          at System.Xml.Linq.XName.Get (System.String expandedName) [0x0009a] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:100 
          at System.Xml.Linq.XName.op_Implicit (System.String expandedName) [0x00000] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:121 
10-27 14:08:57.532 I/mono-stdout( 3838):          at System.Xml.Linq.XName.op_Implicit (System.String expandedName) [0x00000] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:121 
10-27 14:08:57.535 I/mono-stdout( 3838):          at XmpCore.Impl.ParseRdf.Rdf_ResourcePropertyElement (XmpCore.Impl.XmpMeta xmp, XmpCore.Impl.XmpNode xmpParent, System.Xml.Linq.XElement xmlNode, System.Boolean isTopLevel) [0x00009] in <509f73465b0f4b0e867369cb2d53af48>:0 
          at XmpCore.Impl.ParseRdf.Rdf_ResourcePropertyElement (XmpCore.Impl.XmpMeta xmp, XmpCore.Impl.XmpNode xmpParent, System.Xml.Linq.XElement xmlNode, System.Boolean isTopLevel) [0x00009] in <509f73465b0f4b0e867369cb2d53af48>:0 
          at XmpCore.Impl.ParseRdf.Rdf_PropertyElement (XmpCore.Impl.XmpMeta xmp, XmpCore.Impl.XmpNode xmpParent, System.Xml.Linq.XElement xmlNode, System.Boolean isTopLevel) [0x00260] in <509f73465b0f4b0e867369cb2d53af48>:0 
          at XmpCore.Impl.ParseRdf.Rdf_PropertyElementList (XmpCore.Impl.XmpMeta xmp, XmpCore.Impl.XmpNode xmpParent, System.Xml.Linq.XElement xmlParent, System.Boolean isTopLevel) [0x0003f] in <509f73465b0f4b0e867369cb2d53af48>:0 
          at XmpCore.Impl.ParseRdf.Rdf_NodeElement (XmpCore.Impl.XmpMeta xmp, XmpCore.Impl.XmpNode xmpParent, System.Xml.Linq.XElement xmlNode, System.Boolean isTopLevel) [0x0003d] in <509f73465b0f4b0e867369cb2d53af48>:0 
          at XmpCore.Impl.ParseRdf.Rdf_NodeElementList (XmpCore.Impl.XmpMeta xmp, XmpCore.Impl.XmpNode xmpParent, System.Xml.Linq.XElement rdfRdfNode) [0x0001d] in <509f73465b0f4b0e867369cb2d53af48>:0 
          at XmpCore.Impl.ParseRdf.Rdf_RDF (XmpCore.Impl.XmpMeta xmp, System.Xml.Linq.XElement rdfRdfNode) [0x00015] in <509f73465b0f4b0e867369cb2d53af48>:0 
10-27 14:08:57.540 I/mono-stdout( 3838):          at XmpCore.Impl.ParseRdf.Rdf_PropertyElement (XmpCore.Impl.XmpMeta xmp, XmpCore.Impl.XmpNode xmpParent, System.Xml.Linq.XElement xmlNode, System.Boolean isTopLevel) [0x00260] in <509f73465b0f4b0e867369cb2d53af48>:0 
10-27 14:08:57.540 I/mono-stdout( 3838):          at XmpCore.Impl.ParseRdf.Rdf_PropertyElementList (XmpCore.Impl.XmpMeta xmp, XmpCore.Impl.XmpNode xmpParent, System.Xml.Linq.XElement xmlParent, System.Boolean isTopLevel) [0x0003f] in <509f73465b0f4b0e867369cb2d53af48>:0 
10-27 14:08:57.540 I/mono-stdout( 3838):          at XmpCore.Impl.ParseRdf.Rdf_NodeElement (XmpCore.Impl.XmpMeta xmp, XmpCore.Impl.XmpNode xmpParent, System.Xml.Linq.XElement xmlNode, System.Boolean isTopLevel) [0x0003d] in <509f73465b0f4b0e867369cb2d53af48>:0 
10-27 14:08:57.540 I/mono-stdout( 3838):          at XmpCore.Impl.ParseRdf.Rdf_NodeElementList (XmpCore.Impl.XmpMeta xmp, XmpCore.Impl.XmpNode xmpParent, System.Xml.Linq.XElement rdfRdfNode) [0x0001d] in <509f73465b0f4b0e867369cb2d53af48>:0 
10-27 14:08:57.541 I/mono-stdout( 3838):          at XmpCore.Impl.ParseRdf.Rdf_RDF (XmpCore.Impl.XmpMeta xmp, System.Xml.Linq.XElement rdfRdfNode) [0x00015] in <509f73465b0f4b0e867369cb2d53af48>:0 
10-27 14:08:57.541 I/mono-stdout( 3838):          at XmpCore.Impl.ParseRdf.Parse (System.Xml.Linq.XElement xmlRoot) [0x00005] in <509f73465b0f4b0e867369cb2d53af48>:0 
          at XmpCore.Impl.ParseRdf.Parse (System.Xml.Linq.XElement xmlRoot) [0x00005] in <509f73465b0f4b0e867369cb2d53af48>:0 
          at XmpCore.Impl.XmpMetaParser.ParseXmlDoc (System.Xml.Linq.XDocument document, XmpCore.Options.ParseOptions options) [0x0002b] in <509f73465b0f4b0e867369cb2d53af48>:0 
          at XmpCore.Impl.XmpMetaParser.Parse (System.String xmlStr, XmpCore.Options.ParseOptions options) [0x00019] in <509f73465b0f4b0e867369cb2d53af48>:0 
          at XmpCore.XmpMetaFactory.ParseFromString (System.String packet, XmpCore.Options.ParseOptions options) [0x00000] in <509f73465b0f4b0e867369cb2d53af48>:0

from xmp-core-dotnet.

ChristopherLea avatar ChristopherLea commented on May 30, 2024

Hi there,

Decided to build from source rather than NuGet to investigate further, and I get the exact same error when running XmpCore.Tests?

// =============================================================================
// Test simple constructors and parsing, setting the instance ID
// =============================================================================

Empty XMP object:
ROOT NODE

XMP object with name (Name: 'New object name'):
ROOT NODE (New object name)

Caught exception 'The ':' character, hexadecimal value 0x3A, cannot be included in a name.'

Any help would be greatly appreciated!

from xmp-core-dotnet.

drewnoakes avatar drewnoakes commented on May 30, 2024

I think some recent refactoring might have broken this. Potentially an implicit cast from string to XNamespace or XName caused an overload resolution change. Investigating.

from xmp-core-dotnet.

drewnoakes avatar drewnoakes commented on May 30, 2024

Are you running the tests under Mono? The tests are passing on my machine (not Mono).

from xmp-core-dotnet.

drewnoakes avatar drewnoakes commented on May 30, 2024

Could you try running the tests on commit f92a821 please? That commit is before some recent refactoring.

If they pass, it'd be amazing if you could use git bisect to find the offending commit.

from xmp-core-dotnet.

ChristopherLea avatar ChristopherLea commented on May 30, 2024

Hi Drew,

First thanks for getting back to me :)!.

I'm not running the tests under Mono, although I do have Xamarin installed (my intention is to use XmpCore inside a current Xamarin project).

I've narrowed it down to the following code:
if (isTopLevel && xmlNode.Name == "iX:changes") { // Strip old "punchcard" chaff which has on the prefix "iX:". return; }

If this check is removed, all is well.

I will try with an older commit and get back to you.

Thanks

from xmp-core-dotnet.

drewnoakes avatar drewnoakes commented on May 30, 2024

That line of code was changed recently. The code was converted from Java, where == is a reference check for strings. I got tired of reading str1.Equals(str2) everywhere in the C# code, so used a structural search and replace (via ReSharper) to update the code in 6fcf054. I suspect that broke this line of code, and potentially others as well.

from xmp-core-dotnet.

drewnoakes avatar drewnoakes commented on May 30, 2024

The diff there was:

         /// <exception cref="XmpException">thrown on parsing errors</exception>
          private static void Rdf_ResourcePropertyElement(XmpMeta xmp, XmpNode xmpParent, XElement xmlNode, bool isTopLevel)
          {
 -            if (isTopLevel && "iX:changes".Equals(xmlNode.Name))
 +            if (isTopLevel && xmlNode.Name == "iX:changes")
              {
                  // Strip old "punchcard" chaff which has on the prefix "iX:".
                  return;
              }

If you change it back to "iX:changes".Equals(xmlNode.Name), does it pass?

I will have to think whether it makes sense to revert that commit, or go through and review each change for problems. I doubt that is the only case.

from xmp-core-dotnet.

ChristopherLea avatar ChristopherLea commented on May 30, 2024

Just tried with f92a821 and works fine.

Sorry the probably stupid questions but I'm completely new to this NuGet etc. situation (I'm used to Embedded C++ and Linux so a bit out of my depth!).

What would be the best way to include this older revision as a portable dll in my Xamarin project? Is it possible to cross reference the git hash with NuGet versions and use an older download?

from xmp-core-dotnet.

drewnoakes avatar drewnoakes commented on May 30, 2024

This bug will not be present in version 1.2.2 of the NuGet package. You should be able to update your project to reference the earlier version and be good to go.

from xmp-core-dotnet.

ChristopherLea avatar ChristopherLea commented on May 30, 2024

Thanks Drew, rolled back to 1.2.2 and my Android Unit Test App is now passing!

Brilliant, thank you so much for your help.

from xmp-core-dotnet.

drewnoakes avatar drewnoakes commented on May 30, 2024

Great. I'm going to re-open this to track the bug in 1.2.3. I'll get a fix out soon and let you know.

from xmp-core-dotnet.

drewnoakes avatar drewnoakes commented on May 30, 2024

@ChristopherLea I've fixed the above issue, and also made the library target netstandard1.0 instead of the older PCL profile. It's now built using project.json instead of multiple .csproj files.

Would you be able to test the 2.0.0-rc1 package on NuGet please?

https://www.nuget.org/packages/XmpCore/2.0.0-rc1

from xmp-core-dotnet.

drewnoakes avatar drewnoakes commented on May 30, 2024

2.0.0-rc2 exists now, with support for net35, as well as netstandard10. Both include fixes for this issue.

from xmp-core-dotnet.

drewnoakes avatar drewnoakes commented on May 30, 2024

I've also deleted 1.2.3 from NuGet.

from xmp-core-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.