I have encountered a bug with Lion's application restore feature, which apparently works well with Cocoa Based applications, but not with other applications.

After I forced LibreOffice to quit, it apparently saved what windows was opened and when I tried to reopen the application, it popped up the restore windows dialog saying, "The application 'LibreOffice' was forced to quit while trying to restore its windows. Do you want to try to restore its windows again?"

Screenshot

Now, after this dialog appeared, I was unable to close it by ether button and there is no way around it.

I have found a fix for this issue (at least until you force quit the application again), which isn't that hard to do. Just follow the following steps and if you have this issue, you can fix it. 1: Force quit the troubling application by right clicking (control or 2 fingers on the track pad as  you single click) and holding down option to replace the quit item with the Force Quit item (quitting does not work).

Screenshot

2: Create a new window in the Finder and select the Go menu, while you are in the Go menu, hold down the option key and select the Library menu which appears.

Screenshot

3: Once you are in the Library folder, look for a folder named "Saved Application State" and open it.

Screenshot

4: Inside of this folder is a bunch of folders, that has the name like {top level domain}.{domain name}.{application}.savedState, we are looking for this applications folder which would be org.libreoffice.script.savedState as script is the application, and libreoffice.org is the domain of the site. You can find out the identifier of any application by downloading this application I made for this post http://dl.dropbox.com/u/610721/ApplicationIdentifer.zip. Once you find the folder for your application you just delete it by moving to the trash.

Screenshot

5: Relaunch the application with the problem and the problem should be gone.

Screenshot

If you are any good with applescript, you could write an applet to do this for you by replacing the text in red with the identifier of the application:

do shell script "rm -rf '~/Library/Saved Application State/{IDENTIFER}.savedState'"

Previous Post Next Post