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

Endless loop and out of memory on a specific file #675

Closed
RazrFalcon opened this issue Feb 17, 2020 · 9 comments · Fixed by #681
Closed

Endless loop and out of memory on a specific file #675

RazrFalcon opened this issue Feb 17, 2020 · 9 comments · Fixed by #681

Comments

@RazrFalcon
Copy link

Description

Endless loop and out of memory on a specific file

Example data

<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" font-family="Arial">
    <g id="g1" font-size="18">
        <defs id="defs1">
            <text id="text1">Text</text>
        </defs>
    </g>
    <use id="use1" xlink:href="#text1" x="50" y="120" font-size="48"/>
</svg>

Used Versions

  • SVG.NET 3.0.102 + master
  • Windows 10 64bit
  • .net Core 2.2
  • MSVS 2017
@H1Gdev
Copy link
Contributor

H1Gdev commented Feb 18, 2020

issue of <use> element.

@H1Gdev
Copy link
Contributor

H1Gdev commented Feb 19, 2020

@RazrFalcon

Endless loop and out of memory on a specific file

When I checked this SVG, System.NullReferenceException occurred.
Do you have call stack?
Or tell us which app you used to run this SVG.

@RazrFalcon
Copy link
Author

No. Just an endless loop and I've killed the app.

@H1Gdev
Copy link
Contributor

H1Gdev commented Feb 27, 2020

@RazrFalcon

Fixed PR #675 so that Example data can be drawn.
Can you test in your environment ?

@RazrFalcon
Copy link
Author

I can't build it:

C:\Users\Razr\Desktop\Projects\SVG\Samples\SvgConsole>dotnet publish -f netcoreapp2.2 -c Release -r win-x64 -o SvgConsole-win-x64-netcoreapp2.2
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restoring packages for C:\Users\Razr\Desktop\Projects\SVG\Samples\SvgConsole\SvgConsole.csproj...
  Restoring packages for C:\Users\Razr\Desktop\Projects\SVG\Source\Svg.csproj...
  Installing System.Memory 4.5.3.
  Installing Microsoft.CSharp 4.4.1.
  Installing System.CommandLine 2.0.0-beta1.20104.2.
  Generating MSBuild file C:\Users\Razr\Desktop\Projects\SVG\Samples\SvgConsole\obj\SvgConsole.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\Razr\Desktop\Projects\SVG\Samples\SvgConsole\obj\SvgConsole.csproj.nuget.g.targets.
  Restore completed in 8.99 sec for C:\Users\Razr\Desktop\Projects\SVG\Samples\SvgConsole\SvgConsole.csproj.
  Generating MSBuild file C:\Users\Razr\Desktop\Projects\SVG\Source\obj\Svg.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\Razr\Desktop\Projects\SVG\Source\obj\Svg.csproj.nuget.g.targets.
  Restore completed in 9.7 sec for C:\Users\Razr\Desktop\Projects\SVG\Source\Svg.csproj.
  Svg -> C:\Users\Razr\Desktop\Projects\SVG\Source\bin\x64\Release\netcoreapp2.2\Svg.dll
C:\Program Files\dotnet\sdk\2.2.110\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(71,5): error NETSDK1053: Pack as tool does not support self contained. [C:\Users\Razr\Desktop\Projects\SVG\Samples\SvgConsole\SvgConsole.csproj]

@RazrFalcon
Copy link
Author

Thanks. Yes, it works now.

@H1Gdev
Copy link
Contributor

H1Gdev commented Feb 27, 2020

@wieslawsoltes

I can build correctly without doing this.

What is cause of this error ?

@wieslawsoltes
Copy link
Contributor

@H1Gdev it's error during dotnet publish, we probably can remove both those properties from csproj.

mrbean-bremen pushed a commit that referenced this issue Feb 27, 2020
…681)

* Small Refactoring in Extensions.
* Fix: #675 'Endless loop and out of memory on a specific file' issue.
* Add test.
* Update ReleaseNotes.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants