Normally I would trace down a problem like this using 'strace on Linux, and I found that macOS has 'dtruss' which gives the following information:
Ringmap2:Personal Text Encryptor burton$ sudo dtruss "./Personal\ Text\ Encryptor.app/Contents/MacOS/Personal\ Text\ Encryptor"
dtrace: system integrity protection is on, some features will not be available
SYSCALL(args) = return
open("/dev/dtracehelper\0", 0x2, 0x7FFF5FBFE860) = 3 0
ioctl(0x3, 0x80086804, 0x7FFF5FBFE7E8) = 0 0
close(0x3) = 0 0
thread_selfid(0x3, 0x80086804, 0x7FFF5FBFE7E8) = 487681 0
bsdthread_register(0x7FFFE6E1A1F0, 0x7FFFE6E1A1E0, 0x2000) = 1073741919 0
ulock_wake(0x1, 0x7FFF5FBFCFEC, 0x0) = -1 Err#2
issetugid(0x1, 0x7FFF5FBFCFEC, 0x0) = 0 0
mprotect(0x10003F000, 0x88, 0x1) = 0 0
mprotect(0x100041000, 0x1000, 0x0) = 0 0
mprotect(0x100057000, 0x1000, 0x0) = 0 0
mprotect(0x100058000, 0x1000, 0x0) = 0 0
mprotect(0x10006E000, 0x1000, 0x0) = 0 0
mprotect(0x10006F000, 0x1000, 0x1) = 0 0
mprotect(0x10003F000, 0x88, 0x3) = 0 0
mprotect(0x10003F000, 0x88, 0x1) = 0 0
getpid(0x10003F000, 0x88, 0x1) = 4935 0
stat64("/AppleInternal/XBS/.isChrooted\0", 0x7FFF5FBFCEA8, 0x1) = -1 Err#2
stat64("/AppleInternal\0", 0x7FFF5FBFCF40, 0x1) = -1 Err#2
csops(0x1347, 0x7, 0x7FFF5FBFC9D0) = 0 0
csops(0x1347, 0x7, 0x7FFF5FBFC2B0) = 0 0
geteuid(0x1347, 0x7, 0x7FFF5FBFC2B0) = 0 0
--
Burton Samograd