Memory leak when using BTT with Traps Agent

Describe the bug
I'm using BTT on my work MacBook Pro. Per company security policy, we use Palo Alto's Traps for endpoint security: https://www.paloaltonetworks.com/products/secure-the-endpoint/traps

With the Traps agent and BTT running simultaneously, and if I do this:

  • set a screensaver
  • invoke the screensaver, wait a few seconds before unlocking
  • repeat step 2 a few times

The "trapsd" daemon from Traps consumes an insane amount of memory - I've seen it climb over 30 GB! Of course this causes excessive swapping and slows the system down.

Memory usage of 'trapsd' goes down if I quit BTT, and invoke a screensaver again.

I've kept BTT disabled for a couple of days and have not noticed any memory leaking.

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

Device information:

  • Type of Mac: 2017 two port 13" MacBook Pro
  • macOS version: 10.14.6
  • BetterTouchTool version: 3.176 (1354)

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

No workaround known, other than not using BTT. I've tried disabling features like window snapping in BTT, to no effect. I've conclusively determined this conflict to be between BTT and Traps, after extensively trying out other background apps on my system.

Unfortunately this is definitely a bug/memory leak in trapsd then, maybe due to the Accessibility API usage in BTT? Do you have any support channel for Traps within your company?

From my understanding, a ticket was raised with Palo Alto. But that's via our devops and I'm not sure if there has been any meaningful reply from Palo Alto. Also seeing how I'm probably the only one in the company using BTT, this issue wouldn't be as high priority. :stuck_out_tongue:

I will also try to reach out to them. This will not only be caused by BTT but by any tool that uses the same APIs - and there are many of these.

A sample of the process could probably help to make sure I'm reporting the correct issue:

If possibly run this terminal command:

sample trapsd -file ~/Desktop/trapsd_sample.txt

Then while it's running drag a window around or do some other things you might have set up in btT.

Maybe attach that file saved to your Desktop here or send it to andreas@folivora.ai

Done! I've sent you a bunch of samples.

edit: I realized those samples were done while triggering the memory leak issue, not necessarily BTT actions. Let me know if you'd like me to do that instead.