SVG corrupt / not valid. Please help!

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
davidraphael
Posts: 5
Joined: Mon Jan 27, 2014 6:12 pm

SVG corrupt / not valid. Please help!

Postby davidraphael » Thu Jan 30, 2014 6:21 pm

Hello all,

I just lost another two day's work (and wages) because of 'validation' issues.

I tried posting about this issue earlier this week but it didn't get posted.

The problem:
-- I create an Inkscape .svg in inkscape

--When I come to open it next day or a few days later I get the following message:
'Failed to load the requested file'

-- When I try to open it in Illustrator I get the following message:
'File not valid. Validate it before opening'

-- I tried using an online XML validation service but it crashes because of the number of errors in the file.

I am at the end of my tether.

can anyone help?

thanks

dR

davidraphael
Posts: 5
Joined: Mon Jan 27, 2014 6:12 pm

Re: SVG corrupt / not valid. Please help!

Postby davidraphael » Thu Jan 30, 2014 8:33 pm

Update:

I opened the file in notepad, stripped away the element that causes the line error(s) - in this case an embedded PNG - and added XML end-tags.
The file now opens again, but is missing much of the information.

I tried the same method with another 'corrupted/unvalidated' file. Again, it proved to be errors caused by embedded graphics, this time JPEGs.
And again, most of the file's information is lost, so I more-or-less have to start over.

Why is Inkscape not handling embedded graphics? Is this a known error?

This issue has cost me a lot of time and money so far. Incredibly frustrating.

dR

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

Re: SVG corrupt / not valid. Please help!

Postby Lazur » Fri Jan 31, 2014 4:19 am

Hi.

In your other topic I wrote it happened probably because your file was too large with the embedded images.
http://www.inkscapeforum.com/viewtopic.php?f=5&t=16772&p=62049#p61933
How to prevent it from happening/to have a better result if it happens next:
move the images to the bottom before saving (End).
Svg-s are constructed in a way, that elements are appearing in the orther they are written in the codes.
Thus, if you put the large image part to the bottom, you could make it working if it got corrupted, hopefully by only loosing the image data.
And, by the way, you can correct the embedded images manually too with a notepad:
they get base64 coded, which codes you can get at online sites like http://webcodertools.com/imagetobase64converter
or from other svg-s they are embedded in.

Hope you can get along with it.

davidraphael
Posts: 5
Joined: Mon Jan 27, 2014 6:12 pm

Re: SVG corrupt / not valid. Please help!

Postby davidraphael » Fri Jan 31, 2014 11:01 pm

Thanks,

Moving the pngs/jps to the bottom is a great idea.
will give that a go

I certainly noticed that everything below the corrupted (and yes, very large) png was lost.

againstmarj
Posts: 4
Joined: Thu Feb 06, 2014 11:07 am

Re: SVG corrupt / not valid. Please help!

Postby againstmarj » Thu Feb 06, 2014 11:13 am

Hi, I'm actually having the same issue. My computer crashed and now Inkscape "cannot load the requested file." Wondering if there was anyone who could look at the XML and try to salvage the file??

I tried to attach it but it was too large, not sure how I would get it on here.

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

Re: SVG corrupt / not valid. Please help!

Postby tylerdurden » Thu Feb 06, 2014 11:21 am

You can probably upload to an online sharing account like Google Docs or Dropbox, then post the link here. (Ensure the file permissions are set to anyone with the link.)
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/

againstmarj
Posts: 4
Joined: Thu Feb 06, 2014 11:07 am

Re: SVG corrupt / not valid. Please help!

Postby againstmarj » Thu Feb 06, 2014 12:53 pm


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

Re: SVG corrupt / not valid. Please help!

Postby tylerdurden » Thu Feb 06, 2014 1:19 pm

I looked at the file in Textpad... I don't believe it's recoverable. It's 100% null characters.
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/

againstmarj
Posts: 4
Joined: Thu Feb 06, 2014 11:07 am

Re: SVG corrupt / not valid. Please help!

Postby againstmarj » Thu Feb 06, 2014 1:41 pm

Ugh. Thank you so much for at least trying.

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

Re: SVG corrupt / not valid. Please help!

Postby Lazur » Thu Feb 06, 2014 8:03 pm

Yes, there are only NUL characters, which normally doesn't appear in inkscape svg-s at all. Only in pdf-s?
If your computer crashes regularly, then you might set up an auto-saving in the inkscape preferences panel under the save settings (Shift+Ctrl+P).

againstmarj
Posts: 4
Joined: Thu Feb 06, 2014 11:07 am

Re: SVG corrupt / not valid. Please help!

Postby againstmarj » Fri Feb 07, 2014 12:33 am

Weird. It was definitely saved as an SVG.

And yes, I finally enabled auto-save. I thought I'd already had it set up, because in the past I've crashed and Inkscape saved a backup of my file any way. Ah well, you live and learn (and waste a week drawing for nothing).


Return to “Discuss Software Issues”