Solipsism Gradient

Rainer Brockerhoff’s blog

Browsing Posts tagged Xcode

Intel debugging

No comments

WWDC was a great opportunity to talk to friends in the flesh and to make contact with Apple people, all of whom were extremely patient and polite.

One of the very last talks I had was with a senior ADC Labs manager (sorry, the name isn’t in my cache just now), who assured me that a couple of months down the road Intel machines will be available at the ADC Compatibility Labs for debugging.

I have just received an e-mail from ADC Labs stating that their equipment is also available for remote debugging over either ssh or Timbuktu, at no charge to Select or Premier developers. So I’ll just have to watch for the new machines to pop up on the equipment list and presto; no need to spring for the Transition Kit.

My RBSplitView seems now to be working well – I killed all known bugs in the implementation itself, and nearly all in the Interface Builder palette. There’s a sample application and documentation, and some developers seem to be interested in using it in production code. So, unless a serious bug is discovered in the next few days, I’ll call this version 1.0 and make a separate “Source Code” page here.

Thanks to Steve Gehrman of CocoaTech for helping with debugging and offering many suggestions. I also looked at dozens of code examples of IBPalettes and NSSplitView subclasses and learned a little from every one, although I didn’t copy any actual code.

Now at last – hopefully – we’ll return to our regular programming… icon_wink.gif

So it goes…

No comments

An aggravating agglomerated aggregate of glitches glommed onto me yesterday. After nearly 10 years without losing any significant data, an errant shell script (in an Open Source project I had just downloaded from the net) removed a goodly part of my Home folder. I noticed things crashing and disappearing, finally deduced what must have been happening, and killed the miscreant task.

Of course, Murphy decreed that no recent backup of these data existed… the external FireWire drive I had been using for backups turned out to be unreliable over a mont ago and I’m still searching for a replacement.

The BSD/Unix underpinnings of Mac OS X imply that many actions that involve command-line stuff fail when confronted with file and folder names that contain characters classic Mac users are prone to use: hyphens, spaces and accented characters all make naïve shell commands go astray. (This rarely if ever affects BSD tools called directly from normal applications, as there’s no parsing of the actual file names involved, and by Mac OS X all filenames use UTF-8 encoding).

In the days of the public betas and Mac OS X 10.0.x, I recall running into several such glitches, mostly while running Apple’s now-obsolete Project Builder programming environment. Project Builder (and its successor Xcode) invoke the gcc compiler and associated tools through complex shell scripts, and I still run into snags now and then when accented characters are involved. Still, Xcode has been remarkably tolerant of embedded spaces and for the past year I’ve consistently used spaces in my current folder names without any trouble; mainly for having the projects I’m working on list first in my somewhat bloated Home folder.

The leading space, unfortunately, was the cause of the aforementioned shell script interpret a “remove all nested folders from /Users/rainer/ Test Project/subfolder/” command as “remove all nested folders from /Users/rainer/, from Test, and from Project/subfolder” (paraphrased). There are two ways of writing such things correctly: one is to precede embedded spaces with a backslash, another is to enclose the whole file name in quotes. Because of the somewhat convoluted nature of the shell script, which passed a list of search results to the actual remove command, the author did not consider that the list might not be properly formatted…

Besides my current project folders my Desktop and Documents folders were removed. On the desktop I kept mostly recently-downloaded items, which can always be downloaded again as soon as I need them. The Documents folder was more painful to lose, as it contained my address book, e-mail folders and several other files that contained ongoing corresponce.

So I spent most of yesterday and today trying to restore my working environment. I tried some disk rescue utilities without success. I wrote a disk image of the volume I keep my Home folder on to an improvised external drive, only to find later that this doesn’t copy unallocated blocks and is therefore unsuitable for data rescue.

Fortunately, my Home volume was nearly full, meaning my working files had a good chance of having been allocated near the end of the volume – and indeed some judicious albeit tedious scanning allowed me to recover most of the source files I had been working on for the past month. Whew.

Unfortunately, the same trick won’t work for e-mail; there’s just too much of it and the fragments can’t be fitted together as easily; and a CDR backup I did last month proved unreadable, too. So, if you e-mailed me anything important since Christmas, please send it again; sorry.

Photos licensed by Creative Commons license. Unless otherwise noted, content © 2002-2022 by Rainer Brockerhoff. Iravan child theme by Rainer Brockerhoff, based on Arjuna-X, a WordPress Theme by SRS Solutions. jQuery UI based on Aristo.