BTT crash when zooming windows under cursor

Note: Before bug reporting, please make sure you have tried the latest (alpha) version of BetterTouchTool and that you have already tried to restart your system :-). If you encounter a crash, please attach a crash log from the macOS Console.app from the "User Diagnostic Reports" section.

Describe the bug
The problem appear when assigning a movement (in my case "4 Finger Double Tap") to the "Zoom Window Below Cursor" trigger. The action is executed but then BTT crash and relaunch after a few seconds.

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
The bug appear on a MacBook Pro with the Trackpad and the Magic Trackpad.

Screenshots
None

Device information:

  • Type of Mac: MacBook Pro 15.1
  • macOS version: macOS 10.15.2 (19C57) Darwin 19.2.0
  • BetterTouchTool version: 3.275 (1452)

Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):
Here are the details given by MacOS :

Process: BetterTouchTool [1554]
Path: /Applications/BetterTouchTool.app/Contents/MacOS/BetterTouchTool
Identifier: com.hegenberg.BetterTouchTool
Version: 3.270 (1447)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: BetterTouchTool [1554]
User ID: 501

Date/Time: 2020-01-31 07:24:49.669 +0100
OS Version: Mac OS X 10.15.2 (19C57)
Report Version: 12
Bridge OS Version: 4.2 (17P2551)
Anonymous UUID: BBB49AD6-1287-C0BB-D977-63002C1DD0B7

Sleep/Wake UUID: FE74FC94-E25E-4717-860B-3CDD4C261920

Time Awake Since Boot: 2700 seconds
Time Since Wake: 1200 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000072e3866a23f0
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [1554]

VM Regions Near 0x72e3866a23f0:
Stack 0000700009c08000-0000700009c8a000 [ 520K] rw-/rwx SM=COW thread 5
-->
MALLOC_TINY 00007fcfe0c00000-00007fcfe0d00000 [ 1024K] rw-/rwx SM=PRV

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff6855ecf8 objc_release + 24
1 libobjc.A.dylib 0x00007fff685794ba AutoreleasePoolPage::releaseUntil(objc_object**) + 134
2 libobjc.A.dylib 0x00007fff6855f400 objc_autoreleasePoolPop + 175
3 com.hegenberg.BetterTouchTool 0x0000000100202b91 -[BTTShortcutter performAction:withInfo:remainingChildren:withReply:] + 131
4 com.hegenberg.BetterTouchTool 0x00000001001fb041 -[BTTShortcutter performActionForGestureChildren:withReply:] + 3332
5 com.hegenberg.BetterTouchTool 0x00000001001fa1e4 -[BTTShortcutter performActionForGesture:withReply:] + 1680
6 com.hegenberg.BetterTouchTool 0x00000001001ff0c8 -[BTTShortcutter performShortcutOrActionForGestureIDReal:checkOnly:additionalString:additionalNumber:bezierPathName:fetchType:] + 2163
7 com.hegenberg.BetterTouchTool 0x00000001001fe828 -[BTTShortcutter performShortcutOrActionForGestureIDReal:checkOnly:additionalString:additionalNumber:bezierPathName:] + 82
8 com.hegenberg.BetterTouchTool 0x00000001001fbf0e -[BTTShortcutter performShortcutOrActionForGestureIDMT:checkOnly:additionalString:additionalNumber:bezierPathName:] + 116
9 com.hegenberg.BetterTouchTool 0x00000001001fbac4 __113-[BTTShortcutter performShortcutOrActionForGestureID:checkOnly:additionalString:additionalNumber:bezierPathName:]_block_invoke + 50
10 libdispatch.dylib 0x00007fff6987e50e _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fff6988a626 _dispatch_async_and_wait_invoke + 87
12 libdispatch.dylib 0x00007fff6987e50e _dispatch_client_callout + 8
13 libdispatch.dylib 0x00007fff69889bc4 _dispatch_main_queue_callback_4CF + 1105
14 com.apple.CoreFoundation 0x00007fff32454e00 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9
15 com.apple.CoreFoundation 0x00007fff32414b8a __CFRunLoopRun + 2370
16 com.apple.CoreFoundation 0x00007fff32413bd3 CFRunLoopRunSpecific + 499
17 com.apple.HIToolbox 0x00007fff30f6a65d RunCurrentEventLoopInMode + 292
18 com.apple.HIToolbox 0x00007fff30f6a39d ReceiveNextEventCommon + 600
19 com.apple.HIToolbox 0x00007fff30f6a127 _BlockUntilNextEventMatchingListInModeWithFilter + 64
20 com.apple.AppKit 0x00007fff2f5dbeb4 _DPSNextEvent + 990
21 com.apple.AppKit 0x00007fff2f5da690 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
22 com.apple.AppKit 0x00007fff2f5cc3ae -[NSApplication run] + 658
23 com.apple.AppKit 0x00007fff2f59e775 NSApplicationMain + 777
24 libdyld.dylib 0x00007fff698d77fd start + 1

