#!/bin/shfind /private/tmp -name 'TextMate_*.sample.txt' -mtime +1h -deletet0=$(date +%s)sample TextMate 5 -wait >/dev/null 2>&1 &/usr/local/bin/mate "$@"t1=$(date +%s)dt=$(expr $t1 - $t0)if test $dt -gt 3thensample_txt=$(find /private/tmp -name 'TextMate_*.sample.txt' | sort | tail -1)cat <<__EOF__mate took longer than 3 seconds. Sample here:$sample_txtGrab log with:log show --predicate 'subsystem = "com.macromates.TextMate" && category = "BringToFront"'"__EOF__fi
Thanks. I just had another hang. I accidentally deleted the sample, but the log indicates it happened here:2019-08-26 12:01:00.422862-0400 0x1b9a4fd Default 0x0 37221 0 TextMate: [com.macromates.TextMate:BringToFront] TextMate: Created OakTabBarView instance
2019-08-26 12:01:10.571943-0400 0x1b9a4fd Default 0x0 37221 0 TextMate: [com.macromates.TextMate:BringToFront] TextMate: Created OakDocumentView instanceI'll report back next time it hangs with a sample.j.On Wed, Aug 21, 2019 at 6:09 AM Allan Odgaard <email@example.com> wrote:
On 19 Aug 2019, at 3:06, Jay Soffian wrote:
Bump. Allan, any ideas here?
I have added even more debug output into rc.30 available by option-clicking Check Now in software update.
Unfortunately the previous debug output was not enough to give me any idea of what goes on; was therefore waiting for a second person to provide logging output, I got this today via IRC, and for this person, it is also stalling basically when creating the window, so now I littered the setup code with log statements.
For those with the issue, in addition to capturing the log, it would also be useful to create an alias in your shell a la:
alias s='sample TextMate 3'
Then when you realize it is stalling, immediately create new tab in terminal (⌘T) and run
sto sample the process.
It is very likely some system code that is failing to obtain a spinlock with a 10s timeout, a sample should make this immediately obvious, where log statements added by me may take a while to pinpoint what exactly is triggering it (and pinpointing alone may not explain why, here a stack trace from sample would be a lot more useful).
TextMate mailing list