corrupt SVG file.

Discuss SVG code, accessible via the XML Editor.
android272
Posts: 8
Joined: Thu Aug 28, 2014 7:40 pm

corrupt SVG file.

Postby android272 » Sun Mar 13, 2016 3:24 pm

I don't know if this [1] is the right place to put this but can anyone help me fix this SVG file? When I try to open it in Inkscape it tells me:
Failed to load the requested file /path/to/file.svg

but when I load it up in firefox or my OS's image viewer I can view it fine and it firefox it loads slow enough that I can see various parts of the image show up as if it is not corrupt. I tried editing the file in gedit but I can not tell what is wrong with it. I would really like to get this image working again as it took me a few weeks to create.

[1]
https://drive.google.com/open?id=0B7y5FMHPsyaNOWdaYlNUaG9DOTg

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: corrupt SVG file.

Postby hulf2012 » Sun Mar 13, 2016 4:01 pm

Hello
I've tried to download the SVG, but it says I don't permissions
"Viewers cannot download"
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: corrupt SVG file.

Postby Lazur » Sun Mar 13, 2016 8:36 pm

Hi.

Same here, could only download the webp thumbnail.

android272
Posts: 8
Joined: Thu Aug 28, 2014 7:40 pm

Re: corrupt SVG file.

Postby android272 » Mon Mar 14, 2016 3:23 am

Sorry about that, here [1] is an updated link. I made sure to log out of my drive account to see if I could download it and I could.

[1]
https://drive.google.com/file/d/0B7y5FM ... sp=sharing

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: corrupt SVG file.

Postby Lazur » Mon Mar 14, 2016 4:02 am

Could open it without an error message.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: corrupt SVG file.

Postby Lazur » Mon Mar 14, 2016 4:47 am

Made some little changes on the page size and the grid:

brick 2

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: corrupt SVG file.

Postby hulf2012 » Mon Mar 14, 2016 11:34 am

Hello
the file at your last link, I was capable to open it on Inkscape without problems. :?:

Well It took a little to load. But I have a core i5-4460 with 8gb of RAM and a I think is decent Geforce 210 graphic card. It's not the best for graphic works, but I think it's good enough.

Also, my system is Ubuntu 14.04LTS.

- I can't say for sure but maybe your system doesn't have enough RAM, or something related. Please post the details of your system... if possible.

Also, when open your file in Firefox, and checking in console (Ctrl+Shift+K), some messages appeared:

Code: Select all

Propiedad desconocida 'block-progression'.  Declaración rechazada. Brick%20(copy).svg
Propiedad desconocida 'baseline-shift'.  Declaración rechazada. Brick%20(copy).svg
Propiedad desconocida 'solid-color'.  Declaración rechazada. Brick%20(copy).svg
Propiedad desconocida 'solid-opacity'.  Declaración rechazada. Brick%20(copy).svg
Propiedad desconocida 'color-rendering'.  Declaración rechazada. Brick%20(copy).svg
Propiedad desconocida 'enable-background'.  Declaración rechazada. Brick%20(copy).svg
Propiedad desconocida 'color-rendering'.  Declaración rechazada. Brick%20(copy).svg
Propiedad desconocida 'enable-background'.  Declaración rechazada...

"unknown propiety... "rejected declaration"... but the drawing was rendered anyway. And as I said before, Inkscape can open and edit it.
- Did you imported or used SVG from other sources not related with Inkscape??

Hope you solved your problem

greetings
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: corrupt SVG file.

Postby tylerdurden » Mon Mar 14, 2016 12:15 pm

Add me to the pile...

It opens on my XP machine with 2GB ram, but ja, slowly because it is a very big file. >11MB even without the bitmaps.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

android272
Posts: 8
Joined: Thu Aug 28, 2014 7:40 pm

Re: corrupt SVG file.

Postby android272 » Mon Mar 14, 2016 1:14 pm

So I have a decent PC as well I am running64 bit Ubuntu 14.04LTS Live USB with 16 GB of ram, Intel Core i5-3570k CPU @ 3.40GHz x 4, Gallium 0.4 AMD CAPE VERDE graphics.

When you all suggested that it might be my machine I thought oh yah I am running ubuntu on a Live USB right now, waiting for a internal hard drive to install Linux on. I thought that maybe the live USB could not handle a 12 MB file right now so I created a new image and used the spray paint tool to create many objects like in the image I am trying to open. Got it to 12 MB's and I can open the new file so that is not it.

I am recovering from a dead drive and just got my hard drive back from Geek Squad So I thought maybe this is just one of many files that was corrupted but it is strange that I can view it in my image viewer, firefox, chrome, and you all can open it in Inkscape.

hulf2012 said:
"unknown propiety... "rejected declaration"... but the drawing was rendered anyway. And as I said before, Inkscape can open and edit it.
- Did you imported or used SVG from other sources not related with Inkscape??


