question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SVG crashes the running process.

See original GitHub issue

Svg that contains clipPath on images crashes with OutOfMemory Error. Attaching the SVG test.svg.zip ThreadDump StackTrace:

"JobHandler: /var/workflow/instances/server0/2020-01-16_1/update_asset_12:/content/dam/build_via_inkscape.svg/jcr:content/renditions/original" #1717 daemon prio=1 os_prio=31 tid=0x00007fca6382d000 nid=0x34903 runnable [0x0000700018246000]
   java.lang.Thread.State: RUNNABLE
        at sun.awt.geom.Order3.nextVertical(Order3.java:532)
        at sun.awt.geom.Curve.compareTo(Curve.java:969)
        at sun.awt.geom.Edge.compareTo(Edge.java:90)
        at sun.awt.geom.AreaOp.pruneEdges(AreaOp.java:278)
        at sun.awt.geom.AreaOp.calculate(AreaOp.java:159)
        at java.awt.geom.Area.pathToCurves(Area.java:195)
        at java.awt.geom.Area.<init>(Area.java:126)
        at org.apache.batik.bridge.SVGClipPathElementBridge.createClip(SVGClipPathElementBridge.java:158)
        at org.apache.batik.bridge.CSSUtilities.convertClipPath(CSSUtilities.java:725)
        at org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNode(AbstractGraphicsNodeBridge.java:146)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:224)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
        at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:82)
        at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader$Rasterizer.transcode(SVGImageReader.java:309)
        at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
        at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
        at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader$Rasterizer.init(SVGImageReader.java:549)
        - locked <0x000000070448a3e0> (a com.twelvemonkeys.imageio.plugins.svg.SVGImageReader$Rasterizer)
        at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader$Rasterizer.getDefaultWidth(SVGImageReader.java:562)
        at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader.getWidth(SVGImageReader.java:229)
        at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader.paramsToHints(SVGImageReader.java:169)
        at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader.read(SVGImageReader.java:120)


Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
RitwikSrivastavacommented, Jan 23, 2020

Thanks for the reply. We are using twelve monkeys version 3.4 and batik version 1.11 and java 8. iam also trying on MacOs.

-Ritwik

0reactions
haraldkcommented, Aug 8, 2020

Closing this for now, as I think this has to be fixed either in the JDK or in Batik.

– Harald K

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio Imported SVG file (resulting XML) crashes the ...
I imported a SVG file to my Android project. I try to display the resulting xml. It keeps crashing the app. The interesting...
Read more >
Inkscape crashes when trying to set shadow to the SVG object
Activity · Open the terminal. · Install gdb . · Run gdb path/to/inkscape · Input set pagination off and press Enter. This makes...
Read more >
Out of memory error crashes Chrome with large SVG file #96
We have an application that edits SVG based maps. The files range from a few mb in size to hundreds. There doesn't seem...
Read more >
Word crashes after updating all fields (using F9) in a marked
Word crashes after updating all fields (using F9) in a marked text containing linked and embedded(!) SVG files that are missing.
Read more >
243537 – Crash when viewing svg file - Red Hat Bugzilla
Description of problem: Openning of a SVG image causes that application which are using cairo for renderring crashes (Nautilus, gThumg, ImageMagick display) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found