SVG corrupt / not valid. Please help!

Post questions on how to use or achieve an effect in Inkscape.
davidraphael
Posts: 5
Joined: Mon Jan 27, 2014 6:12 pm

SVG corrupt / not valid. Please help!

Postby davidraphael » Mon Jan 27, 2014 6:31 pm

Hi all,

I'm about to pop with frustration.

An SVG created in Inkscape suddenly decided that it won't open. My backup file has the same issue.

Inkscape reports:
"Failed to load the requested file"

If I try to open it in Illustrator I get:
"The SVG is invalid. Invalidate it before opening"

I've also tried running WC3 Markup Validation Service which finds the following errors:

"Validation Output: 5 Errors
Error Line 55716, Column 68: AttValue: ' expected
gHZ7XoAwpKWIQb7uzXOkg+T2/R/Xb6+326Iql2mmFAFx22p+fgWXAce27zEHUYjpgkBp

Error Line 55716, Column 68: attributes construct error
gHZ7XoAwpKWIQb7uzXOkg+T2/R/Xb6+326Iql2mmFAFx22p+fgWXAce27zEHUYjpgkBp

Error Line 55716, Column 68: Couldn't find end of Start Tag image line 403
gHZ7XoAwpKWIQb7uzXOkg+T2/R/Xb6+326Iql2mmFAFx22p+fgWXAce27zEHUYjpgkBp

Error Line 55716, Column 68: Premature end of data in tag g line 65
gHZ7XoAwpKWIQb7uzXOkg+T2/R/Xb6+326Iql2mmFAFx22p+fgWXAce27zEHUYjpgkBp

Error Line 55716, Column 68: Premature end of data in tag svg line 4
gHZ7XoAwpKWIQb7uzXOkg+T2/R/Xb6+326Iql2mmFAFx22p+fgWXAce27zEHUYjpgkBp"

Can anyone help me?

best

dR

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

Re: SVG corrupt / not valid. Please help!

Postby tylerdurden » Thu Jan 30, 2014 8:10 pm

Qs:
    Which OS/version?
    Which version Inkscape?
    Any antivirus programs running?
    Are there embedded bitmaps? Or linked?
    Can a file be created, closed and re-opened at all?
    Will a "plain" svg copy fail also?
    Can you post a sample good file and a sample bad file?
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/

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

Re: SVG corrupt / not valid. Please help!

Postby tylerdurden » Thu Jan 30, 2014 8:17 pm

Also,

Local, external or network drive?
Any defrag software running?
Any backup software running?
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/

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:48 pm

OS: WinXP
Local drive
inkscape version: 0.48 (and previous version)
antivirus is Eset nod32 but it wasn't running
no defrag or backup software running
Embedded graphics (png and jpg - see below)
files could not be opened at all


After losing yet another file, I tried an experiment.

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

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

Re: SVG corrupt / not valid. Please help!

Postby tylerdurden » Fri Jan 31, 2014 12:34 am

Here are a couple of test files with embedded jpegs. I'd try to open them, then save and try to re-open them.
Attachments
embeddedJPGtest-PLAIN.svg
(16.53 KiB) Downloaded 251 times
embeddedJPGtest.svg
(17.41 KiB) Downloaded 201 times
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/

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

Re: SVG corrupt / not valid. Please help!

Postby tylerdurden » Fri Jan 31, 2014 12:35 am

Perhaps you can upload a sample svg or a sample of the jpegs you are using.
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/

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:09 am

Hi.

Am I getting it right, that your svg is more than 55716 lines long?
Sounds like it was too large and inkscape couldn't handle it, and chopped it somewhere before the end, resulting in a corrupted svg file -end tags are missing.

Probably you could avoid this by not embedding images -not that it has anything wrong with it, but in this case those added too much data to the codes if I get it right.

The only thing to improve inkscape's performance is to move to a 64bit os and using the Partha compiled 64bit version of inkscape.
Still it won't give you a 100% reliable solution, just about a four time more reliable performance.
http://forum.inkscapecommunity.com/index.php?topic=90.msg462#msg462

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: SVG corrupt / not valid. Please help!

Postby ragstian » Fri Jan 31, 2014 5:05 am

Hi

Lazur Urh;
Still it won't give you a 100% reliable solution, just about a four time more reliable performance.

What does this mean, exactly?
A four times better performance or four times more reliable or a combiantion of both?

Just for your info; 64 Bits is NOT four times the size of 16 Bit.
Every time you add ONE bit you double the size!
64 bit is 281474976710656 times bigger than 16 bit. [ 2^(64-48) ]

bin.png
bin.png (9.26 KiB) Viewed 4840 times

RGDS
Ragnar
Last edited by ragstian on Fri Jan 31, 2014 5:13 am, edited 3 times in total.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

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

Re: SVG corrupt / not valid. Please help!

Postby Lazur » Fri Jan 31, 2014 5:12 am

Hi Ragnar,

I was referring to Brynn's experience and the comparison between those two, in that link.
Personally I couldn't see even that much of a change.
There was an svg in that topic below 1 MB that could crash the 64 bit version easily.

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: SVG corrupt / not valid. Please help!

Postby ragstian » Fri Jan 31, 2014 5:18 am

Hi Lazur.

Ok, that explains it! Interesting - will have to experiment more with the 64-bit Inkscape version.
Sorry for the post then!!

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

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

Re: SVG corrupt / not valid. Please help!

Postby Lazur » Fri Jan 31, 2014 5:24 am

No worries, eventually that svg had problems with the garbage collector inkscape has, and I have no idea how it is enhanced by the 64bit version.
Maybe it is alot better with images? Now on linux I cannot test it.


Return to “Help with using Inkscape”