Reproducible crash when selecting and dragging actions

Describe the bug

  1. Select all actions for a particular trigger by clicking one and then Shift-Clicking the last one
  2. Try to drag all of the actions below the last action

Expected behavior: All of the actions are copied in order below the initial copy of the actions

Actual behavior: BetterTouchTool consistently crashes every time

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

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

Device information:

  • Type of Mac: 15" 2019 MBP
  • macOS version: 11.3.1
  • BetterTouchTool version: 3.562

Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):
Process: BetterTouchTool [13400]
Path: /Applications/BetterTouchTool.app/Contents/MacOS/BetterTouchTool
Identifier: com.hegenberg.BetterTouchTool
Version: 3.562 (1702)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: BetterTouchTool [13400]
User ID: 501

Date/Time: 2021-05-16 22:16:18.659 -0400
OS Version: macOS 11.3.1 (20E241)
Report Version: 12
Bridge OS Version: 5.3 (18P4556)
Anonymous UUID: 0511DFD8-BB84-4EC3-9F58-9196F058909F

Sleep/Wake UUID: 6C11CEF1-6CBB-4779-8248-F6CF8199E1B2

Time Awake Since Boot: 27000 seconds
Time Since Wake: 24000 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 0x00007facbdbffff0
Exception Note: EXC_CORPSE_NOTIFY

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

VM Regions Near 0x7facbdbffff0:
MALLOC_MEDIUM (reserved) 7facb0800000-7facb8000000 [120.0M] rw-/rwx SM=NUL reserved VM address space (unallocated)
-->
MALLOC_TINY 7facbdc00000-7facbdd00000 [ 1024K] rw-/rwx SM=PRV

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_platform.dylib 0x00007fff205cc249 _platform_memmove$VARIANT$Haswell + 585
1 com.apple.AppKit 0x00007fff22fb082e __64-[_NSTableRowHeightStorage _variableAddInsertionHolesAtIndexes:]_block_invoke + 209
2 com.apple.Foundation 0x00007fff213e5f25 NSINDEXSET_IS_CALLING_OUT_TO_A_RANGE_BLOCK + 7
3 com.apple.Foundation 0x00007fff21400c0f __NSIndexSetEnumerate + 1454
4 com.apple.AppKit 0x00007fff22fb06e4 -[_NSTableRowHeightStorage _variableAddInsertionHolesAtIndexes:] + 284
5 com.apple.AppKit 0x00007fff22fb037a -[NSTableRowData _insertAtIndexes:addItemToArrayFromRange:] + 564
6 com.apple.AppKit 0x00007fff2305e226 -[NSTableRowData moveRowAtIndex:toIndex:] + 1057
7 com.apple.AppKit 0x00007fff22f240ef -[NSTableView _doUpdatedWorkWithHandler:] + 102
8 com.apple.AppKit 0x00007fff2305ddc0 -[NSTableView moveRowAtIndex:toIndex:] + 96
9 com.hegenberg.BetterTouchTool 0x0000000102e5014b -[BTTLevel3VC moveGestureWithUUID:toPosition:] + 3288
10 com.hegenberg.BetterTouchTool 0x0000000102e50594 -[BTTLevel3VC tableView:acceptDrop:row:dropOperation:] + 648
11 com.apple.AppKit 0x00007fff2363a809 -[NSTableView performDragOperation:] + 210
12 com.apple.AppKit 0x00007fff231c8030 NSCoreDragReceiveMessageProc + 476
13 com.apple.HIServices 0x00007fff2590abbb CallReceiveMessageCollectionWithMessage + 103
14 com.apple.HIServices 0x00007fff25904e6b DoMultipartDropMessage + 105
15 com.apple.HIServices 0x00007fff25904c61 DoDropMessage + 42
16 com.apple.HIServices 0x00007fff259037ee DragInApplication + 741
17 com.apple.HIServices 0x00007fff259024d4 CoreDragStartDragging + 600
18 com.apple.AppKit 0x00007fff231c5604 -[NSCoreDragManager _dragUntilMouseUp:accepted:] + 1214
19 com.apple.AppKit 0x00007fff231c40e2 -[NSCoreDragManager dragImage:fromWindow:at:offset:event:pasteboard:source:slideBack:] + 2817
20 com.apple.AppKit 0x00007fff231c35d2 -[NSWindow(NSDrag) dragImage:at:offset:event:pasteboard:source:slideBack:] + 134
21 com.apple.AppKit 0x00007fff23638fb3 -[NSTableView _doImageDragUsingRowsWithIndexes:event:pasteboard:source:slideBack:startRow:] + 659
22 com.apple.AppKit 0x00007fff23639469 -[NSTableView _checkOverrideAndDoImageDragUsingRowsWithIndexes:event:pasteboard:source:slideBack:startRow:] + 257
23 com.apple.AppKit 0x00007fff2363a121 -[NSTableView _performClassicDragOfIndexes:hitRow:event:] + 444
24 com.apple.AppKit 0x00007fff231eb2bd -[NSTableView _performDragFromMouseDown:] + 472
25 com.apple.AppKit 0x00007fff231e979c -[NSTableView mouseDown:] + 765
26 com.hegenberg.BetterTouchTool 0x0000000103036cfe -[BTTPreferencesTableView mouseDown:] + 332
27 com.apple.AppKit 0x00007fff230976ce -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 4961
28 com.apple.AppKit 0x00007fff23006fb8 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 2594
29 com.apple.AppKit 0x00007fff23006376 -[NSWindow(NSEventRouting) sendEvent:] + 347
30 com.apple.AppKit 0x00007fff23004784 -[NSApplication(NSEvent) sendEvent:] + 352
31 com.hegenberg.BetterTouchTool 0x000000010306810a -[BTTApplication sendEvent:] + 1375
32 com.apple.AppKit 0x00007fff232dd979 -[NSApplication _handleEvent:] + 65
33 com.apple.AppKit 0x00007fff22e6d69e -[NSApplication run] + 623
34 com.apple.AppKit 0x00007fff22e4185c NSApplicationMain + 816
35 libdyld.dylib 0x00007fff205a4f3d start + 1

