It appears a window can hang around after its last tab has been closed. Such window receive notifications of items being deleted via the file browser, and will call the “close tabs” method in response to these, which does an out-of-range array access if no tabs exist.
The reason for why windows can hang around after last tab is closed has not yet been determined. It might be a retain cycle (bug) or a delayed release due to autorelease pools.
Fixes#1064
The first time we ask for the shared spell checker it does some setup involving AppKit (creating the shared spelling panel?). While we already ensure that the spell checker is only called from the main queue, it seems this setup code must run on thread 0, which, when we are not in a Cocoa application, is not necessarily the thread used for the main queue.
I have been told that the spell checker should be thread safe (except for the spelling panel) but after moving to concurrent execution of the integration tests, several segmentation faults have pointed toward the spell checker not being thread safe.
This is when switching tabs ore re-opening a file.
Restoring the visible rectangle doesn’t always work because we do an initial heuristic layout where we don’t do proper soft wrap and may also lack scoped settings to increase font size for headings, meaning that the restored visible rectangle does not point to the same section of the text, as it would with a fully updated layout.
This fixes#243.
The ‘lastVersionDownloaded’ property used ‘assign’ (since it used to be an integer) which meant TextMate would likely crash when the property was read (and had a non-nil value), which it would, when TextMate did a version check after already having downloaded an update (but not yet installed and relaunched).
Also drop the atomic requirement of the ‘archive’ property since we no longer access it from multiple threads.
The cache update code has an issue causing some users to get an incomplete view of what’s on disk. Bumping the version forces re-indexing, and is not a long-term fix.
Use APP_VERSION instead of APP_REVISION in various target names.
Indicate a few build commands are generators, so that their output is not removed on ‘ninja -t clean’.
Move generated dummy files (for tagging, uploading, deploying, etc.) to sub-directories to reduce noise in build directory.