DVTSnapshotsTmp is inwhat?

In Xcode 5.1, if your snapshot is corrupt you may get the following error:

tar: Ignoring malformed pax extended attribute  
tar: Ignoring malformed pax extended attribute
tar: Ignoring malformed pax extended attribute
tar: Error exit delayed from previous errors. 

After pushing OK and trying to restore ANY snapshot the following error is thrown.

The item couldn’t be removed because the file name “DVTSnapshotsTmp” is invalid.

Although I am no xCode developer it didn’t take long to figure out that during the restore process of the faulty snapshot, xCode creates this temp directory which gets created half way and doesn’t get deleted, preventing other snapshots from restoring.

So simply enough, to restore to previous (non-damaged) snapshots, or to export one (through Window > Organizer > Project > Export Snapshot) you just have to delete this directory manually.

Just search for the DVTSnapshotsTmp folder (with something like Find Any File) to get a path similar to this:

/private/var/folders/8y/42wn054s541g91y4qxg5dyd80000gn/T/DVTSnapshotsTmp

Not a permanent fix

Even though you can restore to old snapshots, the last one will still remain broken, and what’s more, after taking any new ones they will be broken too.

I imagine there is a way to pinpoint and fix the cause, but for a quick workaround I’ve done the following.

1. Fix the DVTSnapthotsTmp error (by deleting the folder)

2. Through Window > Organizer > Project select a working snapshot (usually the one before the faulty one) and Export Snapshot to a new folder.

3. Through the same window, now pick the broken snapshot and the chances are it will let you go in and compare versions. Copy over the changes to the new project manually and voila.

If you leave the old project copy around now you will have old snapshots there available for you if you need, and the new snapshots in the new copy.

 

I’ve read about a few people having problems with the snapshot feature in Xcode and who swore not to fall into this trap again, but my truth on this is, I’ve had git stuff up too. And it was harder to get the pieces together into one project again, so will I be using snapshots again? Most likely.

Leave a Reply

Your email address will not be published.