Thread 1:: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x00007fff2055432a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff2055469c mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff20682c6f __CFRunLoopServiceMachPort + 316
3 com.apple.CoreFoundation 0x00007fff2068134f __CFRunLoopRun + 1328
4 com.apple.CoreFoundation 0x00007fff2068075c CFRunLoopRunSpecific + 563
5 com.apple.CFNetwork 0x00007fff24b12cdc 0x7fff248d2000 + 2362588
6 com.apple.Foundation 0x00007fff21403977 NSThread__start + 1068
7 libsystem_pthread.dylib 0x00007fff20589954 _pthread_start + 224
8 libsystem_pthread.dylib 0x00007fff205854a7 thread_start + 15

Thread 2:: com.apple.NSEventThread
0 com.apple.SkyLight 0x00007fff24e17167 CGSSnarfAndDispatchDatagrams + 171
1 com.apple.SkyLight 0x00007fff250b61c4 SLSGetNextEventRecordInternal + 278
2 com.apple.SkyLight 0x00007fff24f0d025 SLEventCreateNextEvent + 9
3 com.apple.HIToolbox 0x00007fff288af2ae PullEventsFromWindowServerOnConnection(unsigned int, unsigned char, __CFMachPortBoost*) + 268
4 com.apple.HIToolbox 0x00007fff288af168 MessageHandler(__CFMachPort*, void*, long, void*) + 48
5 com.apple.CoreFoundation 0x00007fff206af242 __CFMachPortPerform + 250
6 com.apple.CoreFoundation 0x00007fff20683214 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 41
7 com.apple.CoreFoundation 0x00007fff206830f5 __CFRunLoopDoSource1 + 619
8 com.apple.CoreFoundation 0x00007fff2068177f __CFRunLoopRun + 2400
9 com.apple.CoreFoundation 0x00007fff2068075c CFRunLoopRunSpecific + 563
10 com.apple.AppKit 0x00007fff23002baa _NSEventThread + 124
11 libsystem_pthread.dylib 0x00007fff20589954 _pthread_start + 224
12 libsystem_pthread.dylib 0x00007fff205854a7 thread_start + 15

