Bear Crashing when adding multiple links in a table cell

  • Bear Version: 2.3.12 (13245)
  • OS Version: macOS Sonoma 14.5 (23F79)
  • What were you doing: Linking to multiple documents within a table cell.
  • What feature did you use: Linking documents
  • What happened: After adding multiple links within a table cell, Bear crashed.
  • What did you expect to happen: Bear shouldn’t crash.

Steps to reproduce

  1. Create a new note in Bear
  2. Add a table to the note.
  3. In one of the non-header cells, start adding links by typing out [[alpha]] [[bravo]] [[charlie]] [[delta]] [[echo]] [[foxtrot]] ...
  4. Bear usually crashes before getting to the 4th link.

OSX Problem Report

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

Process:               Bear [43986]
Path:                  /Applications/Bear.app/Contents/MacOS/Bear
Identifier:            net.shinyfrog.bear
Version:               2.3.12 (13245)
App Item ID:           1091189122
App External ID:       872751382
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]

Date/Time:             2025-03-06 08:24:42.7724 -0500
OS Version:            macOS 14.5 (23F79)
Report Version:        12
Anonymous UUID:        86237D0B-9553-A78F-7951-2750E362B01F

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

Exception Type:        EXC_BREAKPOINT (SIGTRAP)
Exception Codes:       0x0000000000000001, 0x00000001a64d6a40

Termination Reason:    Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process:   exc handler [43986]

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libswiftCore.dylib            	       0x1a64d6a40 closure #1 in closure #1 in closure #1 in _assertionFailure(_:_:file:line:flags:) + 240
1   libswiftCore.dylib            	       0x1a64d6908 closure #1 in closure #1 in _assertionFailure(_:_:file:line:flags:) + 344
2   libswiftCore.dylib            	       0x1a64d6264 _assertionFailure(_:_:file:line:flags:) + 188
3   libswiftCore.dylib            	       0x1a66ba470 String.UTF16View.distance(from:to:) + 596
4   libswiftCore.dylib            	       0x1a66b04b4 String.Index.utf16Offset<A>(in:) + 420
5   BearCore                      	       0x1042fd8e0 0x1040b0000 + 2414816
6   MDTextKitUI                   	       0x103e105b8 0x103d5c000 + 738744
7   MDTextKitUI                   	       0x103e0a940 0x103d5c000 + 715072
8   MDTextKitUI                   	       0x103dc1550 0x103d5c000 + 415056
9   MDTextKitUI                   	       0x103da5ab8 0x103d5c000 + 301752
10  MDTextKitUI                   	       0x103da5b0c 0x103d5c000 + 301836
11  AppKit                        	       0x19a23c480 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 404
12  AppKit                        	       0x19a23c118 -[NSWindow(NSEventRouting) sendEvent:] + 284
13  AppKit                        	       0x19a904828 -[NSApplication(NSEventRouting) sendEvent:] + 1604
14  AppKit                        	       0x19a55289c -[NSApplication _handleEvent:] + 60
15  AppKit                        	       0x19a1030c0 -[NSApplication run] + 512
16  AppKit                        	       0x19a0da2e0 NSApplicationMain + 880
17  dyld                          	       0x19644a0e0 start + 2360

Thread 1:
0   libsystem_pthread.dylib       	       0x1967cdd20 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib       	       0x1967cdd20 start_wqthread + 0

Thread 3::  Dispatch queue: NSTextCheckingOperationQueue (QOS: USER_INTERACTIVE)
0   CoreFoundation                	       0x196839c68 CFBasicHashGetPtrIndex + 112
1   CoreFoundation                	       0x196839b48 CFBasicHashCreate + 416
2   CoreFoundation                	       0x196839980 __CFDictionaryCreateGeneric + 152
3   CoreFoundation                	       0x196839760 CFDictionaryCreateMutable + 68
4   Foundation                    	       0x197997750 -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:] + 1396
5   AppKit                        	       0x19a34d714 -[NSSpellChecker _textCheckingResultsFromSpellServerData:] + 60
6   AppKit                        	       0x19a8dfe38 -[NSSpellChecker candidatesForSelectedRange:inString:types:options:offset:orthography:inSpellDocumentWithTag:] + 2504
7   AppKit                        	       0x19a2ccfe0 NSSpellCheckerCheckString + 1320
8   AppKit                        	       0x19ace8638 -[NSTextCandidateOperation main] + 208
9   Foundation                    	       0x1979c79dc __NSOPERATION_IS_INVOKING_MAIN__ + 16
10  Foundation                    	       0x1979c6d84 -[NSOperation start] + 648
11  Foundation                    	       0x1979c6af4 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 16
12  Foundation                    	       0x1979c69e4 __NSOQSchedule_f + 172
13  libdispatch.dylib             	       0x196620750 _dispatch_call_block_and_release + 32
14  libdispatch.dylib             	       0x1966223e8 _dispatch_client_callout + 20
15  libdispatch.dylib             	       0x1966258ec _dispatch_continuation_pop + 600
16  libdispatch.dylib             	       0x196624f08 _dispatch_async_redirect_invoke + 584
17  libdispatch.dylib             	       0x196633ea8 _dispatch_root_queue_drain + 392
18  libdispatch.dylib             	       0x1966346b8 _dispatch_worker_thread2 + 156
19  libsystem_pthread.dylib       	       0x1967cefd0 _pthread_wqthread + 228
20  libsystem_pthread.dylib       	       0x1967cdd28 start_wqthread + 8

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

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

Thread 6:
0   libsystem_kernel.dylib        	       0x1967957e8 __semwait_signal + 8
1   libsystem_c.dylib             	       0x196676568 nanosleep + 220
2   libsystem_c.dylib             	       0x19667f3fc sleep + 52
3   Bear                          	       0x1031c4eac 0x102ffc000 + 1871532
4   libsystem_pthread.dylib       	       0x1967d2f94 _pthread_start + 136
5   libsystem_pthread.dylib       	       0x1967cdd34 thread_start + 8

Thread 7:: SentryCrash Exception Handler (Secondary)
0   libsystem_kernel.dylib        	       0x1967921f4 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x1967a4b24 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x19679ae34 mach_msg_overwrite + 476
3   libsystem_kernel.dylib        	       0x196792578 mach_msg + 24
4   Bear                          	       0x1031ae958 0x102ffc000 + 1780056
5   libsystem_pthread.dylib       	       0x1967d2f94 _pthread_start + 136
6   libsystem_pthread.dylib       	       0x1967cdd34 thread_start + 8

Thread 8:: com.apple.NSURLConnectionLoader
0   libsystem_kernel.dylib        	       0x1967921f4 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x1967a4b24 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x19679ae34 mach_msg_overwrite + 476
3   libsystem_kernel.dylib        	       0x196792578 mach_msg + 24
4   CoreFoundation                	       0x1968b2680 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                	       0x1968b0f44 __CFRunLoopRun + 1208
6   CoreFoundation                	       0x1968b0434 CFRunLoopRunSpecific + 608
7   CFNetwork                     	       0x19bd4ca18 0x19baed000 + 2488856
8   Foundation                    	       0x1979ddf80 __NSThread__start__ + 716
9   libsystem_pthread.dylib       	       0x1967d2f94 _pthread_start + 136
10  libsystem_pthread.dylib       	       0x1967cdd34 thread_start + 8

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

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

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

Thread 12:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	       0x1967921f4 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x1967a4b24 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x19679ae34 mach_msg_overwrite + 476
3   libsystem_kernel.dylib        	       0x196792578 mach_msg + 24
4   CoreFoundation                	       0x1968b2680 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                	       0x1968b0f44 __CFRunLoopRun + 1208
6   CoreFoundation                	       0x1968b0434 CFRunLoopRunSpecific + 608
7   AppKit                        	       0x19a23a188 _NSEventThread + 144
8   libsystem_pthread.dylib       	       0x1967d2f94 _pthread_start + 136
9   libsystem_pthread.dylib       	       0x1967cdd34 thread_start + 8


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000600001d08f10   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000600001d08f30
    x4: 0x0000000000000000   x5: 0x000000016ce02ef0   x6: 0x0000000000000073   x7: 0x0000000000000000
    x8: 0x0000000000000155   x9: 0x0000000000000154  x10: 0x0000000000000f00  x11: 0x00000000aee54878
   x12: 0x00000000000007fb  x13: 0x00000000000007fd  x14: 0x00000000af055051  x15: 0x0000000000000051
   x16: 0x00000000aee54878  x17: 0x0000000000055000  x18: 0x0000000000000000  x19: 0xa800000000000000
   x20: 0x0abcbfef0abcbfef  x21: 0x0000000000090107  x22: 0x000000000000000f  x23: 0x0000000000000000
   x24: 0x0000000000000009  x25: 0x0000000000000008  x26: 0x000000016ce03160  x27: 0x000000020059f500
   x28: 0x00000001fe6bc1c8   fp: 0x000000016ce02fa0   lr: 0x6b3a8001a64d6a40
    sp: 0x000000016ce02f80   pc: 0x00000001a64d6a40 cpsr: 0x60001000
   far: 0x0000000000000000  esr: 0xf2000001 (Breakpoint) brk 1

Binary Images:
       0x1035c0000 -        0x1035cbfff libobjc-trampolines.dylib (*) <9381bd6d-84a5-3c72-b3b8-88428afa4782> /usr/lib/libobjc-trampolines.dylib
       0x1040b0000 -        0x1043a3fff net.shinyfrog.BearCore-Mac (2.3.12) <71558366-9055-3528-ba2d-d9cf799220e9> /Applications/Bear.app/Contents/Frameworks/BearCore.framework/Versions/A/BearCore
       0x103d5c000 -        0x103f23fff net.shinyfrog.MDTextKitUI-Mac (2.3.12) <c1c6dd91-267e-33da-900b-015814a12b51> /Applications/Bear.app/Contents/Frameworks/MDTextKitUI.framework/Versions/A/MDTextKitUI
       0x10387c000 -        0x10389ffff valet.Valet (2.3.12) <226ba7ec-f5ec-3cc8-9a5a-79a8d49f6d3e> /Applications/Bear.app/Contents/Frameworks/Valet_DE9C7E33321_PackageProduct.framework/Versions/A/Valet_DE9C7E33321_PackageProduct
       0x10383c000 -        0x103847fff net.shinyfrog.SFThemeKit (2.3.12) <b501b201-c6ae-38a9-9ba2-0259d398b3b9> /Applications/Bear.app/Contents/Frameworks/SFThemeKit.framework/Versions/A/SFThemeKit
       0x1044f4000 -        0x10467ffff com.cossacklabs.themis (2.3.12) <740ab679-1cb3-3b79-aeb0-f9c13bfec035> /Applications/Bear.app/Contents/Frameworks/themis.framework/Versions/A/themis
       0x103a48000 -        0x103aaffff net.shinyfrog.MDExporters-Mac (2.3.12) <e3c4e7cc-be89-3271-b24e-1c130e90e832> /Applications/Bear.app/Contents/Frameworks/MDExporters.framework/Versions/A/MDExporters
       0x103944000 -        0x10395ffff cocoalumberjack.CocoaLumberjack (2.3.12) <dc0cb056-6fd2-38c8-b3df-bc133e43580d> /Applications/Bear.app/Contents/Frameworks/CocoaLumberjack_-500FEF4A7B3EDA0C_PackageProduct.framework/Versions/A/CocoaLumberjack_-500FEF4A7B3EDA0C_PackageProduct
       0x1037fc000 -        0x10380bfff net.shinyfrog.SketcherKit-Mac (2.3.12) <e3af9cc0-249c-32e8-b145-72a974326ab9> /Applications/Bear.app/Contents/Frameworks/SketcherKit.framework/Versions/A/SketcherKit
       0x1038f8000 -        0x103903fff net.shinyfrog.Zxcvbn-macOS (2.3.12) <77bd2179-f807-3661-99c9-0e9edc918069> /Applications/Bear.app/Contents/Frameworks/Zxcvbn.framework/Versions/A/Zxcvbn
       0x1038bc000 -        0x1038d3fff ziparchive.ZipArchive (2.3.12) <65f92135-378a-3da9-8f67-280acd0d948e> /Applications/Bear.app/Contents/Frameworks/ZipArchive_-57F40D945DCA4E01_PackageProduct.framework/Versions/A/ZipArchive_-57F40D945DCA4E01_PackageProduct
       0x103a04000 -        0x103a1ffff net.shinyfrog.MDImporters (2.3.12) <c285c2fe-a889-3737-b53c-95827d975448> /Applications/Bear.app/Contents/Frameworks/MDImporters.framework/Versions/A/MDImporters
       0x103918000 -        0x103923fff net.shinyfrog.Class-Bridge-Mac (2.3.12) <516448c3-f857-3626-a674-a4436f4316c9> /Applications/Bear.app/Contents/Frameworks/ClassBridge.framework/Versions/A/ClassBridge
       0x103820000 -        0x103827fff net.shinyfrog.SFCodeHighlighter-Mac (2.3.12) <376c4d03-1c26-39bd-9e05-9ce6a3228eaf> /Applications/Bear.app/Contents/Frameworks/SFCodeHighlighter.framework/Versions/A/SFCodeHighlighter
       0x103988000 -        0x1039bbfff net.shinyfrog.BearModel-Mac (2.3.12) <1fb35817-d8a2-3ee2-84ed-2ae9056e3520> /Applications/Bear.app/Contents/Frameworks/BearModel.framework/Versions/A/BearModel
       0x103b6c000 -        0x103b7ffff net.shinyfrog.BearEncryptionKit-Mac (2.3.12) <f336bb11-f92f-3d3f-a1e9-f2304cd58df3> /Applications/Bear.app/Contents/Frameworks/BearEncryptionKit.framework/Versions/A/BearEncryptionKit
       0x103b9c000 -        0x103c77fff net.shinyfrog.PolarMark-Mac (2.3.12) <c87df330-fcd3-3629-97fc-d9745d73c53e> /Applications/Bear.app/Contents/Frameworks/PolarMark.framework/Versions/A/PolarMark
       0x103fcc000 -        0x104027fff com.shinyfrog.BearWidgets (2.3.12) <388c0fa0-6cdb-3196-9231-6bd9baa5911e> /Applications/Bear.app/Contents/Frameworks/BearWidgets.framework/Versions/A/BearWidgets
       0x10483c000 -        0x10488bfff net.shinyfrog.MDTextKit-Mac (2.3.12) <4ce3ff0a-7726-3d87-9790-54e80ff5085d> /Applications/Bear.app/Contents/Frameworks/MDTextKit.framework/Versions/A/MDTextKit
       0x103b14000 -        0x103b2ffff net.shinyfrog.TextBundle-Mac (2.3.12) <68b295a5-f561-388e-94ef-1bc537aadc56> /Applications/Bear.app/Contents/Frameworks/TextBundle.framework/Versions/A/TextBundle
       0x102ffc000 -        0x1032cbfff net.shinyfrog.bear (2.3.12) <6a65bf20-0297-3df9-9b9a-b08ba7a00da3> /Applications/Bear.app/Contents/MacOS/Bear
       0x1a649c000 -        0x1a69f9fff libswiftCore.dylib (*) <c2fd0f69-d72c-37a5-938e-1bd710c88431> /usr/lib/swift/libswiftCore.dylib
       0x19a0d6000 -        0x19b412fff com.apple.AppKit (6.9) <61f710be-9132-3cc2-883d-066365fba1ad> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
       0x196444000 -        0x1964cca17 dyld (*) <37bbc384-0755-31c7-a808-0ed49e44dd8e> /usr/lib/dyld
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
       0x1967cc000 -        0x1967d8fff libsystem_pthread.dylib (*) <386b0fc1-7873-3328-8e71-43269fd1b2c7> /usr/lib/system/libsystem_pthread.dylib
       0x196834000 -        0x196d0cfff com.apple.CoreFoundation (6.9) <84b539d5-22c9-3f8c-84c8-903e9c7b8d29> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x197989000 -        0x1985e6fff com.apple.Foundation (6.9) <99e0292d-7873-3968-9c9c-5955638689a5> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
       0x19661e000 -        0x196665fff libdispatch.dylib (*) <502762ee-7aa7-306c-9dbd-88981a86bb78> /usr/lib/system/libdispatch.dylib
       0x1967ff000 -        0x196806fe7 libsystem_platform.dylib (*) <d5bbfc31-d52a-37d6-a41b-48638113ad4c> /usr/lib/system/libsystem_platform.dylib
       0x196791000 -        0x1967cbffb libsystem_kernel.dylib (*) <9b8b53f9-e2b6-36df-98e9-28d8fca732f2> /usr/lib/system/libsystem_kernel.dylib
       0x196669000 -        0x1966e7ff7 libsystem_c.dylib (*) <05b44e93-dffc-3bd8-90ab-fd97cb73f171> /usr/lib/system/libsystem_c.dylib
       0x19baed000 -        0x19bec0fff com.apple.CFNetwork (1.0) <0af09533-3214-3182-a742-0c04a20f38d1> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork

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: 0
    thread_create: 0
    thread_set_state: 0

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

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               256K        2 
Activity Tracing                   256K        1 
CG image                          95.5M       44 
ColorSync                          624K       31 
CoreAnimation                     26.0M      287 
CoreData                            48K        1 
CoreData Object IDs               4112K        2 
CoreGraphics                        48K        3 
CoreImage                           48K        3 
CoreUI image data                 1840K       16 
Foundation                          32K        2 
Kernel Alloc Once                   32K        1 
MALLOC                             1.5G       60 
MALLOC guard page                  288K       18 
SQLite page cache                 8832K       69 
STACK GUARD                       56.2M       13 
Stack                             14.4M       13 
VM_ALLOCATE                        224K       14 
__AUTH                            2477K      428 
__AUTH_CONST                      33.0M      649 
__CTF                               824        1 
__DATA                            16.2M      656 
__DATA_CONST                      33.8M      677 
__DATA_DIRTY                      2137K      243 
__FONT_DATA                          4K        1 
__INFO_FILTER                         8        1 
__LINKEDIT                       537.2M       22 
__OBJC_RO                         71.9M        2 
__OBJC_RW                         2199K        1 
__TEXT                           730.9M      697 
dyld private memory                272K        2 
libnetwork                         640K       16 
mapped file                      489.0M       87 
shared memory                      864K       14 
===========                     =======  ======= 
TOTAL                              3.6G     4077 

1 Like

Thanks for reporting this bug. A fix will be available with the next udpate.

1 Like