• 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
Re: xcode 2.2 creates 'virtually corrupt source files'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xcode 2.2 creates 'virtually corrupt source files'


  • Subject: Re: xcode 2.2 creates 'virtually corrupt source files'
  • From: Chris Espinosa <email@hidden>
  • Date: Tue, 13 Dec 2005 13:11:13 -0800

On Dec 13, 2005, at 12:35 PM, Mike Halpin wrote:

Since I did a clean checkout to an external drive, and started building there, found that I get compile time errors which appear to be the result of random garbage, or sometimes a string of '?' in place of some of my code in one or more source files.


At first, I attributed this to some corruption which may have occurred at the time I checked stuff out.   I had been  experimenting with using fire wire ip, and thought that it may  have somehow introduced anomalies into the usage of the external fire wire disk drive on which I was now building.  That would be bad, but it turns out, that's not what was happening.


I discontinued using firewire ip, and whenever I ran into one of these corrupt files, I'd toss it, and update from cvs.  However, I later realized that I was encountering such a file when I had previously completed a full build (after clean all).  Therefore, I had to consider that these files were being corrupted on an ongoing basis.


Did a disk utility 'repair' of the volume, but it came up with no repairs were needed.


I was getting ready to trash the latest bad file and then update from cvs to get a clean copy, but decided to open it one more time to make sure I  was choosing the problem file.  Double clicked on it and it opened in Code Warrior (no surprise there, I have recently ported from codewarrior, and all my sources are still tied to it as their creator),  BUT......


THE FILE WHEN VIEWED IN CODE WARRIOR WAS FINE!!!!!!!!


Next, I went into the finder, and selected the same file, and dropped it on codewarrior, then on xcode.  Now open in two windows, side by side, xcode showed most of the code replaced by a long string of '?'. IN code warrior, it was fine.  Dropped the file on hexedit.  Contents looked fine.  No strings of either ? or anything else that didn't look like my code.


Clearly, xcode had somehow managed create a corrupted cache of data from this file, and was displaying it to me whenever the file was opened., and feeding it to the compiler.


To test this theory, I quit and restarted xcode, and sure enough, the file now is fine, the build completes successfully.


I have seen this problem  across multiple run/quit sessions with xcode, and even across restarting my system.  I fully expect to see it again.


I will post a bug to Apple, but thought someone monitoring this list might already know something about this.


What is far more likely is that Xcode has recorded, in its project file, a file encoding for the file that is inaccurate.  Select the file, Get Info, and check in the General tab that the file is Western (MacRoman encoding) or Unicode (UTF8) or Non-Lossy ASCII or something else sane.  If it's UTF-16 then Xcode will try to display it as such, and get unhappy results.

Chris
 _______________________________________________
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

References: 
 >Searching project produces multiple exceptions (From: Daniel Jalkut <email@hidden>)
 >xcode 2.2 creates 'virtually corrupt source files' (From: Mike Halpin <email@hidden>)

  • Prev by Date: Re: permanent breakpoint?
  • Next by Date: ___AssertFailed
  • Previous by thread: Re: problems setting breakpoints or stepping into some functions
  • Next by thread: permanent breakpoint?
  • Index(es):
    • Date
    • Thread