Help me recover text from BBEdit midcrash!
September 11, 2005 10:28 AM   Subscribe

I'm using BBEdit to type a long weblog entry. I'm deep in the process of writing, so I don't save for a long time (so no lectures). Finally, when I'm nearly done, I save. I get the spinning beachball of death. I sense trouble, so I try to close other open applications via the dock. No go. The first app I try to close hangs the rest of the system. It's been five minutes now and the spinning beachball of death keeps spinning, but nothing else is happening. I can move the cursor, but mouseclicks do nothing. I have a feeling that the computer will stay like this until I power down or until you, my dear fellow mefites, help me to recover my precious writing.

Is there some key combo that will let me close specific apps? Exposé does nothing right now. Help! Help! Alternately, is there a way to recover my text if I simply shut the computer off?
posted by jdroth to Computers & Internet (19 answers total)
Take a digital picture of the screen if you can see the text...
posted by fake at 10:33 AM on September 11, 2005

Is there some key combo that will let me close specific apps?

Sure, press option-cmd-Escape, this sends a non-maskable interrupt that brings up a task-manager-like window. However, I've found that in the occasional situation like the one you describe, it doesn't always work.

I'm pretty sure that BBEdit (maybe not the lite version) has a preference that autosaves for you. Did you have that set? If so, you won't lose much.
posted by ikkyu2 at 10:39 AM on September 11, 2005

I'm not really sure there's anything you can do to 'save' the writing. "No lectures", but.., well. You've gotta save your docs. To save future horror, you could try something like the nearly abandoned xPad that audosaves every N minutes.
posted by zerolives at 10:46 AM on September 11, 2005

Command-Option-Escape opens up the 'Force Quit Applications' dialog, you might try that.

Do you have any other machines in the house with a 'ssh' client? In situations like that, I log onto one of my Linux machines (or the Windows laptop with 'putty'), and 'ssh' into the Mac to see if it is possible to salvage anything. Sometimes 'killall Dock' will fix things. I figure out what is wrong by using 'top' (assuming it is something relatively normal, one application is usually eating up 99% of the CPU time). This will not always allow you to save your work, because you can't always bring the computer back into its normal state, but sometimes you can.

If you are really desperate, and the Mac can't be coerced back into some semblance of normalcy, start hunting around the hard drive to see of BBEdit is keeping a temporary backup of the text file you are typing, and copy it somewhere.

Of course, if you don't have another machine, or don't know the Unix command line at all, this may be worthless to you. But it does work (sometimes) if you have that and Unix-based machine goes partially bonkers.
posted by teece at 10:48 AM on September 11, 2005

option-cmd-escape did let me bring up the task manager thing, and I was able to quit all applications except BBEdit and to relaunch the finder. Unfortunately, BBEdit is still stuck but good. And I can't launch any new apps.

I have the full version of BBEdit, so I'll try to track down where the autosaves occur. Maybe I can go across the network to check whether the autosaves are there.

(By the way, I used cmd-shift-3 to take screenshots and got the snappy sound, so that bodes well.)

Meanwhile, I'll transcribe the on-screen portion of text into this PowerBook.
posted by jdroth at 10:51 AM on September 11, 2005

zerolives, "no lectures" because in general, I'm an awesome saver. It's just that once in a while I get in a writing zone and don't remember to save. Doesn't happen often, but it happens. Normally, I'm a "save every paragraph" kind of guy.
posted by jdroth at 10:53 AM on September 11, 2005

Okay: I can get across the network from my PowerBook to the computer with problems. I have access to the crashing computer's hard drive. My screen shots did work, so I have screencaps of the last half of my text. To recover the first half, I need to find where BBEdit autosaves. I'll do some rooting around, but does anyone know for sure where I should look?
posted by jdroth at 10:59 AM on September 11, 2005

teece has the right idea, but to do that, you need to enable "Remote Login" in the Sharing Prefs first. If you can do that, ssh+top+kill is always helpful.

In this case, though, it seems that BBEdit itself has hung. Which is annoying, since apps that fully crash on their own will typically dump stuff to a log. But since you're going to have to kill it yourself, you may be SOL.

In addition to "Save Often", I'd suggest picking up a good clipboard utility. I use shadowClipboard, which saves the last 15 clipboards across reboots, and has saved my butt in similar situations many times. It lets me use the clipboard for "incremental saves" and do a "commit" every so often to disk.
posted by mkultra at 11:04 AM on September 11, 2005

