# Freezes when trying to pull in a SVG

**URL:** <https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259>\
**Category:** Ignition\
**Created:** [October 30, 2014, 1:16pm UTC](https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259 "2014-10-30T13:16:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blefe001](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Blefe001](https://forum.inductiveautomation.com/u/Blefe001)\
**Post date:** [October 30, 2014, 1:16pm UTC](https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259/1 "2014-10-30T13:16:07Z")

</div>

I have an SVG file I want to pull in and when I drag and drop in on the page Ignition seems to freeze (constant loading circle showing).

1. What would make this happen?
2. How can I get the SVG to work?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 30, 2014, 5:35pm UTC](https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259/2 "2014-10-30T17:35:28Z")

</div>

Can you attach the SVG or email it to support?

Ignition’s SVG parsing library doesn’t handle all SVGs or their element types, so we’ll need to see what’s going wrong.

---

<div class="post-metadata">

**Author:** ![Blefe001](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Blefe001](https://forum.inductiveautomation.com/u/Blefe001)\
**Post date:** [October 31, 2014, 11:57am UTC](https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259/3 "2014-10-31T11:57:55Z")

</div>

Ok so I pulled up the diagnostics console to see what is causing the error and I get the following message.

[color=#FF0040]Exception in thread “AWT-EventQueue-2” org.apache.batik.bridge.BridgeException: null:-1  
The URI "data:image/png;base64,

…long data section…

on element can’t be opened because:  
URL data in unsupported format or corrupt  
at org.apache.batik.bridge.UserAgentAdapter.getBrokenLinkDocument(UserAgentAdapter.java:449)  
at org.apache.batik.bridge.SVGImageElementBridge.createRasterImageNode(SVGImageElementBridge.java:604)  
at org.apache.batik.bridge.SVGImageElementBridge.createImageGraphicsNode(SVGImageElementBridge.java:327)  
at org.apache.batik.bridge.SVGImageElementBridge.buildImageGraphicsNode(SVGImageElementBridge.java:177)  
at org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(SVGImageElementBridge.java:119)  
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:213)  
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.inductiveautomation.factorypmi.designer.workspace.DropHandler$SVGImporter.parseSvg(DropHandler.java:314)  
at com.inductiveautomation.factorypmi.designer.workspace.DropHandler$SVGImporter.run(DropHandler.java:329)  
at java.awt.event.InvocationEvent.dispatch(Unknown Source)  
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
at java.awt.EventQueue.access$400(Unknown Source)  
at java.awt.EventQueue$3.run(Unknown Source)  
at java.awt.EventQueue$3.run(Unknown Source)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)  
at java.awt.EventQueue.dispatchEvent(Unknown Source)  
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)  
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)  
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)  
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.awt.EventDispatchThread.run(Unknown Source)[/color]

I have also attached a .txt file to show the console printout more easily.

Let me know if you need any other help or files to debug the problem.  
[SVG console Error Message.txt](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/ff9732c63d9a2f8fe52165e1c7e7f17be2a5f859.txt) (2.16 KB)

---

<div class="post-metadata">

**Author:** ![Blefe001](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Blefe001](https://forum.inductiveautomation.com/u/Blefe001)\
**Post date:** [November 5, 2014, 1:03pm UTC](https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259/4 "2014-11-05T13:03:28Z")

</div>

So is the solution just not to use an SVG? Or are you still working on a fix?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 5, 2014, 2:25pm UTC](https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259/5 "2014-11-05T14:25:37Z")

</div>

It looks like the problem is the SVG you’re trying to use contains a link to a raster image and that link/image can’t be loaded. I’ll have to run it by Carl to make sure that’s what’s going on. I’m not sure if it’s blowing up because the image can’t be loaded, because embedded links aren’t supported, or because embedded images aren’t supported; I’ll find out.

If you could attach or email the SVG in question that might help as well.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [November 5, 2014, 4:51pm UTC](https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259/6 "2014-11-05T16:51:49Z")

</div>

Just to echo Kevin’s sentiment: please send us the SVG in question.

---

<div class="post-metadata">

**Author:** ![Blefe001](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Blefe001](https://forum.inductiveautomation.com/u/Blefe001)\
**Post date:** [November 10, 2014, 5:45pm UTC](https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259/7 "2014-11-10T17:45:29Z")

</div>

Ok I am trying to attach the file to send it to you and when I click “add the file” below it says “the extension SVG is not allowed” so how would you like me to send it to you? Email?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 10, 2014, 5:48pm UTC](https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259/8 "2014-11-10T17:48:08Z")

</div>

You can email it to [support@inductiveautomation.com](mailto:support@inductiveautomation.com). If it’s too large or gets blocked maybe you can zip it first?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 11, 2014, 4:40pm UTC](https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259/9 "2014-11-11T16:40:27Z")

</div>

Alright, we looked at your SVG and apparently it’s nothing but an embedded base64 encoded PNG. I guess our SVG renderer doesn’t support this case, but since there’s absolutely nothing else to your SVG maybe you can just take whatever the raster image is supposed to be and import that instead.

---

<div class="post-metadata">

**Author:** ![Blefe001](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Blefe001](https://forum.inductiveautomation.com/u/Blefe001)\
**Post date:** [November 11, 2014, 4:57pm UTC](https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259/10 "2014-11-11T16:57:37Z")

</div>

For now just using the original PNG will work. I was just hoping to use SVGs in case future scaling would cause pixelated images. Let me know if the next update handles this case.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 11, 2014, 5:13pm UTC](https://forum.inductiveautomation.com/t/freezes-when-trying-to-pull-in-a-svg/9259/11 "2014-11-11T17:13:58Z")

</div>

Even if the SVG renderer supported it, your embedded raster image won’t magically start scaling nicely. If you want something that scales nicely it has to actually be a vector-based image.