Thread 1:: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x00007fff69a1825a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff69a185d0 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff32415d0b __CFRunLoopServiceMachPort + 322
3 com.apple.CoreFoundation 0x00007fff324148e7 __CFRunLoopRun + 1695
4 com.apple.CoreFoundation 0x00007fff32413bd3 CFRunLoopRunSpecific + 499
5 com.apple.CFNetwork 0x00007fff30b7a012 0x7fff30b30000 + 303122
6 com.apple.Foundation 0x00007fff34aaf788 NSThread__start + 1064
7 libsystem_pthread.dylib 0x00007fff69adbe65 _pthread_start + 148
8 libsystem_pthread.dylib 0x00007fff69ad783b thread_start + 15

Thread 2:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff69a1825a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff69a185d0 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff32415d0b __CFRunLoopServiceMachPort + 322
3 com.apple.CoreFoundation 0x00007fff324148e7 __CFRunLoopRun + 1695
4 com.apple.CoreFoundation 0x00007fff32413bd3 CFRunLoopRunSpecific + 499
5 com.apple.AppKit 0x00007fff2f77ea72 _NSEventThread + 132
6 libsystem_pthread.dylib 0x00007fff69adbe65 _pthread_start + 148
7 libsystem_pthread.dylib 0x00007fff69ad783b thread_start + 15

Thread 3:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff69a205be __select + 10
1 com.apple.CoreFoundation 0x00007fff3243ed8a __CFSocketManager + 632
2 libsystem_pthread.dylib 0x00007fff69adbe65 _pthread_start + 148
3 libsystem_pthread.dylib 0x00007fff69ad783b thread_start + 15

Thread 4:
0 libsystem_kernel.dylib 0x00007fff69a1825a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff69a185d0 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff32415d0b __CFRunLoopServiceMachPort + 322
3 com.apple.CoreFoundation 0x00007fff324148e7 __CFRunLoopRun + 1695
4 com.apple.CoreFoundation 0x00007fff32413bd3 CFRunLoopRunSpecific + 499
5 com.apple.CoreFoundation 0x00007fff3249c19a CFRunLoopRun + 40
6 com.apple.MultitouchSupport.framework 0x00007fff588f34cb mt_ThreadedMTEntry + 71
7 libsystem_pthread.dylib 0x00007fff69adbe65 _pthread_start + 148
8 libsystem_pthread.dylib 0x00007fff69ad783b thread_start + 15

Thread 5:
0 libsystem_kernel.dylib 0x00007fff69a199be __ulock_wait + 10
1 libdispatch.dylib 0x00007fff6987ecd6 _dlock_wait + 44
2 libdispatch.dylib 0x00007fff6987eb65 _dispatch_thread_event_wait_slow + 36
3 libdispatch.dylib 0x00007fff6988a7bc DISPATCH_WAIT_FOR_QUEUE + 287
4 libdispatch.dylib 0x00007fff6988a40e _dispatch_sync_f_slow + 171
5 com.hegenberg.BetterTouchTool 0x00000001001fba12 -[BTTShortcutter performShortcutOrActionForGestureID:checkOnly:additionalString:additionalNumber:bezierPathName:] + 249
6 com.hegenberg.BetterTouchTool 0x00000001001fb8fa -[BTTShortcutter performShortcutOrActionForGestureID:checkOnly:additionalString:additionalNumber:] + 74
7 com.hegenberg.BetterTouchTool 0x00000001000b2927 tp_0Fingers_HandleFourFingerTap + 673
8 com.hegenberg.BetterTouchTool 0x00000001000b358b tp_0Fingers + 711
9 com.hegenberg.BetterTouchTool 0x00000001000afe3a tpCallback + 341
10 com.hegenberg.BetterTouchTool 0x00000001000af014 callback + 1669
11 com.hegenberg.BetterTouchTool 0x00000001000af11e magicTrackpad2Callback + 116
12 com.apple.MultitouchSupport.framework 0x00007fff588ff6f6 MTAlg_IssueContactFrameCallbacks + 171
13 com.apple.MultitouchSupport.framework 0x00007fff588f9d3d mt_HandleMultitouchFrame + 2251
14 com.apple.MultitouchSupport.framework 0x00007fff588f83d8 mt_DequeueMultitouchDataMachPortCallBack + 140
15 com.apple.CoreFoundation 0x00007fff32444a7b __CFMachPortPerform + 288
16 com.apple.CoreFoundation 0x00007fff324160bf CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 41
17 com.apple.CoreFoundation 0x00007fff3241600f __CFRunLoopDoSource1 + 541
18 com.apple.CoreFoundation 0x00007fff32414c7c __CFRunLoopRun + 2612
19 com.apple.CoreFoundation 0x00007fff32413bd3 CFRunLoopRunSpecific + 499
20 com.apple.CoreFoundation 0x00007fff3249c19a CFRunLoopRun + 40
21 com.apple.MultitouchSupport.framework 0x00007fff588f34cb mt_ThreadedMTEntry + 71
22 libsystem_pthread.dylib 0x00007fff69adbe65 _pthread_start + 148
23 libsystem_pthread.dylib 0x00007fff69ad783b thread_start + 15

