This issue still occurs in the latest Sourcetree for Mac build, 4.1.2, and has been driving me bonkers for more than a year now:
Steps to reproduce in macOS Catalina 10.15.7:
- Open a local repo in Sourcetree
- Go to any program and copy a text string to the clipboard.
- You can also copy a text string from any area allowed by Sourcetree (e.g. commit info in History View)
- Select any local branch in Sourcetree.
- From the main menu, go to Actions → Apply Patch...
- Select the Patch Text tab.
- Paste your clipboard text in the text field, either using Cmd-V or Right-Click → Paste
- App crashes
Full macOS Problem Report: https://pastebin.com/QdfVqBpn
Process: Sourcetree [85079]
Path: /Applications/Sourcetree.app/Contents/MacOS/Sourcetree
Identifier: com.torusknot.SourceTreeNotMAS
Version: 4.1.2 (238)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Sourcetree [85079]
User ID: 175241506
Date/Time: 2021-06-17 10:39:58.395 -0700
OS Version: Mac OS X 10.15.7 (19H1217)
Report Version: 12
Bridge OS Version: 5.4 (18P4663)
Anonymous UUID: 7B746A08-122E-A6F8-3F57-96E810E64943
Time Awake Since Boot: 1900000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007ffee3b2ed48
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [85079]
VM Regions Near 0x7ffee3b2ed48:
MALLOC_SMALL 00007f9912800000-00007f9913000000 [ 8192K] rw-/rwx SM=PRV
--> STACK GUARD 00007ffee032f000-00007ffee3b2f000 [ 56.0M] ---/rwx SM=NUL stack guard for thread 0
Stack 00007ffee3b2f000-00007ffee432f000 [ 8192K] rw-/rwx SM=SHM thread 0
Fixed in Sourcetree 4.2.1