BTT restarts without creating a crash report

For quite some time my BTT is restarting randomly (at least I cannot find a pattern) without generating a crash report.

Here are some logs generated by log show --info --debug --predicate 'subsystem == "com.apple.launchservices"' --last 30m | grep BetterTouchTool

     11 2025-02-24 17:16:10.883226+0200 0xc9634c   Default     0x0                  563    2    launchservicesd: [com.apple.launchservices:cas] CHECKIN:0x0-0xe292284 31066 com.hegenberg.BetterTouchTool
     12 2025-02-24 17:16:12.038216+0200 0xc96347   Default     0x0                  563    2    launchservicesd: [com.apple.launchservices:cas] CHECKIN:0x0-0xe294286 31112 com.hegenberg.BetterTouchToolAppleScriptRunner
     13 2025-02-24 17:16:12.321422+0200 0xc964a9   Default     0x0                  31066  2    BetterTouchTool: (LaunchServices) [com.apple.launchservices:db] NotifyToken::RegisterDispatch(user.uid.501.com.apple.LaunchServices.database) fired for sess
     13 ion key <private>
     14 2025-02-24 17:16:12.321439+0200 0xc964f1   Default     0x0                  31112  2    BetterTouchToolAppleScriptRunner: (LaunchServices) [com.apple.launchservices:db] NotifyToken::RegisterDispatch(user.uid.501.com.apple.LaunchServices.databas
     14 e) fired for session key <private>
     15 2025-02-24 17:16:13.330125+0200 0xc9656d   Default     0x55f0c4f            31066  2    BetterTouchTool: (LaunchServices) [com.apple.launchservices:appinstallation] registering for distributed notification com.apple.LaunchServices.pluginsregist
     15 ered in this process
     16 2025-02-24 17:16:13.330150+0200 0xc9656d   Default     0x55f0c4f            31066  2    BetterTouchTool: (LaunchServices) [com.apple.launchservices:appinstallation] registering for distributed notification com.apple.LaunchServices.pluginsunregi
     16 stered in this process
     17 2025-02-24 17:16:14.096635+0200 0xc96336   Default     0x0                  563    2    launchservicesd: [com.apple.launchservices:cas] CHECKIN:0x0-0xe297289 31113 com.hegenberg.BetterTouchToolAppleScriptRunner2
     18 2025-02-24 17:16:14.097844+0200 0xc9632d   Default     0x0                  563    2    launchservicesd: [com.apple.launchservices:cas] CHECKIN:0x0-0xe29828a 31114 com.hegenberg.BetterTouchToolAppleScriptRunner3
     19 2025-02-24 17:16:14.129937+0200 0xc96336   Default     0x0                  563    2    launchservicesd: [com.apple.launchservices:cas] CHECKIN:0x0-0xe29928b 31115 com.hegenberg.BetterTouchToolAppleScriptRunner4
     20 2025-02-24 17:16:16.116728+0200 0xc96517   Default     0x0                  31066  2    BetterTouchTool: (LaunchServices) [com.apple.launchservices:appinstallation] registering for distributed notification com.apple.LaunchServices.pluginswillbe
     20 removed in this process
     21 2025-02-24 17:16:22.103562+0200 0xc966c2   Default     0x0                  31112  2    BetterTouchToolAppleScriptRunner: (LaunchServices) [com.apple.launchservices:default] LSExceptions shared instance invalidated for timeout.
     22 2025-02-24 17:16:23.046366+0200 0xc966c2   Default     0x0                  31112  2    BetterTouchToolAppleScriptRunner: (LaunchServices) [com.apple.launchservices:db] NotifyToken::RegisterDispatch(user.uid.501.com.apple.LaunchServices.databas
     22 e) fired for session key <private>
     23 2025-02-24 17:16:23.046395+0200 0xc96489   Default     0x0                  31066  2    BetterTouchTool: (LaunchServices) [com.apple.launchservices:db] NotifyToken::RegisterDispatch(user.uid.501.com.apple.LaunchServices.database) fired for sess
     23 ion key <private>
     24 2025-02-24 17:16:23.046414+0200 0xc965f5   Default     0x0                  31113  2    BetterTouchToolAppleScriptRunner2: (LaunchServices) [com.apple.launchservices:db] NotifyToken::RegisterDispatch(user.uid.501.com.apple.LaunchServices.databa
     24 se) fired for session key <private>
     25 2025-02-24 17:16:23.046459+0200 0xc964de   Default     0x0                  31115  2    BetterTouchToolAppleScriptRunner4: (LaunchServices) [com.apple.launchservices:db] NotifyToken::RegisterDispatch(user.uid.501.com.apple.LaunchServices.databa
     25 se) fired for session key <private>
     26 2025-02-24 17:16:23.046640+0200 0xc964cc   Default     0x0                  31114  2    BetterTouchToolAppleScriptRunner3: (LaunchServices) [com.apple.launchservices:db] NotifyToken::RegisterDispatch(user.uid.501.com.apple.LaunchServices.databa
     26 se) fired for session key <private>
     27 2025-02-24 17:16:23.220979+0200 0xc964a9   Default     0x0                  31066  2    BetterTouchTool: (LaunchServices) [com.apple.launchservices:default] LSExceptions shared instance invalidated for timeout.
     28 2025-02-24 17:16:25.802634+0200 0xc964de   Default     0x0                  31115  2    BetterTouchToolAppleScriptRunner4: (LaunchServices) [com.apple.launchservices:default] LSExceptions shared instance invalidated for timeout.
     29 2025-02-24 17:16:25.804318+0200 0xc965f5   Default     0x0                  31113  2    BetterTouchToolAppleScriptRunner2: (LaunchServices) [com.apple.launchservices:default] LSExceptions shared instance invalidated for timeout.
     30 2025-02-24 17:16:25.804788+0200 0xc965f7   Default     0x0                  31114  2    BetterTouchToolAppleScriptRunner3: (LaunchServices) [com.apple.launchservices:default] LSExceptions shared instance invalidated for timeout.

