Sourcetree keeps crashing after cloning a repository
Asked by kcrob:

Just from one day to another my Sourcetree app keeps crashing after I clone a repository from my Bitbucket account.

If I don't clone a repository it works just fine. Only after it keeps crashing. After I delete the contents of the map I cloned my repository to Sourcetree works again.

What I have tried:

* Uninstalling and reinstalling sourcetree manually
* Deleting sourcetree and atlassian folders from Application Support Folder.

In my Logs/DiagnosticReports it creates this crash file. This is the first part of the log file

Can anybody please help me?

```
Process: Sourcetree [2021]
Path: /Applications/Sourcetree.app/Contents/MacOS/Sourcetree
Identifier: com.torusknot.SourceTreeNotMAS
Version: 2.7.4 (175)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Sourcetree [2021]
User ID: 503

Date/Time: 2018-06-06 15:12:32.554 +0200
OS Version: Mac OS X 10.13.4 (17E199)
Report Version: 12
Anonymous UUID: 2C9E22B1-F4C5-2832-D539-69140E8F213D


Time Awake Since Boot: 1500 seconds

System Integrity Protection: enabled

Crashed Thread: 4 Dispatch queue: com.apple.root.default-qos

Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [0]

Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff2c3616bb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fff53a79942 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2c3f19a5 +[NSException raise:format:] + 197
3 Foundation 0x00007fff2e412485 -[NSString(NSPathUtilities) stringByAppendingPathExtension:] + 113
4 Sourcetree 0x000000010dcc88d9 Sourcetree + 641241
5 Sourcetree 0x000000010dcc85dc Sourcetree + 640476
6 libdispatch.dylib 0x00007fff5465e64a _dispatch_call_block_and_release + 12
7 libdispatch.dylib 0x00007fff54656e08 _dispatch_client_callout + 8
8 libdispatch.dylib 0x00007fff54663d15 _dispatch_queue_override_invoke + 880
9 libdispatch.dylib 0x00007fff546589f9 _dispatch_root_queue_drain + 515
10 libdispatch.dylib 0x00007fff546587a5 _dispatch_worker_thread3 + 101
11 libsystem_pthread.dylib 0x00007fff549a8169 _pthread_wqthread + 1387
12 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff547d720a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff547d6724 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff2c2de045 __CFRunLoopServiceMachPort + 341
3 com.apple.CoreFoundation 0x00007fff2c2dd397 __CFRunLoopRun + 1783
4 com.apple.CoreFoundation 0x00007fff2c2dca07 CFRunLoopRunSpecific + 487
5 com.apple.HIToolbox 0x00007fff2b5bad96 RunCurrentEventLoopInMode + 286
6 com.apple.HIToolbox 0x00007fff2b5bab06 ReceiveNextEventCommon + 613
7 com.apple.HIToolbox 0x00007fff2b5ba884 _BlockUntilNextEventMatchingListInModeWithFilter + 64
8 com.apple.AppKit 0x00007fff2986da73 _DPSNextEvent + 2085
9 com.apple.AppKit 0x00007fff2a003e34 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044
10 com.apple.AppKit 0x00007fff29862885 -[NSApplication run] + 764
11 com.apple.AppKit 0x00007fff29831a72 NSApplicationMain + 804
12 libdyld.dylib 0x00007fff54690015 start + 1

Thread 1:: Dispatch queue: com.apple.root.default-qos
0 com.apple.CoreFoundation 0x00007fff2c2615f7 __CFStrHashEightBit2 + 87
1 com.apple.CoreFoundation 0x00007fff2c261525 __CFSearchStringROM + 37
2 com.apple.CoreFoundation 0x00007fff2c26105b __CFStringCreateImmutableFunnel3 + 2555
3 com.apple.CoreFoundation 0x00007fff2c275b9a CFStringCreateWithSubstring + 410
4 com.apple.CoreFoundation 0x00007fff2c2b6441 -[__NSCFString substringWithRange:] + 273
5 com.torusknot.SourceTreeNotMAS 0x000000010dc723fc 0x10dc2c000 + 287740
6 com.torusknot.SourceTreeNotMAS 0x000000010dd73bbf 0x10dc2c000 + 1342399
7 com.torusknot.SourceTreeNotMAS 0x000000010dc9aaa3 0x10dc2c000 + 453283
8 com.torusknot.SourceTreeNotMAS 0x000000010dc9afaf 0x10dc2c000 + 454575
9 com.torusknot.SourceTreeNotMAS 0x000000010dc7b693 0x10dc2c000 + 325267
10 com.torusknot.SourceTreeNotMAS 0x000000010de971bf 0x10dc2c000 + 2535871
11 libdispatch.dylib 0x00007fff5465e64a _dispatch_call_block_and_release + 12
12 libdispatch.dylib 0x00007fff54656e08 _dispatch_client_callout + 8
13 libdispatch.dylib 0x00007fff54663d15 _dispatch_queue_override_invoke + 880
14 libdispatch.dylib 0x00007fff546589f9 _dispatch_root_queue_drain + 515
15 libdispatch.dylib 0x00007fff546587a5 _dispatch_worker_thread3 + 101
16 libsystem_pthread.dylib 0x00007fff549a8169 _pthread_wqthread + 1387
17 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 2:: Dispatch queue: com.apple.root.utility-qos.overcommit
0 libsystem_kernel.dylib 0x00007fff547e0a36 __psynch_mutexdrop + 10
1 libsystem_pthread.dylib 0x00007fff549a8ae4 _pthread_mutex_unlock_drop + 36
2 libsystem_pthread.dylib 0x00007fff549a6917 _pthread_mutex_unlock_slow + 459
3 com.apple.CoreFoundation 0x00007fff2c2cba5b CFRunLoopWakeUp + 363
4 libdispatch.dylib 0x00007fff54656e08 _dispatch_client_callout + 8
5 libdispatch.dylib 0x00007fff54669ed1 _dispatch_continuation_pop + 472
6 libdispatch.dylib 0x00007fff546590d1 _dispatch_source_invoke + 620
7 libdispatch.dylib 0x00007fff546589f9 _dispatch_root_queue_drain + 515
8 libdispatch.dylib 0x00007fff546587a5 _dispatch_worker_thread3 + 101
9 libsystem_pthread.dylib 0x00007fff549a8169 _pthread_wqthread + 1387
10 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 3:: Dispatch queue: com.apple.root.default-qos
0 libsystem_malloc.dylib 0x00007fff5483fd08 _nano_malloc_check_clear + 328
1 libsystem_malloc.dylib 0x00007fff54840185 nano_calloc + 72
2 libsystem_malloc.dylib 0x00007fff5483ac7c malloc_zone_calloc + 87
3 libsystem_malloc.dylib 0x00007fff5483b58e calloc + 30
4 com.apple.CoreFoundation 0x00007fff2c4438aa cow_copy_storage + 74
5 com.apple.CoreFoundation 0x00007fff2c394623 _cow_mutate_slow + 67
6 com.apple.CoreFoundation 0x00007fff2c2d2b54 -[__NSDictionaryM _mutate] + 84
7 com.apple.CoreFoundation 0x00007fff2c2d2935 -[NSMutableDictionary addEntriesFromDictionary:] + 53
8 com.torusknot.SourceTreeNotMAS 0x000000010dc759bd 0x10dc2c000 + 301501
9 com.torusknot.SourceTreeNotMAS 0x000000010dc75d5a 0x10dc2c000 + 302426
10 com.torusknot.SourceTreeNotMAS 0x000000010dc77d8b 0x10dc2c000 + 310667
11 com.torusknot.SourceTreeNotMAS 0x000000010dc76a67 0x10dc2c000 + 305767
12 com.torusknot.SourceTreeNotMAS 0x000000010dd7437b 0x10dc2c000 + 1344379
13 com.torusknot.SourceTreeNotMAS 0x000000010dc9aaa3 0x10dc2c000 + 453283
14 com.torusknot.SourceTreeNotMAS 0x000000010dc9afaf 0x10dc2c000 + 454575
15 com.torusknot.SourceTreeNotMAS 0x000000010dc7b693 0x10dc2c000 + 325267
16 com.torusknot.SourceTreeNotMAS 0x000000010de971bf 0x10dc2c000 + 2535871
17 libdispatch.dylib 0x00007fff5465e64a _dispatch_call_block_and_release + 12
18 libdispatch.dylib 0x00007fff54656e08 _dispatch_client_callout + 8
19 libdispatch.dylib 0x00007fff54663d15 _dispatch_queue_override_invoke + 880
20 libdispatch.dylib 0x00007fff546589f9 _dispatch_root_queue_drain + 515
21 libdispatch.dylib 0x00007fff546587a5 _dispatch_worker_thread3 + 101
22 libsystem_pthread.dylib 0x00007fff549a8169 _pthread_wqthread + 1387
23 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 4 Crashed:: Dispatch queue: com.apple.root.default-qos
0 com.apple.AppKit 0x00007fff29b98454 -[NSApplication _crashOnException:] + 109
1 com.apple.AppKit 0x00007fff29b9833c -[NSApplication reportException:] + 953
2 com.torusknot.SourceTreeNotMAS 0x000000010df1634d 0x10dc2c000 + 3056461
3 com.apple.AppKit 0x00007fff29c82aa8 uncaughtErrorProc + 157
4 com.apple.CoreFoundation 0x00007fff2c3f1d92 __handleUncaughtException + 770
5 libobjc.A.dylib 0x00007fff53a7ba41 _objc_terminate() + 91
6 com.torusknot.SourceTreeNotMAS 0x000000010df160a9 0x10dc2c000 + 3055785
7 libc++abi.dylib 0x00007fff5265f7c9 std::__terminate(void (*)()) + 8
8 libc++abi.dylib 0x00007fff5265f843 std::terminate() + 51
9 libdispatch.dylib 0x00007fff54656e1c _dispatch_client_callout + 28
10 libdispatch.dylib 0x00007fff54663d15 _dispatch_queue_override_invoke + 880
11 libdispatch.dylib 0x00007fff546589f9 _dispatch_root_queue_drain + 515
12 libdispatch.dylib 0x00007fff546587a5 _dispatch_worker_thread3 + 101
13 libsystem_pthread.dylib 0x00007fff549a8169 _pthread_wqthread + 1387
14 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 5:
0 libsystem_kernel.dylib 0x00007fff547e1292 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff549a8009 _pthread_wqthread + 1035
2 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 6:
0 libsystem_kernel.dylib 0x00007fff547e0a1e __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff549a9589 _pthread_cond_wait + 732
2 com.apple.GeForceMTLDriver 0x00007fff2796bcc2 0x7fff2780b000 + 1445058
3 libsystem_pthread.dylib 0x00007fff549a8661 _pthread_body + 340
4 libsystem_pthread.dylib 0x00007fff549a850d _pthread_start + 377
5 libsystem_pthread.dylib 0x00007fff549a7bf9 thread_start + 13

Thread 7:
0 libsystem_pthread.dylib 0x00007fff549a7bdc start_wqthread + 0
1 ??? 0x8e933c8082c3009c 0 + 10273621697609531548

Thread 8:
0 libsystem_kernel.dylib 0x00007fff547e1292 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff549a820e _pthread_wqthread + 1552
2 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 9:
0 libsystem_kernel.dylib 0x00007fff547e1292 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff549a820e _pthread_wqthread + 1552
2 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 10:
0 libsystem_pthread.dylib 0x00007fff549a7bdc start_wqthread + 0
1 ??? 0x0000700001d1dbe0 0 + 123145332841440

Thread 11:
0 libsystem_pthread.dylib 0x00007fff549a7bdc start_wqthread + 0
1 ??? 0x4e46436b00000002 0 + 5640269710168686594

Thread 12:
0 libsystem_kernel.dylib 0x00007fff547e1292 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff549a820e _pthread_wqthread + 1552
2 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 13:
0 libsystem_kernel.dylib 0x00007fff547e1292 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff549a8009 _pthread_wqthread + 1035
2 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 14:: Dispatch queue: com.apple.root.default-qos
0 libsystem_kernel.dylib 0x00007fff547e0946 __posix_spawn + 10
1 libsystem_kernel.dylib 0x00007fff547d9e7e posix_spawn + 483
2 com.apple.Foundation 0x00007fff2e5d2230 -[NSConcreteTask launchWithDictionary:error:] + 3510
3 com.torusknot.SourceTreeNotMAS 0x000000010dc785b0 0x10dc2c000 + 312752
4 com.torusknot.SourceTreeNotMAS 0x000000010dc76a67 0x10dc2c000 + 305767
5 com.torusknot.SourceTreeNotMAS 0x000000010dd7437b 0x10dc2c000 + 1344379
6 com.torusknot.SourceTreeNotMAS 0x000000010dc9aaa3 0x10dc2c000 + 453283
7 com.torusknot.SourceTreeNotMAS 0x000000010dc9afaf 0x10dc2c000 + 454575
8 com.torusknot.SourceTreeNotMAS 0x000000010dc7b693 0x10dc2c000 + 325267
9 com.torusknot.SourceTreeNotMAS 0x000000010de971bf 0x10dc2c000 + 2535871
10 libdispatch.dylib 0x00007fff5465e64a _dispatch_call_block_and_release + 12
11 libdispatch.dylib 0x00007fff54656e08 _dispatch_client_callout + 8
12 libdispatch.dylib 0x00007fff54663d15 _dispatch_queue_override_invoke + 880
13 libdispatch.dylib 0x00007fff546589f9 _dispatch_root_queue_drain + 515
14 libdispatch.dylib 0x00007fff546587a5 _dispatch_worker_thread3 + 101
15 libsystem_pthread.dylib 0x00007fff549a8169 _pthread_wqthread + 1387
16 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 15:
0 libsystem_pthread.dylib 0x00007fff549a7bdc start_wqthread + 0
1 ??? 0x4e46436b00000002 0 + 5640269710168686594

Thread 16:: Dispatch queue: com.apple.root.default-qos
0 libsystem_kernel.dylib 0x00007fff547d720a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff547d6724 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff2c2de045 __CFRunLoopServiceMachPort + 341
3 com.apple.CoreFoundation 0x00007fff2c2dd397 __CFRunLoopRun + 1783
4 com.apple.CoreFoundation 0x00007fff2c2dca07 CFRunLoopRunSpecific + 487
5 com.apple.Foundation 0x00007fff2e481710 -[NSConcreteTask waitUntilExit] + 220
6 com.torusknot.SourceTreeNotMAS 0x000000010dc785eb 0x10dc2c000 + 312811
7 com.torusknot.SourceTreeNotMAS 0x000000010dc76a67 0x10dc2c000 + 305767
8 com.torusknot.SourceTreeNotMAS 0x000000010dd735f8 0x10dc2c000 + 1340920
9 com.torusknot.SourceTreeNotMAS 0x000000010dd746c0 0x10dc2c000 + 1345216
10 com.torusknot.SourceTreeNotMAS 0x000000010dc9aaa3 0x10dc2c000 + 453283
11 com.torusknot.SourceTreeNotMAS 0x000000010dc9afaf 0x10dc2c000 + 454575
12 com.torusknot.SourceTreeNotMAS 0x000000010dc7b693 0x10dc2c000 + 325267
13 com.torusknot.SourceTreeNotMAS 0x000000010de971bf 0x10dc2c000 + 2535871
14 libdispatch.dylib 0x00007fff5465e64a _dispatch_call_block_and_release + 12
15 libdispatch.dylib 0x00007fff54656e08 _dispatch_client_callout + 8
16 libdispatch.dylib 0x00007fff54663d15 _dispatch_queue_override_invoke + 880
17 libdispatch.dylib 0x00007fff546589f9 _dispatch_root_queue_drain + 515
18 libdispatch.dylib 0x00007fff546587a5 _dispatch_worker_thread3 + 101
19 libsystem_pthread.dylib 0x00007fff549a8169 _pthread_wqthread + 1387
20 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 17:: com.twitter.crashlytics.mac.MachExceptionServer
0 libsystem_kernel.dylib 0x00007fff547e2702 write + 10
1 com.torusknot.SourceTreeNotMAS 0x000000010df0bb7a 0x10dc2c000 + 3013498
2 com.torusknot.SourceTreeNotMAS 0x000000010df035b4 0x10dc2c000 + 2979252
3 libsystem_pthread.dylib 0x00007fff549a8661 _pthread_body + 340
4 libsystem_pthread.dylib 0x00007fff549a850d _pthread_start + 377
5 libsystem_pthread.dylib 0x00007fff549a7bf9 thread_start + 13

Thread 18:
0 libsystem_kernel.dylib 0x00007fff547e1292 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff549a820e _pthread_wqthread + 1552
2 libsystem_pthread.dylib 0x00007fff549a7be9 start_wqthread + 13

Thread 19:
0 libsystem_pthread.dylib 0x00007fff549a7bdc start_wqthread + 0

Thread 20:: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x00007fff547d720a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff547d6724 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff2c2de045 __CFRunLoopServiceMachPort + 341
3 com.apple.CoreFoundation 0x00007fff2c2dd397 __CFRunLoopRun + 1783
4 com.apple.CoreFoundation 0x00007fff2c2dca07 CFRunLoopRunSpecific + 487
5 com.apple.CFNetwork 0x00007fff2b41aca8 -[__CoreSchedulingSetRunnable runForever] + 722
6 com.apple.Foundation 0x00007fff2e3f51f8 __NSThread__start__ + 1197
7 libsystem_pthread.dylib 0x00007fff549a8661 _pthread_body + 340
8 libsystem_pthread.dylib 0x00007fff549a850d _pthread_start + 377
9 libsystem_pthread.dylib 0x00007fff549a7bf9 thread_start + 13

Thread 21:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff547d720a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff547d6724 mach_msg + 60
2 com.apple.SkyLight 0x00007fff4e45a429 CGSSnarfAndDispatchDatagrams + 168
3 com.apple.SkyLight 0x00007fff4e4ec371 SLSGetNextEventRecordInternal + 81
4 com.apple.SkyLight 0x00007fff4e564d68 SLEventCreateNextEvent + 44
5 com.apple.HIToolbox 0x00007fff2b5c4aae PullEventsFromWindowServerOnConnection(unsigned int, unsigned char, __CFMachPortBoost*) + 268
6 com.apple.HIToolbox 0x00007fff2b5c4970 MessageHandler(__CFMachPort*, void*, long, void*) + 51
7 com.apple.CoreFoundation 0x00007fff2c2e5c36 __CFMachPortPerform + 310
8 com.apple.CoreFoundation 0x00007fff2c2e5ae9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
9 com.apple.CoreFoundation 0x00007fff2c2e5a35 __CFRunLoopDoSource1 + 533
10 com.apple.CoreFoundation 0x00007fff2c2dd7c0 __CFRunLoopRun + 2848
11 com.apple.CoreFoundation 0x00007fff2c2dca07 CFRunLoopRunSpecific + 487
12 com.apple.AppKit 0x00007fff299aafc4 _NSEventThread + 184
13 libsystem_pthread.dylib 0x00007fff549a8661 _pthread_body + 340
14 libsystem_pthread.dylib 0x00007fff549a850d _pthread_start + 377
15 libsystem_pthread.dylib 0x00007fff549a7bf9 thread_start + 13

Thread 4 crashed with X86 Thread State (64-bit):
 rax: 0x00007fd694026400 rbx: 0x000060000005d370 rcx: 0x0000000000000000 rdx: 0x0000000000000498
 rdi: 0x0000000008000101 rsi: 0x00007fd69400a091 rbp: 0x0000700001a0bac0 rsp: 0x0000700001a0bab0
 r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000700001a0b5b8 r11: 0x000000000001c7ff
 r12: 0x0000700001a0bac0 r13: 0x0000608000111ca0 r14: 0x00007fff53a6be80 r15: 0x0000700001a0bad0
 rip: 0x00007fff29b98454 rfl: 0x0000000000010202 cr2: 0x00007fd69377f090
 
Logical CPU: 3
Error Code: 0x00000000
Trap Number: 6




```


