Freeze when opening BTT

Describe the bug
When I start BTT (by using alfred), it takes around 8-10 seconds to startup.
At around the 5-7 second mark the whole OS becomes unresponsive. Sometimes this is represented as a stutter but most of the time it's a couple of seconds of full unresponsiveness.

This is especially noticeable after waking the mac from sleep, as after unlocking I can see my screen but there is no way to interact with any onscreen elements until BTT has finished loading.

I've confirmed this is BTT because I woke the mac without BTT running and it's fast and responsive as normal.

I also confirmed this is BTT because the same issue happens when I kill BTT and then restart from Alfred (launcher)

This seems to be localised to the touchbar, as when disabling touchbar support (and restarting BTT) this issue is still present, but significantly less noticeable.

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
OSX

Screenshots
If applicable, add screenshots to help explain your problem. (You can just paste or drag them here)

Device information:

  • Type of Mac: Macbook Pro 13" 2019 2.4Ghz GB
  • macOS version: Catalina
  • BetterTouchTool version: 3.335 (1543)

Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):

Finally managed to reproduce this.

Steps:

  1. Uninstall Better Touch Tool
  2. Uninstall Karabiner elements
  3. Re-install Better Touch Tool
  4. Re-install Karabiner elements

Seemed like at some point the KBE daemon caused a conflict with BTT.

After the procedure above I don't experience the freezes any more. The touch bar still takes a second or so to initialise, but my mouse and keyboard remain usable during this time.

Also to note is that I uninstalled BTT from homebrew, and reinstalled directly from the website. My profiles were not removed during this re-install, so I didn't reset my configuration in any way.

Hope this is helpful for someone else!