If the BTT logs (~/Library/Application\ Support/BetterTouchTool/Logs/) are needed I can send them as well via email or I can search for something specific and let you know if it is present or no (I've took a look but did not find anything which seems ... bad).

If I read that log correctly it's just one start of BTT, however these launch services logs don't provide info on why it was relaunched. Maybe it also shows that the Apple Script Runner was restarted, this can happen at any time but should not be visible to the user.

Best send the BTT logs (~/Library/Application Support/BetterTouchTool/Logs ) to me (andreas@folivora.ai), then I can check whether they contain anything useful.

Done.

I have no idea where to look for app restarts, on macOS, and AI suggested this. If you have other suggestions let me know.

Mhh yes, looks like it crashed/force quit at 17:16:09, but unfortunately nothing useful in that log either. You are sure there is no crash report in the macOS console app's crash report section?

Yep,

This is valid not only for this specific case. There are cases where there's a crash, which actually generate a crash report + there's the following window (with BTT name of course):

But these crashes are more like a restart, because no such window appears.

there is another crash at 17:16 (hstr), maybe that is somehow related? (maybe not but worth checking the exact time)

Yep, I've checked it and the time is: 17:16:21.6139. I can send it via email if needed.

I think that is too long after BTT (re)started, so probably not related.

Unfortunately the logs don't even show what has been triggered before it crashed, so currently it's hard / impossible to tell what caused the crash. If it happens again, please send the logs again. The more info the better.

1 Like

It just happened again. Your request was fulfilled quickly :smiley: . Logs are sent. This time no other app generated crash report at around that time.

one thing both logs have in common is that the action "Change Input Source / Keyboard Layout" action (UUID 815B7629-EFD8-429E-8EFF-7E1EC050E04A ) was triggered shortly before it crashed, however you seem to use that action often so it's maybe just a coincidence

Another restart/crash ~19:10. Not sure if this restart/crash was similar to the previous ones, because this time a crash report is generated which I've sent via email + the BTT logs.

That crash could be related!
It is always hard to tell from only a crashlog, but it looks like a Floating Menu Item that has an Apple Script assigned tries to update itself or some other Floating Menu Item from within the Apple Script - and for some reason that crashes.

Can you maybe think of any script Floating Menu Item you have (maybe recently added?)

Yep I have a floating menu with various scripts which I have duplicated on my two external displays (meaning that same script is running twice I guess at the same time?). There are few menu items which scripts are configured like this:

I also have another floating menu with menu item script which is configured like this:

The same floating menu have a second menu item with script:

I have a scripts under "Automations & Named & Other Triggers" which work together with the floating menus - meaning if a var is changed (which is every 2-3-5 min, depending on the song lenght) then these two scripts are invoked (real javascript + blocking apple script)

I'm aware that my explanation might sounds confusing and maybe if I export the floating menus it will be more clear, but I'll need to check if any sensitive info before that. Meanwhile if you have some ideas based on my explanation.

So the part of BTT is crashing according to the log is the Apple Script Runner - which however usually should not affect BTT itself. This also kind of explains why you don't always see a crashlog.

I'll think about how a crash in the Apple Script runner could take down the whole BTT process. Looks like something is executed on a wrong thread.

I've just sent 2 more crash logs ("The more info the better") which happened after sleep, not sure if they are related to this issue or not. If they are different I can send them separately for better tracking.

Should I check my floating menus + scripts for sensitive data and send them to you?

Thanks! These logs confirmed the Apple Script Runner crashing. (Probably a threading problem)

I moved things around a bit in 5.224, maybe this will help.

However this version also changes some bigger parts about floating menu caching, it is possible this might break some behavior - I will continue testing this today and if necessary fix anything I can find.

1 Like

Hey Andreas, I'm on 5.229, but still these restarts are happening again without a crash log. Sent the BTT logs via email.

Unfortunately the logs don't contain anything useful ;-(

I have tried various scripted floating menu updates, but couldn't get it to crash so far. Maybe you could check whether you can send a version of your floating menus without sensitive data to me.

In 5.233 have added some logs to the update functions for floating menus, so now at least the UUID of the menu / item that is updated should be logged, maybe that can help figure out what script is causing the issue.