Answers:
author: Manju
body: There seems to be an issue loading and reading repo avatars. We are investigating and will soon have an update on this. In the meanwhile, feel free to remove the ImageCache folder under \~/Library/Application Support/SourceTree/

Thanks for your patience!

Manjunath  
Sourcetree Mac Developer

comments: author: kcrob
body: Thanks for the fast reply.

I deleted all the files in the Application Support folder. But Sourcetree still crashed after I cloned a new repository to my local machine.


author: Manju
body: This was primarily due to a change deployed by Bitbucket cloud that was reverted in time. Also, we made a release of macOS client to ensure this type of a crash doesn't happen again. Thanks for the understanding and kind cooperation.

Cheers,  
Manjunath


author: kcrob
body: Many thanks! Updated Sourcetree and works like a charm.

Cheers,

Kevin


author: Daniel ddd
body: [@Manju](/t5/user/viewprofilepage/user-id/222564) I have Sourcetree v3.4.7 and still app crashes for cloning. I see in log file that there is an issue with avatar image, so this issue still exists.

I tried to remove c:\\Users\\ME\\AppData\\Local\\Atlassian\\SourceTree\\cache folder but it didn't help.

Any advices?


author: Arnav
body: Clone from bitbucket repo in sourcetree crashed.  

I have uninstalled and installed it. My problem is I can still only clone one folder. and other folders are crashing.

Please suggest


author: Jeppe Skovsgaard Christensen
body: For me Sourcetree keeps crashes a few seconds after I try to open the application.

comments: author: kcrob
body: For me as well. But only if I clone a new repository to my local machine.


Tags: crash

mac