Fixing Restore Windows Bug in Lion

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?”

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).
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.
Untitled 3
3: Once you are in the Library folder, look for a folder named “Saved Application State” and open it.
Untitled 4
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 is the domain of the site. You can find out the identifier of any application by downloading this application I made for this post you find the folder for your application you just delete it by moving to the trash.
Untitled 6
5: Relaunch the application with the problem and the problem should be gone.
Untitled 7
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'”


  1. This was driving me crazy and your solution works! Thanks 🙂

  2. Excellent, thanks for this!

  3. Thank you so much! That is the ONLY solution i found in the net.

  4. IT worked, thanks so much! I was really lost trying to do it, I use open office, and it worked perfectly your directions were simple..

  5. I tried this with OpenOffice on Lion, and it didn't work….

  6. Thanks .. that saved my day/week.
    I did try to fix it by disabling the "Save State Option" in System Preferences > General. But i guess that was already too late, and changing that option did not clean up the 'saved state folders' already exisiting.

  7. Mary
    I solved the same one in Lion. In the library direction there is a folder with the name CrashReporter. In that folder I found a file with a name that I figured belonged to open office. I removed that file and it worked again

  8. Thanks, your manual helped me to resolve "Restore windows" problem… 🙂

  9. Thank you for the suggestion, but I couldn't find any folder named CrashReporter, even when I searched my computer:/

  10. Awesome, sir, now I can do my taxes in peace!

  11. Thank you, it was literally bugging me…

  12. Thank you… your post really help me…. Danupol Siamwalla

  13. Mary,
    In Terminal write
    chflags nohidden ~/Library

    then go to users/%username%/Library/Saved Application State
    and just find the folder you need to delete

  14. Thank you!

  15. OMG Thank you sooooo much! I emailed you, and then as soon as it was sent I found the link to your blog! Thank you for posting this! I was really about to have a coronary if I didn't fix this. I am a college student and this was the only way I could view my class notes! Thank you!

  16. thanks!! the solution worked perfectly

  17. It doesn't work for me , i can not Click "Go" on finder because it just disappear with my Finder Problem it keeps re lunching every time and popping up!!!Please help !!

  18. Thanks, worked for me.

  19. My god that was driving me crazy and went through so many different solutions that didn't work but this did. Thanks a million.

  20. You da man!

  21. Thank you so much!!! This post was really useful and simple to understand. Open Office was getting on my nerves for days. Thanks to you it's all fixed now.

  22. hey dude..

    I cant find the library on my computer?

  23. Brilliant, Thanks. It's been bugging me for days.

  24. Excellent solution, thanks!

  25. Thank you. Couldn't find anything else online. You save me alot of time!

  26. I had the same problem Mary and Anonymous did… in Lion, the library is hidden from the "go" menu. However, I found a fix. If you hold down the "option" key on your mac while looking in the "go" menu that this tutorial suggests, the library appears, and then you can follow this tutorial to fix it. Libre Office is working great for me again, so thanks!

  27. Don't see how people miss this BrisOwnWorld… "while you are in the Go menu, hold down option" from above.

  28. tanks for the option go menu – Library trick 🙂 and thanks for the solution 🙂

  29. great! it worked your my hero!!!!!

  30. Thank you! You saved my day.

  31. Thanks, worked like a charm!

  32. Wow
    Open Office works now!


    PS.I only had to delete the text file

  33. love you geeks!

  34. Thank you! You're the best!

  35. THANK YOU!

  36. Very nice, thanx!

    BTW: As a new Mac'er, I didn't know what the option key was, for me, it's the alt key that worked like a charm 😉

  37. Thank you!!

  38. OMG! You are a life saver! I just fixed my ongoing for weeks problem that all most interfere with my academic paper. AWESOME! THANK YOU! Best lo luck! sz

  39. You the Man!!

  40. This was exactly what I needed! Awesome post, thank you very much! This was driving me crazy.

  41. Many thanks for your help.

  42. Thank so much for all the tips & tricks, but unfortunately none of them work for me. I tried everything in mac osx; search the Library folder (appearantly I don't have those folders, like Crash Reporter named in this topic), the Save State Option fixed the System Preferences, downloaded open offices in many versions… nothing works. Does someone have another magic solution? 🙁

  43. waoooooo
    perfect soln

  44. had to thank you! Thanks!

  45. THANK YOU!!!!

  46. Another HUGE thank you.

  47. Oh my! Thank you so much!!

  48. Thanks very much!

  49. Thanks! It help a lot!

  50. Thank you very much!! Great help!

  51. Thank you!

  52. Thank you very much!

  53. It worked! YAY!!! Thank you!!!!!

  54. It perfectly works, thank you very much !

  55. Cool – Works….

  56. Thanks. This fix worked like a charm.

    Perhaps you know how to fix the following problem. I have a file called "" which I simply cannot delete. I have tried all of the fixes I can find on the net.

    The sequence of events is always the same. I try whichever form of delete. The delete bar, with its barber pole appearance, appears. First it says "0 items to delete", it then changes to "7 items to delete", then to "6 items to delete", the compter then freezes for a while and eventually comes up with "The Finder can’t complete the operation because some data in “” can’t be read or written.
    (Error code -36)".

    Do you know how to getr rid of this file, or do I simply have to learn to live with an "Undeletable Trash" folder?


  58. i cannot find the saved application state folder 🙁 inside the library.

  59. Superb It's Working……… Thanks a lot………..

  60. Oh, bless you and thank you for your brilliance.

  61. Thanks

  62. Another happy customer. Thank you.

  63. Thank you, such a relief to get this fixed.

    You are one clever and generous gentleman, again, thank you.

  64. Fantastic! Great help. It also helps me to learn a few other shortcut tricks.

  65. thanks a lot…..

  66. It worked for me Mary Lion 10.7.4. Thanks everyone!

  67. Hi There,

    I couldn't find out the folder as"Saved Application State" to del the file!! But I found a folder as "CrashReporter", and what file i need to del from this folder to solve the bug…. ??


  68. worked for me in my newly upgraded to mountain lion mac.

  69. THANKS.

    Worked on 10.7.4 with OO 3.4.0 Build 9590

  70. AWESOME TIP!!!, Freeking Macs are getting worse! The library is a hidden folder if you can't find it.

  71. Great! It worked like a charm. Pictures also helped a lot.

  72. Thank you!

  73. Hello, I'm having the same issue but on os x 10.7… thoughts?

  74. Holy shit balls thanks!! My life is now complete!

  75. T.H.A.N.K. Y.O.U.!!!!
    Amazingly wonderful to get rid of that super annoying message!!

    Thanks again :)))

  76. Amen
    After I had finished throwing things around my office in frustration I looked, without expectation, for a solution to this problem (mine was OpenOffice related). I found your post almost immediately, tried it, it worked. You are a trooper!

    Rob Stevens

  77. Thank you so much!!! You would think they would fix this very serious bug!

  78. Thank you very much your solution worked fine.

  79. Thanks you, sir.

  80. Thank you so much!!

  81. Thank you very much!!!!!

  82. Thanks a lot!

  83. Hola muchas gracias por la ayuda me sirvió

  84. Thank you!!!!!!

  85. Thank you!!! You are a life saver!!
    I would recommend you to update the post by adding also the command line to do it quickly using Terminal:

    rm -r /Users/USERNAME/Library/Saved Application State/org.libreoffice.script.savedState/


  86. Thank you for your generosity in providing this solution. Being a "just knows enough to be dangersous" Mac user, I was able to follow this simple solution. All the best to you!

  87. thnx a lot for ur solution!! It helped me in getting rid of this problem!


  89. Thanks! Was going a bit crazy!

  90. Worked for me! Thx a Bunch…

  91. Thank you so much oh great macintosh master!!

  92. Thank you so, so much! I've been avoiding OOo and Libre Office for months until I finally found this fix.

  93. James, many thx indeed, this has been a nuisance really, I wonder if OO or Apple care about this… :-/

  94. Thanks very much for posting this. It worked out quite well.

  95. I cant find the file Library can you help me? I am new to mac and i cant get rid of this message.

  96. Thank you. Thank you. Thank you.

  97. Thank you this really helped me

  98. FINALLY! I am able to use again on my Mac! Thank you Mr. Gecko!

  99. FINALLY! I am able to use again on my Mac! Thank you Mr. Gecko!

  100. Thanks so much!

  101. Worked Great! Thanks!

  102. It was a different openoffice folder for me, but you got me there and it worked. Thanks so much for taking the time to do the screenshots to walk us through it all.

    You DA man! =]
    Mike Cowles.

  103. Thanks man – you rules 😉

  104. You are the best!!!!

  105. Thank you! So glad that's solved

  106. yes! the problem was solved in 1 minute! Muchisimas Gracias!

  107. 🙁 There is no such folder in the library….No OpenOffice folder in /Application Support, nor Saved Application State

    • Hello,
      When I looked in Finder and found the Library but the Saved Application State wasn't there. However, when I when I held down the Option key while on the Go Menu, Library showed up and from there I found the Saved Application State folder. I was able to delete and the fix worked.

  108. Help! I found Library, but not in the drop down only when I clicked on the Finder icon. In Library, I don't have either Open Office or find Saved Application State folders. I don't know what you mean by typing "in Terminal". Can you help further?

  109. thank you thank you thank you!

  110. Thank you thank you thank you:)

  111. Thank you so much for this solution!! Its amazing. 🙂

  112. Thank you soooo much!! It finally worked! I tried other alternatives and none of them worked, except yours!

  113. Thank you from Japan!

  114. Perfect! So pleasant to have a step by step solution for a non-techie person. You made my life better today.

  115. Great..after searching the web for hours – THIS solution seems to work!

    greetings frpm Berlin

  116. Thank you so much for the solution! It worked and saved me from ripping my hair 🙂

  117. I'm not being given the force quit option when I right click…Please help!! Thanks

  118. I don't have "Library" on the Go menu. Please help.

  119. Slight variation under OSX 10.9, but worked like a charm. My thanks added…

  120. Hi, I did all but none helped. It still there with the same bug. I deleted the scripts saved state! help me please!

  121. Hi, I did all you mentioned but none helped! is there any solution for this? could you please help!!!!

  122. I have a Mac OS X Lion 10.7.5 (11G63) and when I click GO under Finder, the Library isn't an option for me. What do I do?

  123. thank you so much!!! (from Brasil!!)

Leave a Reply to Dorte Schou Cancel reply

Your email address will not be published. Required fields are marked *

© 2020 Mr. Gecko's Weblog

Theme by Anders NorenUp ↑