• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Snapshot Errors with XCode 3.x workaround?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Snapshot Errors with XCode 3.x workaround?


  • Subject: Snapshot Errors with XCode 3.x workaround?
  • From: Phong Long <email@hidden>
  • Date: Sun, 7 Sep 2008 01:30:28 -0700

Hi, I'm new posting to this mailing list, but have been reading it for awhile to research problems.

One problem that's been cropping up a few times for me lately is a bug that will every now and again corrupt the Snapshot database, resulting in not being to add or restore from snapshots and an in an error similar to:

Unable to change file attributes for "/var/folders/SJ/SJD9LFS9F6ubEN0SQIDu-++++TM/-Tmp-/XcodeSnapshots/..."

There have been a couple posts about this, with no solution or workaround aside form deleting the snapshot archive and having xcode create an empty new one.

This has happened to me twice now, and this kind of takes away from an otherwise awesome feature built into xcode.

determined not to lose everything again, i started poking around and was able to restore all my snapshots.  Here's how i did it:

1) go to ~/Library/Application Support/Developer/Shared/       (or where you set the Developer app support dir to be, this is the default)
2) move SnapshotRepository.sparseimage file (it may have a different name) to your desktop.
3) open up your project in xcode and open the snapshots window, then make a new snapshot.  This creates a new sparseimage
4) close xcode
5) go back to ~/Library/Application Support/Developer/Shared/ and open the newly created disk image (this will be called New Image)
6) open the sparseimage that you moved to the desktop as well (this will be called Old Image)
7) you should have 2 disks mounted on your desktop now, both named Snapshots.  One is from the New Image, the other from the Old Image
8) open the SnapshotArchive.plist file from the Old Image in a text editor and copy everything between the <array>...</array>  (or you can use your favorite plist editor... i'm essentially copying all the snapshot keys from the old image to the newly created one)
9) close that plist, and open up the SnapshotArchive.plist form the NEW Image.  Notice there's much less there, so now u can past in all the keys copied form the  old image.  Save this plist.
10)  Now, copy the contents of the ArchiveDirectory from the Old Image to the New Image.
11) Unmount both Snapshots disks
12) open up your project in xcode, and open up the snapshots window
13) now you should be able to add more snapshots!

it seems that xcode loses track of the sparseimages (in my case, this happens whenever i close my laptop, putting it asleep, when i have a project open in xcode), and it needs a new one.  So, i'm essentially just letting XCode create a new snapshot sparseimage, and then I'm copying over all the old keys and all the old version data.

As xcode calculates the snapshots from the SnapshotArchive.plist, it should be able to find all the old snapshots

hope this helps, it's saved me a lot of frustration.

-phong
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Snapshot Errors with XCode 3.x workaround?
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Xcode older versions?
  • Next by Date: Xcode not detecting undefined functions with static library
  • Previous by thread: Re: Xcode older versions?
  • Next by thread: Re: Snapshot Errors with XCode 3.x workaround?
  • Index(es):
    • Date
    • Thread