Apple's autosave and resume features in OS X offer a great way to preserve your workflow if a program crashes or you simply need to quit it. However, these features do somewhat depend on the system's display output being constant, and may have some problems if you regularly change the system's display format.
If you use a MacBook system and plug in external monitors or if you regularly change display resolutions, then you might find certain programs (particularly Apple's TextEdit) will sometimes gather all windows into a collapsed group at some location on your display. This bug does not happen all the time and is therefore likely difficult to track and fix. However, if it happens to you then there are some things you can do to restore your windows and at least review them.
- Arrange in front
The first option is to arrange the windows in front of your other applications, which is a quick way to manage any sort of window clutter in OS X. To do this, make the program the foremost one, then click the Window menu. The default option for handling window organization in this menu will be "bring all to front." However, if you hold the Option key this will change to "Arrange in front," which will arrange the windows in a descending ladder organization.
While this still maintains the windows in a collapsed state, it does allow you easier access to them.
- Zoom all
A second option is to zoom all windows for the affected program, which should restore their window bounds to a size that should reveal at least some of their contents. To do this, again hold the Option key and choose "Zoom All" from the same Window menu. Unfortunately in some cases, this will maximize the windows instead of resizing them to fit their contents. This can cause some frustration; however, repeating this procedure should revert it.
- Restore a prior saved state
This problem with windows collapsing ultimately revolves around OS X saving window locations in its Resume feature. While beneficial it will also overwrite a valid saved window state with the faulty one that has all windows collapsed. However, if you have Time Machine enabled (and especially if you have local snapshots active for systems on the go), then you can restore the most recent saved state for the program before the error occurred, to revert it and have your windows appear normally. (This is likely only beneficial for those with many windows open.)
To do this, go to the user library folder (hold the Option button and choose Library from the Go menu), then open the folder called "Saved Application State." Then locate the folder for your given program (e.g., for TextEdit, it would be "com.apple.TextEdit.savedState") and then either invoke Time Machine and restore the entire folder from a time before the error occurred, or enter the folder and restore its entire contents. Do this when the affected program is closed, and when you next open it the prior saved state should be used.