Thread 3:
0 libsystem_pthread.dylib 0x00007fff20585484 start_wqthread + 0

Thread 4:
0 libsystem_pthread.dylib 0x00007fff20585484 start_wqthread + 0

Thread 5:
0 libsystem_pthread.dylib 0x00007fff20585484 start_wqthread + 0

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

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

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

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

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

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00007facc801d060 rbx: 0x00007ffeeced9ec0 rcx: 0x0000000000000010 rdx: 0xfffffffff5be2fa0
rdi: 0x00007facbdc00040 rsi: 0x00007facbdc00030 rbp: 0x00007ffeeced9d10 rsp: 0x00007ffeeced9d10
r8: 0x00007facc801cfa0 r9: 0x0000600001f63200 r10: 0x00007fff802fa048 r11: 0x00007facc801d050
r12: 0x0000000000000000 r13: 0x7fffffffffffffff r14: 0x000000000000000b r15: 0x0000000000000001
rip: 0x00007fff205cc249 rfl: 0x0000000000010202 cr2: 0x00007facbdbffff0

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

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
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: 3
thread_create: 0
thread_set_state: 0

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

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 640K 5
Activity Tracing 256K 1
CG backing stores 5016K 7
CG image 6492K 40
CG raster data 16K 2
CoreAnimation 16.8M 210
CoreData 64K 1
CoreData Object IDs 4100K 2
CoreGraphics 12K 2
CoreUI image data 4704K 39
Foundation 16K 1
Image IO 368K 31
Kernel Alloc Once 8K 1
MALLOC 556.9M 111
MALLOC guard page 96K 19
MALLOC_MEDIUM (reserved) 1.6G 14 reserved VM address space (unallocated)
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
SQLite page cache 320K 5
STACK GUARD 56.0M 11
Stack 13.1M 11
VM_ALLOCATE 3056K 27
__DATA 24.1M 514
__DATA_CONST 29.7M 338
__DATA_DIRTY 1767K 226
__FONT_DATA 4K 1
__LINKEDIT 513.4M 29
__OBJC_RO 70.1M 1
__OBJC_RW 2480K 2
__TEXT 429.5M 520
__UNICODE 588K 1
libnetwork 128K 8
mapped file 477.9M 114
shared memory 772K 20
=========== ======= =======
TOTAL 4.2G 2315
TOTAL, minus reserved VM space 2.2G 2315

Model: MacBookPro15,1, BootROM 1554.100.64.0.0 (iBridge: 18.16.14556.0.0,0), 8 processors, 8-Core Intel Core i9, 2.4 GHz, 32 GB, SMC
Graphics: kHW_IntelUHDGraphics630Item, Intel UHD Graphics 630, spdisplays_builtin
Graphics: kHW_AMDRadeonPro560XItem, Radeon Pro 560X, spdisplays_pcie_device, 4 GB
Memory Module: BANK 0/ChannelA-DIMM0, 16 GB, DDR4, 2400 MHz, SK Hynix, -
Memory Module: BANK 2/ChannelB-DIMM0, 16 GB, DDR4, 2400 MHz, SK Hynix, -
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x7BF), wl0: Feb 16 2021 02:10:42 version 9.30.444.10.32.5.67 FWID 01-a00c1314
Bluetooth: Version 8.0.4d18, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB 3.1 Bus
USB Device: YubiKey OTP+FIDO+CCID
USB Device: USB2.1 Hub
USB Device: USB2.1 Hub
USB Device: USB Optical Mouse
USB Device: HID 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.4
Thunderbolt Bus: MacBook Pro, Apple Inc., 47.4