Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

FormatException: Unknown char: - #1

Open
Logopher opened this issue Dec 17, 2013 · 2 comments
Open

FormatException: Unknown char: - #1

Logopher opened this issue Dec 17, 2013 · 2 comments

Comments

@Logopher
Copy link

With this SVG file: http://openclipart.org/detail/1567/al_standing-by-paro
… optimized by svgo-gui (otherwise a metadata element stops it)
… and fed into the Test scene's Invoke component
… I get the below error and stack trace.

I'm not sure which feature of SVG this represents, and I couldn't figure it out from some brief reading. My best guess is that it's just a negative sign that you expected a space before.

FormatException: Unknown char: -
System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/Double.cs:209)
System.Single.Parse (System.String s, IFormatProvider provider) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/Single.cs:193)
SVGLengthConvertor.ExtractType (System.String text, System.Single& value, .SVGLengthType& lengthType) (at Assets/Standard Assets/SVG/Implementation/SVG/DOM/Utilities/SVGLengthConvertor.cs:19)
SVGLength.GetPXLength (System.String valueText) (at Assets/Standard Assets/SVG/Implementation/SVG/DOM/BasicTypes/SVGLength.cs:54)
SVGStringExtractor.ExtractTransformValueAsPX (System.String inputText) (at Assets/Standard Assets/SVG/Implementation/SVG/DOM/Utilities/SVGStringExtractor.cs:30)
SVGPathElement.Initial () (at Assets/Standard Assets/SVG/Implementation/SVG/DOM/Paths/SVGPathElement.cs:31)
SVGPathElement..ctor (AttributeList attrList, .SVGTransformList inheritTransformList, .SVGPaintable inheritPaintable, .SVGGraphics r) (at Assets/Standard Assets/SVG/Implementation/SVG/DOM/Paths/SVGPathElement.cs:14)
SVGParser.GetElementList (System.Collections.Generic.List1 elementList, .SVGPaintable paintable, .SVGGraphics render, .SVGTransformList summaryTransformList) (at Assets/Standard Assets/SVG/Implementation/XML Parser/SVGParser.cs:119) SVGGElement.GetElementList () (at Assets/Standard Assets/SVG/Implementation/SVG/DOM/DocumentStructure/SVGGElement.cs:28) SVGGElement..ctor (.SVGParser xmlImp, .SVGTransformList inheritTransformList, .SVGPaintable inheritPaintable, .SVGGraphics render) (at Assets/Standard Assets/SVG/Implementation/SVG/DOM/DocumentStructure/SVGGElement.cs:24) SVGParser.GetElementList (System.Collections.Generic.List1 elementList, .SVGPaintable paintable, .SVGGraphics render, .SVGTransformList summaryTransformList) (at Assets/Standard Assets/SVG/Implementation/XML Parser/SVGParser.cs:131)
SVGSVGElement.GetElementList () (at Assets/Standard Assets/SVG/Implementation/SVG/DOM/DocumentStructure/SVGSVGElement.cs:54)
SVGSVGElement.Initial () (at Assets/Standard Assets/SVG/Implementation/SVG/DOM/DocumentStructure/SVGSVGElement.cs:50)
SVGSVGElement..ctor (.SVGParser xmlImp, .SVGTransformList inheritTransformList, .SVGPaintable inheritPaintable, .SVGGraphics r) (at Assets/Standard Assets/SVG/Implementation/SVG/DOM/DocumentStructure/SVGSVGElement.cs:30)
SVGDocument.get_rootElement () (at Assets/Standard Assets/SVG/Implementation/SVG/DOM/DocumentStructure/SVGDocument.cs:11)
SvgAsset.StartProcess () (at Assets/Standard Assets/SVG/SvgAsset.cs:37)
Invoke.Start () (at Assets/Hao_MrJoy/Use/Invoke.cs:29)

@MrJoy
Copy link
Owner

MrJoy commented Jan 7, 2014

That does sound right, but given the overall disappointing performance of this code, and the fact that Substance supports rendering SVGs, this code isn't under active maintenance anymore so I'm afraid it's highly unlikely I'll have time to fix this issue. My apologies!

@ivan-odintsov
Copy link

Open your SVG in Notepad++, go to Replace, Select regxe, (\d)-(\d) -> ($1),-($2)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants