SVG File Corrupt?

Post questions on how to use or achieve an effect in Inkscape.
pkthunda
Posts: 6
Joined: Sun Jul 01, 2012 12:35 pm

SVG File Corrupt?

Postby pkthunda » Sun Jul 01, 2012 12:43 pm

Okay, so here's the problem. I've had Inkscape for a while now and was working on a map for about 6 months for an online game. But then my computer crashed, and luckily I was able to recover just about everything...except the map. Whenever I try to load it on Inkscape (which I never had any trouble doing prior to my computer crashing), I keep getting a message saying "Failed to load the requested file C:\Users\MyName\Pictures\WarLight\warlight map e (finished product).svg". Unfortunately, I'm not very good with computers so I don't know if this means it's corrupt or not. Right now Inkscape is working fine and it opens everything else except this one file. I spent six months working on this map and I'd really hate to see all that work vanish. :( If anybody knows how to fix this, please let me know. Thanks!

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: SVG File Corrupt?

Postby brynn » Sun Jul 01, 2012 1:56 pm

Image
Welcome to InkscapeForum!

Did the crash happen while you were working on the file? How are you trying to open the file? If you're using File menu > Open Recent, it might not be corrupt. I don't know how serious of a crash it was, or if you had to reinstall anything, or maybe move some things around. That error message might just mean that the file is no longer where the bookmark says it used to be.

Try this, if you haven't already. Find the map file using a file manager (such as Windows Explorer). Right click on it, then Open With, then choose Inkscape. If Inkscape isn't presented as an option, click the Browse button and find Inkscape. If you still get the error, then it sounds like it could be corrupt.

If it looks like it might be corrupt, then I hope you have some backups somewhere. Sometimes it's possible to fix corrupted files, but I don't know how. Others might have some ideas though, if that's the case.

Let us know how it goes :D

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: SVG File Corrupt?

Postby ~suv » Sun Jul 01, 2012 6:08 pm

brynn wrote:If it looks like it might be corrupt, then I hope you have some backups somewhere. Sometimes it's possible to fix corrupted files, but I don't know how. Others might have some ideas though, if that's the case.
Not without having access to the "corrupt" SVG file.

(If a file got corrupted due to a computer crash, it's likely to miss some data which makes the SVG file invalid (missing closing tags). Any attempts to manually "fix" the file won't be able to restore the lost data, but will allow to open the file in Inkscape again and continue working with the data which is still intact -- see for example this similar earlier topic: I cant open a file ? possibly corrupted, how to fix?)

pkthunda
Posts: 6
Joined: Sun Jul 01, 2012 12:35 pm

Re: SVG File Corrupt?

Postby pkthunda » Mon Jul 02, 2012 2:19 am

Well I tried opening it the way you suggested brynn and I still got the same message. :( The crash itself was serious, I had to buy another hard drive and everything and someone I know salvaged what he could off the old hard drive. So that's probably what caused the corruption. However, it does open in Notepad, which I did after reading the post that ~suv suggested. I don't know if this is a good thing, since now it's nothing but letters and numbers. Not sure what to do from here...any ideas? Thanks again for the help!

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: SVG File Corrupt?

Postby brynn » Mon Jul 02, 2012 1:22 pm

pkthunda wrote:Not sure what to do from here...any ideas?

Well, for someone who knows the XML code, they would go through the text file (XML in some appropriate text or code editor) and replace whatever they can. Probably they can just fix the tags (as ~suv mentioned) since they would have no idea about the original content. I'm not sure if there might be certain text editors, which are designed specifically for programmers, which might be able to automatically close any open tags. But it seems reasonable to me that there might be such a thing. The problem with that approach though, is that missing closing tags might not be.....probably isn't all that's missing. Some parts might be entirely lost (again, as ~suv already said).

Actually with a crash that serious, I'm not sure if recovering would be worth the trouble. But I can only leave that decision up to you....and anyone who might volunteer to fix the text XML for you. If I knew how to do it, I certainly wouldn't mind having a look. But I only know XML enough to recognize it. I can't write it or read it at all.

Hhmmm....I wonder.....do you happen to remember the approx size of the file from before the crash? I wonder, if you were to compare the size before and after the crash, if it might be an indication of how much was lost, and serve as a decision maker, about whether to bother recovering? Well, just a thought :D

OooKkk, sorry for rambling. What you'll need to do is upload the file to a file sharing site such as MediaFire (there are many others out there on the net). You''ll be able to upload it, even though it's corrupt. Then post the link to it in your next message. After that, anyone who might volunteer to fix the code, can download it, and work on it. But you have to upload the SVG file itself, not the Notepad file.

(Actually my mention of the Notepad file in the other topic that ~suv linked us to, was part of my learning process. Now I know that you can't use Notepad to fix an XML file. Or....well maybe you can, but it's not the best tool. And I still don't know what kind of text editor would be appropriate, but that doesn't matter in this kind of situation. Since the SVG file contains the XML, whoever volunteers to fix it can use whatever program they want -- maybe they would simply use the XML editor (DUH??!!)) (Still learning Image ......still learning, and I hope I'll never stop learning.....I live to learn :lol: )

Anyway, I hope you can recover most of it. Good luck :D

chriswww
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: SVG File Corrupt?

Postby chriswww » Mon Jul 02, 2012 6:21 pm

hmm...a hard drive crash, followed by an unknown recovery by someone...the file could have either just the last bits you were working on missing OR it could be a complete disaster with any amount of blocks missing or corrupt.
if you can manage to upload it somewhere for us to look, might be able to give you an idea.
btw did you have inkscape autosave feature turned on? in which case on the old hard drive there could be a number of recent copies of the file you were working on.
the other thing, now that backup storage solutions are darned cheap (about $100 or less), I suggest you get one of these. they do a full and incremental backup totally unattended whenever you're not using the computer. no need to buy a backup program separately or anything.

pkthunda
Posts: 6
Joined: Sun Jul 01, 2012 12:35 pm

Re: SVG File Corrupt?

Postby pkthunda » Tue Jul 03, 2012 5:40 am

Unfortunately, I don't remember the exact size of it before my computer crashed. Although I do wanna say the autosave feature was turned on, but I'm 100% certain on that. But even if it was my old hard drive was extremely damaged, I was actually shocked that my friend could recover so much off it (as was he :lol: )

But anyway, I uploaded the file to Mediafire like you suggested, so here's the link:
http://www.mediafire.com/?nzoq6p8sng8kfnd

Hopefully somebody knows how to do this stuff! :)

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: SVG File Corrupt?

Postby v1nce » Tue Jul 03, 2012 6:28 am

hi,

Is your file supposed to contain diacritics (= special character = éêô...) ?

See attachment for what I can restore for now
Attachments
recup.jpg
recup.jpg (104.65 KiB) Viewed 11650 times

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: SVG File Corrupt?

Postby v1nce » Tue Jul 03, 2012 9:19 am

I don't know if one can get it better.
There are parts that should not be there (hexadecimal JFIF structure) so it looks like the recovery tool mixed the svg with other files.
I'll upload the svg tomorrow.

If you still have the old hdd you can try to clone it and use another recovery tool (sleuth kit) to get some more content

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: SVG File Corrupt?

Postby brynn » Tue Jul 03, 2012 12:01 pm

Well, it does appear to have some map-like content, lol :D

chriswww
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: SVG File Corrupt?

Postby chriswww » Tue Jul 03, 2012 12:38 pm

a task like that sort of map...i would try not to rely on constructing it purely in a GUI based tool like inkscape or anything else. instead I would try to get all those co-ordinates first, and have them in a file, before going to svg or whatever. this sort of methodology is not fullproof (against hard disk crashes especially) but it can help against application crashes corrupting all work up to date. of course it's not always possible to do this but the main thought is that for large projects try to modularize the work, and leverage off automation etc.

pkthunda
Posts: 6
Joined: Sun Jul 01, 2012 12:35 pm

Re: SVG File Corrupt?

Postby pkthunda » Thu Jul 05, 2012 4:43 am

Wow, that's pretty much all of it right there :D I'm surprised you could recover that much. This time I'm gonna back it up on a flash drive in case this sort of thing ever happens again

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: SVG File Corrupt?

Postby v1nce » Thu Jul 05, 2012 5:40 am

Do you need the bitmap used as "background" (a very large image 2500 * 3000) or do you have a copy ?
If you need it I'll try to recover it (but it'll takes some times and I won't be able to recover it fully).
if not I'll post the svg without this image.

pkthunda
Posts: 6
Joined: Sun Jul 01, 2012 12:35 pm

Re: SVG File Corrupt?

Postby pkthunda » Fri Jul 06, 2012 12:03 am

Well try posting the svg first and I'll see how it looks?

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: SVG File Corrupt?

Postby v1nce » Fri Jul 06, 2012 8:59 am


pkthunda
Posts: 6
Joined: Sun Jul 01, 2012 12:35 pm

Re: SVG File Corrupt?

Postby pkthunda » Fri Jul 06, 2012 9:17 am

v1nce, you are a SAVIOR. Thank you very much for doing that, you just saved me a lot of time! :D

kanuto
Posts: 1
Joined: Thu Jan 09, 2014 11:42 am

Re: SVG File Corrupt?

Postby kanuto » Thu Jan 09, 2014 11:54 am

i can't open my SVG file..i have the same problem "Failed to load requested file C:\Users\KANUTO\Desktop\mayora.svg" . can someone help me to recover my project.. please help me :(


Return to “Help with using Inkscape”