[TxMt] Re: A few recent crashes

Andrew Hodgkinson ahodgkin at rowing.org.uk
Thu Apr 23 01:27:58 UTC 2020


On 23 Apr 2020, at 12:42, Allan Odgaard wrote:

> This could possibly happen after running a git rebase or similar 
> operation that would delete and recreate  _folders_  (with open 
> documents) in your project.

Ah yeah, that kinda matches some of the weird stuff. Thanks for putting 
in the API migration effort to try and resolve it; will be nice to not 
have those issues arise in some future iteration.

> Apple’s own session restore support is able to do this, it’s not a 
> drop-in replacement, but I am working on migrating to Apple’s 
> system.

OK - I figured it probably wouldn't be a simple fix, else it'd have 
happened ages ago.

>> At this point I realised that while I could move windows and they'd 
>> gain focus, there was no way to interact. Typing and mouse clicks 
>> were totally ignored.
>
> I’ve seen this issue before, both with TextMate and other 
> applications. But new for macOS 10.15 (I think) is that it used to be, 
> that one could switch to another application and back, to fix the 
> issue, but this is not always the case with macOS 10.15.

Yes, this was very odd; not quite the same thing. In some previous 
examples of "doesn't respond", the window doesn't even look like it has 
focus even though it's sort-of-active, and switch-away-switch-back does 
indeed resolve it. In this case, it looked entirely active and normal, 
but just didn't respond to any input.

> That is pretty damn weird. So even after a reboot, TextMate kept 
> relaunching? And still in a state where it didn’t get “proper” 
> activation (no keyboard input)?

That's right - every bit as strange as it sounds. I've no explanation. 
In the end, it seems session restore data may have been corrupted 
somehow too, since when I finally got 2.0.6 installed back, it'd 
complain about having crashed at shutdown previously, and ask me if I 
wanted to restore windows. Saying 'yes' would lead to no windows at all, 
while saying 'no' would lead to one default empty document... And it did 
this *on every launch*. I had to delete it with an app cleaner to fully 
remove all related data before it settled down and started behaving 
normally.

As you say, this seems almost impossible without some kind of launcher. 
If there's nothing in the OS via e.g. flags/other API to say "relaunch 
me if I die" then the only explanation I can think of is some horrible 
problem in the Catalina window and/or desktop process manager (if 
they're separate things, who knows) which just kept relaunching it over 
and over, even after a reboot.

> You should be able to find “untitled” (or unsaved) documents 
> in `~/Library/Application Support/TextMate/Session`.

Thanks - yeah, I dug those out before deleting everything to get 2.0.6 
working properly again.

> Metadata about the files are stored using extended attributes, to view 
> this [...]

Useful! Thanks.

> And it is not obvious to me how such a situation can even arise. There 
> is “keep alive” support in their launch daemon system, but that is 
> not for GUI applications, and I think their launch daemon support even 
> stops keeping a process alive (relaunching) if it terminates too 
> quickly.

Totally agree. It seems we've no choice but to chalk it up to even more 
super-lousy engineering in Catalina; yet another weird rotting-code bug 
that'll probably never be fixed. If I do ever manage to get anything 
replicable or diagnosed, I'll let you know.

Thanks for the detailed reply,

-- 
TTFN, Andrew Hodgkinson
Find photos, software, music and more at my home site, Bandcamp and 
GitHub:
https://pond.org.uk / https://pondnz.bandcamp.com / 
https://github.com/pond


More information about the TextMate mailing list