No I only use Inkscape and I don't even bother opening SVG's with GIMP so that should not be a problem. I looked at the code in firefox as well and it looked fine, don't read SVG, but it looked fine. I did open it in a text editor and it looked a bit strange, it did not mach up with what was shown. It is a bit too much to quote what I see here though.

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: corrupt SVG file.

Postby hulf2012 » Mon Mar 14, 2016 1:44 pm

Hello
Lazur posted a modified file. I may be wrong, but the embedded raster images doesn't appear in it. Most of the times, embedded raster images causes problems when the hardware is not enough, or the file is too big.
Please check if you can open without problems.

Your machine it's even better than mine :o . Sooo ... RAM is not the problem...
Or is it?
Live USBs uses RAM to charge their system files. That's is also the reason I find them very fast for some tasks, just based in my experience.

Maybe is the combination of raster images and vector images which is causing problems to open your file, in this special case, where you are using a LiveUSB.

If you can, try to do a test embedding some raster images in your new file. If still doesn't open...
What did you find strange in the svg code?... something like:

Code: Select all

xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABEAAAARACAYAAADu/yZPAAAA

That is because the embedded raster image


Again, please check Lazur's file. If it opens, at least is a workaround...
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

android272
Posts: 8
Joined: Thu Aug 28, 2014 7:40 pm

Re: corrupt SVG file.

Postby android272 » Mon Mar 14, 2016 3:25 pm

oh I forgot about the image Lazur posted. I don't seem to be able to open his file though. When I try to view it in the image viewer I get:

Code: Select all

Could not load image 'file.svg'
Error domain 1 code 4 on line 1 colum 1 of file:///path/to/file.svg: Document is empty


When I try to open it in Firefox I get this error:

Code: Select all

XML Parsing Error: not well-formed
Location: file:///home/ubuntu/Pictures/unspecified.svg
Line Number 1, Column 1:�PNG


and here is what I get in chrome:

Code: Select all

This page contains the following errors:

error on line 1 at column 1: Document is empty
error on line 1 at column 1: Encoding error
Below is a rendering of the page up to the first error.


I remembered that this file has about three raster images in it one I know was big. So I put four raster images in my test file and enlarged one. When I did this I could no longer open the image. So now we know that the raster images were a problem.

We also know that everyone except me can open it in inkscape so it might also be that I am Using a live USB. I tested this on my moms crapy laptop as well and it opened in Inkscape just fine. So I guess I might just have to wait for my new hard drive to work on this file.

thank you guys for helping out and teaching me something I did not know about Inkscape. I will have to use less raster images in my SVG's from now on.

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: corrupt SVG file.

Postby hulf2012 » Mon Mar 14, 2016 3:40 pm

:?: :?:
I opened Lazur's file with Inkscape 0.91 and no problems.

Maybe it's something related with using the liveUSB, but more I can't say.

It's not that embedding images in SVG is a big issue. Is the combination of that and systems with small amounts of RAM, or very old hardware. In your case, I believe, is the use of a Live USB distro... and something else??.
So far, the best solution is keep your file and wait for your new hard drive. I don't think there will be more problems :roll:

Best wishes
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

android272
Posts: 8
Joined: Thu Aug 28, 2014 7:40 pm

Re: corrupt SVG file.

Postby android272 » Mon Mar 14, 2016 3:54 pm

Thanks I hope not I was just about to submit this as graphics to the open source game [url]teeworlds.com[/url]. It would really suck to mess it all up right before I submited it.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: corrupt SVG file.

Postby Lazur » Mon Mar 14, 2016 8:18 pm

Here is another try:

brick 3

With all objects converted to paths, all groups ungrouped, and everything copy/pasted to a new layer to remove transformations.
Ended up a larger file though.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: corrupt SVG file.

Postby Moini » Tue Mar 15, 2016 12:35 am

Please update your Inkscape version from inkscape:version="0.48.4 r9939" to the current one (skipping 0.48.5 in the process).

As the file can be opened in the current one, there may be an old bug preventing this.
Use the ppa for Ubuntu: https://launchpad.net/~inkscape.dev/+ar ... ntu/stable
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

android272
Posts: 8
Joined: Thu Aug 28, 2014 7:40 pm

Re: corrupt SVG file.

Postby android272 » Tue Mar 15, 2016 1:11 am

Please update your Inkscape version from inkscape:version="0.48.4 r9939" to the current one (skipping 0.48.5 in the process).

As the file can be opened in the current one, there may be an old bug preventing this.
Use the ppa for Ubuntu: https://launchpad.net/~inkscape.dev/+ar ... ntu/stable


this worked I forgot that I updated to the latest Inkscape before I created this image. I am able to open this image even with running the Live USB.


Return to “SVG / XML Code”