BTT repeatedly crashing in the evening

Describe the bug

For the last couple days, every evening BTT started to suddenly crash (not related to any trigger or so, i.e. I was not actively using BTT at the moment). It then restarts, and after a few seconds crashes again. It seems it stops when I quickly open the BTT configuration (but that may have been chance)


Device information:

MacBook Pro M1 Max
Running macOS 15.6.1 (24G90).
With BTT 5.571 and before that 5.570 (and possibly some older versions, I recently returned from vacation)


Additional information (e.g. crash logs, related issues, etc.):

It seems to crash while handling a exception thrown by [__NSCFString substringWithRange:]. Excerpt from a crash reporter log (they all feature a similar backtrace)

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               BetterTouchTool [22108]
Path:                  /Applications/_MyApps/*/BetterTouchTool.app/Contents/MacOS/BetterTouchTool
Identifier:            com.hegenberg.BetterTouchTool
Version:               5.571 (2025090201)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               502

Date/Time:             2025-09-02 21:38:11.5831 +0200
OS Version:            macOS 15.6.1 (24G90)
Report Version:        12
Anonymous UUID:        B29F3B3E-49ED-C845-D98D-DA47EEF0BE2C

Sleep/Wake UUID:       A324D68E-6315-4066-81A6-FCF27F829235

Time Awake Since Boot: 250000 seconds
Time Since Wake:       8366 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   BetterTouchTool [22108]

Application Specific Information:
abort() called


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x19cd02388 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x19cd3b88c pthread_kill + 296
2   libsystem_c.dylib             	       0x19cc44a3c abort + 124
3   libc++abi.dylib               	       0x19ccf1384 abort_message + 132
4   libc++abi.dylib               	       0x19ccdfcf4 demangling_terminate_handler() + 344
5   libobjc.A.dylib               	       0x19c964dd4 _objc_terminate() + 156
6   libc++abi.dylib               	       0x19ccf0698 std::__terminate(void (*)()) + 16
7   libc++abi.dylib               	       0x19ccf3c30 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 88
8   libc++abi.dylib               	       0x19ccf3bd8 __cxa_throw + 92
9   libobjc.A.dylib               	       0x19c95acf8 objc_exception_throw + 448
10  CoreFoundation                	       0x19cf92084 _CFThrowFormattedException + 124
11  CoreFoundation                	       0x19ce12f70 -[__NSCFString substringWithRange:] + 280
12  BetterTouchTool               	       0x1042bdefc 0x1040e4000 + 1941244
13  BetterTouchTool               	       0x10450edd4 0x1040e4000 + 4369876
14  BetterTouchTool               	       0x10450d0fc 0x1040e4000 + 4362492
15  BetterTouchTool               	       0x10450ca24 0x1040e4000 + 4360740
16  BetterTouchTool               	       0x1046b8a0c 0x1040e4000 + 6113804
17  libdispatch.dylib             	       0x19cb83b2c _dispatch_call_block_and_release + 32
18  libdispatch.dylib             	       0x19cb9d85c _dispatch_client_callout + 16
19  libdispatch.dylib             	       0x19cbbab80 _dispatch_main_queue_drain.cold.5 + 812
20  libdispatch.dylib             	       0x19cb92db0 _dispatch_main_queue_drain + 180
21  libdispatch.dylib             	       0x19cb92cec _dispatch_main_queue_callback_4CF + 44
22  CoreFoundation                	       0x19ce64be0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
23  CoreFoundation                	       0x19ce258dc __CFRunLoopRun + 1980
24  CoreFoundation                	       0x19ce24a98 CFRunLoopRunSpecific + 572
25  HIToolbox                     	       0x1a88c727c RunCurrentEventLoopInMode + 324
26  HIToolbox                     	       0x1a88ca4e8 ReceiveNextEventCommon + 676
27  HIToolbox                     	       0x1a8a55484 _BlockUntilNextEventMatchingListInModeWithFilter + 76
28  AppKit                        	       0x1a0d49a34 _DPSNextEvent + 684
29  AppKit                        	       0x1a16e8940 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
30  AppKit                        	       0x1a0d3cbe4 -[NSApplication run] + 480
31  AppKit                        	       0x1a0d132dc NSApplicationMain + 880
32  dyld                          	       0x19c99ab98 start + 6076

....

Actually I was perhaps a bit too optimistic with the "quickly open the BTT configuration" to make it stop crashing: just after submitting my report, it started crashing again -- it always instantly restarted and crashed again. It eventually stopped but only after repeating this maybe 5 or 6 times. Now it stopped by itself. Huh.

Could you attach the original crashlog file from the macOS console app?

Here is one of them.

crashlog.txt (48.6 KB)

Thanks! This should be fixed in 5.573 (building & uploading now)

1 Like

OK, thank you!!! I had to select "Check For Alpha Version Updates" to get it, just did that. Fingers crossed that it works :slight_smile:

Unfortunately 5.573 also crashes (though it only crashed once so far, just now).

Crashlog attached.

crashlog-5.573.txt (52.0 KB)

Weird. It's trying to parse some color to render it in BTT's clipboard manager. Do you know what kind of hex string you copied? It must be something starting with #

I wasn't aware it was related to copying :-). Looking at my clipboard history around the time, the ones which involve # are


# Two filters to speed up some methods:
DeclareFilter( "IsIntVector" );
DeclareFilter( "IsFFEVector" );

and

#############################################################################
##

Though I just tried them again and neither seemed to crash BTT

I have added some more safe guards in 5.576 (building now), let's hope that will resolve it.

1 Like