To recover the first half, I need to find where BBEdit autosaves.

You, sir, are the unfortunate victim of BBEdit's #1 missing feature. No autosave :(
posted by mkultra at 11:05 AM on September 11, 2005 can ssh in. The text must be in memory somewhere. I don't know offhand how to do this, but I'm sure, with root access, there must be a way to sort of grep BBEdit's memory space. (Hopefully someone can take the idea from here.)
posted by trevyn at 11:16 AM on September 11, 2005

There's some possibility that the information has been written out to a swapfile. In the terminal,

cd /var/vm
sudo cat swapfile* | grep

(or add more instances of | grep word for additional words to look for)

If that returns anything, you can try copying the swapfile to another machine. I have no idea if this'll work; it might well be that the info in the swapfile is encoded unrecognizably.
posted by kimota at 11:17 AM on September 11, 2005

Okay, I'm in the VM directory of the other computer, and I see four swap files. I'm trying to run the sudo command, but get a permission denied error. When I try to login as superuser (using su), my password is refused. (I've tried every possible password that might work, too, though I know which password is correct.)

I'll keep trying stuff here, though. Any more ideas?
posted by jdroth at 11:49 AM on September 11, 2005

sudo su-
posted by onalark at 12:02 PM on September 11, 2005

oops, obviously that should have been sudo su -
posted by onalark at 12:02 PM on September 11, 2005

Hmm. Is your default account on the Mac not an Administrator account? 'sudo' has always just worked for me in my iMac. 'su' I think won't work, as there is no 'root' account with login privileges by default on the Mac. 'Sudo' sounds like it wants you added to the 'sudoers' group, but I've never done that on the Mac, only my Linux machines.

Having said that, I've created an unsaved file in TextWrangler (which maybe behaves similarly to BBEdit in this respect), and I've searched high and low for any sign of a temp file, to no avail. It does not seem to keep a disk cache. I checked all the swap-files in '/var/vm', again no dice (but my file has had no reason to be paged to disk, maybe yours has). And I can't seem to find anything on a Mac that is the equivalent of '/proc/kcore' from Linux to allow one to 'grep' through active memory.

I begin to think it may be a loss. But then again, it's not my work, so I'm probably not quite as motivated as you.
posted by teece at 12:08 PM on September 11, 2005

As a result of this thread, Bare Bones Software has contacted me via e-mail and is working with me in an attempt to diagnose the problem. If the programmers themselves can't help save my text file, nobody can!
posted by jdroth at 1:05 PM on September 11, 2005

I've also had a similar thing happen to me when I wrote this insanely long thing (in MS Word, though) and forgot to save it (being stupid, stupid, stupid) and when I finally went to save it, I got the Spinning Beach Ball Of Death (great name for it) and started panicking; I basically decided that I'd just let it sit and hopefully it'd pull out of it. It did take an absurdly long time, but it actually DID pull out of it, and I saved it and well, started saving compulsively from then on.

Of course, my computer tends to do that a lot -- particularly in Firefox, which is kind of annoying; I'm wondering what the problem is, though. I thought I'd had enough RAM; 1.5 gig (on a 2 GhZ dual Power PC G5). Wiggy. (Although, of course, my main reason for using Firefox instead of Safari is the Mouse Gestures which I am completely attached to, but... yeah.)
posted by Rev. Syung Myung Me at 1:22 PM on September 11, 2005

I used to have the same problem (and many others) with BBEdit and I got sick of it and got SKedit. Not even remotely as powerful, but if you're just writing basic code, it's much more stable, imo.

Bare Bones has great support but I got tired of needing that support.
posted by dobbs at 1:55 PM on September 11, 2005

option-cmd-Escape is totally unreliable in my experience. Maybe 1/10 times it saves me from the crashes I experience. Perhaps the apps I use frequently are to blame, but I don't think I've encountered the app that Task Manager for Windows can't tame [shrugs].

I also don't want to think about saving when I'm in the zone. I stick to programs that have an autosave function. In desperate need, there are also apps which can scan memory for chunks of text AFTER a crash/reboot. No guarantees that anything will be there.
posted by scarabic at 2:00 PM on September 11, 2005

« Older Being there for a long-distance friend   |   Selling my house and keeping the cash - possible? Newer »
This thread is closed to new comments.