Thread 6:
0 libsystem_pthread.dylib 0x00007fff69ad7818 start_wqthread + 0

Thread 7:
0 libsystem_pthread.dylib 0x00007fff69ad7818 start_wqthread + 0

Thread 8:
0 libsystem_pthread.dylib 0x00007fff69ad7818 start_wqthread + 0

Thread 9:
0 libsystem_pthread.dylib 0x00007fff69ad7818 start_wqthread + 0

Thread 10:
0 libsystem_pthread.dylib 0x00007fff69ad7818 start_wqthread + 0

Thread 11:
0 libsystem_pthread.dylib 0x00007fff69ad7818 start_wqthread + 0

Thread 12:
0 libsystem_pthread.dylib 0x00007fff69ad7818 start_wqthread + 0

Thread 13:
0 libsystem_pthread.dylib 0x00007fff69ad7818 start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x000072e3866a23d0 rbx: 0x00007fcfe1007000 rcx: 0x00007fcfe1007128 rdx: 0x0040000000000000
rdi: 0x00006000033e23d0 rsi: 0x0b3d800100b762d1 rbp: 0x00007ffeefbc5010 rsp: 0x00007ffeefbc4fe8
r8: 0x0000000000000154 r9: 0x00000000000007fb r10: 0x0000600003272160 r11: 0x00007fff31ecad30
r12: 0x00007fff6855d000 r13: 0x0000600001f5e5d0 r14: 0x00007fcfe10070e0 r15: 0xa3a3a3a3a3a3a3a3
rip: 0x00007fff6855ecf8 rfl: 0x0000000000010202 cr2: 0x000072e3866a23f0

Logical CPU: 4
Error Code: 0x00000004 (no mapping for user data write)
Trap Number: 14

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 1
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 2122
thread_create: 0
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=745.4M resident=0K(0%) swapped_out_or_unallocated=745.4M(100%)
Writable regions: Total=772.9M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=772.9M(100%)

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 1152K 9
Activity Tracing 256K 1
CG image 2372K 46
CoreAnimation 62.3M 337
CoreData Object IDs 4100K 2
CoreGraphics 8K 1
CoreImage 16K 3
CoreUI image data 3464K 39
Foundation 48K 2
Image IO 584K 77
Kernel Alloc Once 8K 1
MALLOC 305.3M 108
MALLOC guard page 64K 15
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
Memory Tag 242 12K 1
Memory Tag 251 28K 2
SQLite page cache 320K 5
STACK GUARD 56.1M 14
Stack 14.6M 16
VM_ALLOCATE 108K 17
__DATA 53.3M 477
__DATA_CONST 49K 4
__FONT_DATA 4K 1
__LINKEDIT 364.6M 11
__OBJC_RO 32.0M 1
__OBJC_RW 1780K 2
__TEXT 380.8M 466
__UNICODE 564K 1
libnetwork 128K 8
mapped file 290.7M 154
shared memory 664K 19
=========== ======= =======
TOTAL 1.9G 1841
TOTAL, minus reserved VM space 1.5G 1841

Model: MacBookPro15,1, BootROM 1037.60.58.0.0 (iBridge: 17.16.12551.0.0,0), 6 processors, 6-Core Intel Core i7, 2,6 GHz, 16 GB, SMC
Graphics: kHW_IntelUHDGraphics630Item, Intel UHD Graphics 630, spdisplays_builtin
Graphics: kHW_AMDRadeonPro555XItem, Radeon Pro 555X, spdisplays_pcie_device, 4 GB
Memory Module: BANK 0/ChannelA-DIMM0, 8 GB, DDR4, 2400 MHz, SK Hynix, -
Memory Module: BANK 2/ChannelB-DIMM0, 8 GB, DDR4, 2400 MHz, SK Hynix, -
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x7BF), wl0: Oct 26 2019 10:18:37 version 9.112.2.0.32.5.40 FWID 01-66dd2dcb
Bluetooth: Version 7.0.2f4, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB3.0 Hub
USB Device: USB3.0 Card Reader
USB Device: USB3.0 Hub
USB Device: USB 10/100/1000 LAN
USB Device: USB 3.1 Bus
USB Device: USB2.0 Hub
USB Device: USB2.0 Hub
USB Device: USB Keyboard
USB Device: USB Receiver
USB Device: USB Keyboard
USB Device: Apple T2 Bus
USB Device: Touch Bar Backlight
USB Device: Touch Bar Display
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Headset
USB Device: Ambient Light Sensor
USB Device: FaceTime HD Camera (Built-in)
USB Device: Apple T2 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 47.3
Thunderbolt Bus: MacBook Pro, Apple Inc., 47.3

Thanks for the crashlog, fixed in 3.276 (will be available as alpha in a few minutes)

It works perfectly :slight_smile: Thanks for the quick fix !