Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The given key offset wast not present in the dictionary #2670

Open
1 task done
sledderGIT opened this issue Nov 13, 2023 · 1 comment
Open
1 task done

The given key offset wast not present in the dictionary #2670

sledderGIT opened this issue Nov 13, 2023 · 1 comment
Labels

Comments

@sledderGIT
Copy link

Description

Getting an exception while parsing the following SVG.
logo-Ponant+Marcel

{System.Collections.Generic.KeyNotFoundException: The given key 'offset' was not present in the dictionary. at SkiaSharp.Extended.Svg.SKSvg.ReadStops(XElement e) at SkiaSharp.Extended.Svg.SKSvg.ReadLinearGradient(XElement e) at SkiaSharp.Extended.Svg.SKSvg.ReadPaints(Dictionary2 style, SKPaint& strokePaint, SKPaint& fillPaint, Boolean isGroup) at SkiaSharp.Extended.Svg.SKSvg.ReadElement(XElement e, SKCanvas canvas, SKPaint stroke, SKPaint fill) at SkiaSharp.Extended.Svg.SKSvg.ReadElement(XElement e, SKCanvas canvas, SKPaint stroke, SKPaint fill) at SkiaSharp.Extended.Svg.SKSvg.ReadElement(XElement e, SKCanvas canvas, SKPaint stroke, SKPaint fill) at SkiaSharp.Extended.Svg.SKSvg.LoadElements(IEnumerable1 elements, SKCanvas canvas, SKPaint stroke, SKPaint fill) at SkiaSharp.Extended.Svg.SKSvg.Load(XDocument xdoc) at SkiaSharp.Extended.Svg.SKSvg.Load(Stream stream) at SkiaSharp.Extended.Svg.SKSvg.Load(String filename) at DesignTokensParser.Parsers.IconsI…

Code

var svgDocument = new SKSvg();
svgDocument.Load(imageFile.FullName);

Expected Behavior

The svg should be loaded normally

Actual Behavior

Getting exception

Version of SkiaSharp

2.88.3 (Current)

Last Known Good Version of SkiaSharp

Other (Please indicate in the description)

IDE / Editor

Visual Studio (macOS)

Platform / Operating System

macOS

Platform / Operating System Version

MacOS Ventura 13.1 (22C65)

Devices

Mac with Apple M1 Max

Relevant Screenshots

No response

Relevant Log Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@dejanbasic
Copy link

Any solution for this?

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

No branches or pull requests

2 participants