I've lost an entire day of work and am beyond angry

7,036 views
Skip to first unread message

Mike Duncan

unread,
Feb 11, 2021, 10:07:02 PM2/11/21
to diagrams.net Q&A

So I've been working on a fairly complex diagram, saving regularly and my workstation crashed in the middle of working on a chart.

After reboot the file no longer opens and appears to have become corrupt... can't find any "temp" files or "autosaves" anywhere.

6 hours of work down the drain. I've used this program a ton of the last 3 years and never had an issue like this, is there absolutely no way to recover all of this lost work???

interne...@gmail.com

unread,
Feb 11, 2021, 10:29:19 PM2/11/21
to Mike Duncan, diagrams.net Q&A

I am not sure if this would work with draw.io files but on other modelling software in the past I have used “filemon” which has been replaced by “Process Monitor” https://docs.microsoft.com/en-us/sysinternals/downloads/procmon . It looks at file system activity and if you are lucky it will point to the place in the file it is corrupt and you can manually fix it (or get it to an openable state). It should be as easy as setting the filter on the filename and watch what is happening. I have attached a screenshot of the filter for process and path I just used.

 

This is a generic trick from the “olden days”, hopefully someone else will have an easier solution.

 

Paul

--
You received this message because you are subscribed to the Google Groups "diagrams.net Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drawio+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/drawio/bbabef42-7ff4-492f-9789-969f2ba13952n%40googlegroups.com.

drawio_debug.png

Paul McIntosh

unread,
Feb 11, 2021, 10:33:33 PM2/11/21
to Mike Duncan, diagrams.net Q&A
Oh - big caveat, this is hacking and bypassing what the software intended. So only do this on a copy and don't expect the result to be stable, it is just a rescue method. If it works, I would copy+paste content to a fresh diagram to avoid hidden corruptions introduced by manually fiddling with things.

Paul

Mike Duncan

unread,
Feb 11, 2021, 10:53:35 PM2/11/21
to diagrams.net Q&A
Hey Paul thanks for the advice! I've got ProcMon downloaded, running, and I've used the filters you mentioned and opened the corrupt file... so far so good :)

I can see the threads related to the file as it opens but can't figure out how to use this to recover the file during this process?

Ben Wellborn

unread,
Feb 11, 2021, 11:17:14 PM2/11/21
to dra...@googlegroups.com
another thing to consider is that the file is compressed by default.  if you can unzip the file and see xml text, you're on the right track.
maybe there are some zip recovery utilities to try?  I don't know of any off the top of my head.

interne...@gmail.com

unread,
Feb 11, 2021, 11:18:12 PM2/11/21
to Mike Duncan, diagrams.net Q&A

Ok – assuming it works the same as for UML model files, the offset and length will tell you where in the file it spat the dummy.

 

When I used it for debugging there were corrupt characters there and you could fix them in a text code editor…

 

Sorry I just looked at the file format and it doesn’t appear to be saved as xml, so this method might not work if it is compressed.

 

If you look at my screenshot, it does look for a ~$ yourfilename.drawio.bkp file. Maybe you have something like that on your file system?

Mike Duncan

unread,
Feb 11, 2021, 11:33:00 PM2/11/21
to diagrams.net Q&A
I have been able to convert the file to .xml by changing the file extension and I can also just open the file directly in NotePad++.

Once I reach a certain point in the file it is just filled with "Null"s and as it's XML no closing "</device></mxfile>" tags

I have tried deleting all the null values, adding in variations of the closing tags, etc.. and none of that has worked.

I think I can see the point in ProcMon where the file is failing but it was filled with images and in XML it's just a long string of "blob" data with no end :(

Not sure what else I can do

Marija Radovic

unread,
Feb 12, 2021, 4:14:47 AM2/12/21
to Mike Duncan, diagrams.net Q&A
Hi,

Where did you save the diagram? Did you use diagrams.net online or desktop app?

Regards,

Mike Duncan

unread,
Feb 12, 2021, 4:16:46 AM2/12/21
to Marija Radovic, diagrams.net Q&A
The desktop app... from what I've been reading the web version has mechanicisms in place to prevent stuff like this right?

David Benson [diagrams.net]

unread,
Feb 12, 2021, 5:40:15 AM2/12/21
to diagrams.net Q&A
The desktop app has a draft save that is only removed once the main saved file completes the save and is validated as having saved. What version of desktop are you using?

ald...@gmail.com

unread,
Feb 12, 2021, 7:37:48 AM2/12/21
to diagrams.net Q&A
Is there a file called ~${filename}.bkp in the directory?
Reply all
Reply to author
Forward
0 new messages