This issue/bug doesn't seem to have any actual negative effects (e.g. no database corruption that I found), but it is a bit unnerving to see an "quit unexpectedly" error.
KeePassXC should be able to quit without an error message.
After unlocking and locking a database, if user quits KeePassXC, a few seconds later user receives an error message saying KeePassXC quit unexpectedly.

Opening the database and following steps 5 through 7 with KeePassXC 2.2.0 does NOT result in this error message being displayed.
Also, when using 2.3.0, if I just launch KeePassXC, then quit it without unlocking a database, I do NOT get the error message after quitting.
As I stated above, I haven't created any database corruptions or even unsaved database changes with this bug. I just think it's something that, if reproducible, should be fixed before 2.3.0 leaves beta.
KeePassXC - Version 2.3.0
Revision: 4c0ed74
Libraries:
Operating system: macOS High Sierra (10.13)
CPU architecture: x86_64
Kernel: darwin 17.4.0
Enabled extensions:
Here is the first part of the text I got when I hit the "Report..." button on the error message.
Process: KeePassXC [1017]
Path: /Applications/KeePassXC.app/Contents/MacOS/KeePassXC
Identifier: org.keepassx.keepassxc
Version: 2.3.0 (???)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: KeePassXC [1017]
User ID: 501
Date/Time: 2018-02-27 20:27:05.318 -0500
OS Version: Mac OS X 10.13.3 (17D102)
Report Version: 12
Anonymous UUID: [Redacted in case sensitive]
Time Awake Since Boot: 3600 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
I originally observed this bug on the 2.3.0 beta download, but I was able to reproduce it with the non-beta release of 2.3.0.
I've also experienced this issue or something similar when using the 2.3.0 beta.
I did fix a crash in the beta, but it was not related to start-up
I've rechecked; it crashes after I close KeePassXC with the database unlocked.
Process: KeePassXC [13152]
Path: /Volumes/VOLUME/*/KeePassXC.app/Contents/MacOS/KeePassXC
Identifier: org.keepassx.keepassxc
Version: 2.3.0-beta1 (???)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: KeePassXC [13152]
User ID: 502
Date/Time: 2018-02-28 08:31:27.291 -0600
OS Version: Mac OS X 10.13.3 (17D102)
Report Version: 12
Bridge OS Version: 3.0 (14Y661)
Anonymous UUID: 4A3EBBBA-E16A-A9F4-B59D-AF3A6DEE0AB7
Sleep/Wake UUID: E3624628-F95B-414F-AA35-B5458F946E5E
Time Awake Since Boot: 57000 seconds
Time Since Wake: 1800 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libqcocoa.dylib 0x000000010eb8d446 0x10ea80000 + 1102918
1 libqcocoa.dylib 0x000000010ea89d1c 0x10ea80000 + 40220
2 libqcocoa.dylib 0x000000010ea8a09e 0x10ea80000 + 41118
3 org.qt-project.QtGui 0x000000010deed7e2 QGuiApplicationPrivate::~QGuiApplicationPrivate() + 418
4 org.qt-project.QtWidgets 0x000000010d7fd4ce QApplicationPrivate::~QApplicationPrivate() + 14
5 org.qt-project.QtCore 0x000000010e5ebfb8 QObject::~QObject() + 1864
6 org.qt-project.QtWidgets 0x000000010d7ff3e7 QApplication::~QApplication() + 999
7 org.keepassx.keepassxc 0x000000010d1ea589 main + 4521
8 libdyld.dylib 0x00007fff59b44115 start + 1
Thread 1:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff59c93fca __select + 10
1 com.apple.CoreFoundation 0x00007fff3226859b __CFSocketManager + 635
2 libsystem_pthread.dylib 0x00007fff59dcf6c1 _pthread_body + 340
3 libsystem_pthread.dylib 0x00007fff59dcf56d _pthread_start + 377
4 libsystem_pthread.dylib 0x00007fff59dcec5d thread_start + 13
Thread 2:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff59c8a7c2 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff59c89cdc mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff3222e575 __CFRunLoopServiceMachPort + 341
3 com.apple.CoreFoundation 0x00007fff3222d8c7 __CFRunLoopRun + 1783
4 com.apple.CoreFoundation 0x00007fff3222cf43 CFRunLoopRunSpecific + 483
5 com.apple.AppKit 0x00007fff2f94d3c8 _NSEventThread + 184
6 libsystem_pthread.dylib 0x00007fff59dcf6c1 _pthread_body + 340
7 libsystem_pthread.dylib 0x00007fff59dcf56d _pthread_start + 377
8 libsystem_pthread.dylib 0x00007fff59dcec5d thread_start + 13
Thread 3:
0 libsystem_kernel.dylib 0x00007fff59c94562 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff59dcf06a _pthread_wqthread + 1035
2 libsystem_pthread.dylib 0x00007fff59dcec4d start_wqthread + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff59c94562 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff59dcf26f _pthread_wqthread + 1552
2 libsystem_pthread.dylib 0x00007fff59dcec4d start_wqthread + 13
Thread 5:
0 libsystem_kernel.dylib 0x00007fff59c94562 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff59dcf26f _pthread_wqthread + 1552
2 libsystem_pthread.dylib 0x00007fff59dcec4d start_wqthread + 13
Thread 6:
0 libsystem_kernel.dylib 0x00007fff59c94562 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff59dcf06a _pthread_wqthread + 1035
2 libsystem_pthread.dylib 0x00007fff59dcec4d start_wqthread + 13
Thread 7:
0 libsystem_kernel.dylib 0x00007fff59c94562 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff59dcf26f _pthread_wqthread + 1552
2 libsystem_pthread.dylib 0x00007fff59dcec4d start_wqthread + 13
Thread 8:
0 libsystem_kernel.dylib 0x00007fff59c94562 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff59dcf26f _pthread_wqthread + 1552
2 libsystem_pthread.dylib 0x00007fff59dcec4d start_wqthread + 13
Thread 9:
0 libsystem_pthread.dylib 0x00007fff59dcec40 start_wqthread + 0
1 ??? 0x4058504320000000 0 + 4636544065607827456
Thread 10:
0 libsystem_kernel.dylib 0x00007fff59c94562 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff59dcf06a _pthread_wqthread + 1035
2 libsystem_pthread.dylib 0x00007fff59dcec4d start_wqthread + 13
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000600000208bb0 rbx: 0x000060c0000175d0 rcx: 0xbaddc1f0a494bead rdx: 0x000000000000000c
rdi: 0x0000600000208bb0 rsi: 0x000060c0000f9f20 rbp: 0x00007ffee2a1c7f0 rsp: 0x00007ffee2a1c7e0
r8: 0x0000000000000002 r9: 0x000000000000003f r10: 0x00006000000af660 r11: 0x000000010dee5150
r12: 0x00007ff363c00650 r13: 0x000000010e8cf228 r14: 0x00007ff363c00650 r15: 0x00006000000d7760
rip: 0x000000010eb8d446 rfl: 0x0000000000010202 cr2: 0x000000010eb8d430
Logical CPU: 6
Error Code: 0x00000000
Trap Number: 13
Can you test if it also happens if you compile 2.3 yourself? The program crashes somewhere in the Qt application / Cocoa drawing routines.
On MacOS High Sierra I had crashes when closing custom build KeePassXC from commit 698b44f71c628662b94d238159e408e9d2f15de0
There are two thinks I've done which somehow fix it:
brew cask install keepassxcI believe the 2nd point is the key as I'm unable to reproduce the crash even with the 698b44f71c628662b94d238159e408e9d2f15de0 build. Before the mention steps the crash was reproducible 100% of the time
Process: KeePassXC [11131]
Path: /Users/USER/*/KeePassXC.app/Contents/MacOS/./KeePassXC
Identifier: org.keepassx.keepassxc
Version: 2.3.0-snapshot (???)
Code Type: X86-64 (Native)
Parent Process: zsh [2740]
Responsible: KeePassXC [11131]
User ID: 354588406
Date/Time: 2018-02-28 17:25:45.460 +0200
OS Version: Mac OS X 10.13.3 (17D102)
Report Version: 12
Anonymous UUID: 60735A11-DAEE-91B5-8BC0-06FF7FD00951
Sleep/Wake UUID: 9717DA5D-F324-4BB4-9F86-C13139555D6C
Time Awake Since Boot: 290000 seconds
Time Since Wake: 28000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
abort() called
*** error for object 0x7fc2be050140: pointer being freed was not allocated
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff5b03ee3e __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff5b17d150 pthread_kill + 333
2 libsystem_c.dylib 0x00007fff5af9b312 abort + 127
3 libsystem_malloc.dylib 0x00007fff5b098866 free + 521
4 libqcocoa.dylib 0x000000011031fdc9 0x11020f000 + 1117641
5 libqcocoa.dylib 0x00000001102182dc 0x11020f000 + 37596
6 libqcocoa.dylib 0x00000001102186b5 0x11020f000 + 38581
7 org.qt-project.QtGui 0x000000010cc55a02 QGuiApplicationPrivate::~QGuiApplicationPrivate() + 418
8 org.qt-project.QtWidgets 0x000000010c5a6afe QApplicationPrivate::~QApplicationPrivate() + 14
9 org.qt-project.QtCore 0x000000010d368e68 QObject::~QObject() + 1864
10 org.qt-project.QtWidgets 0x000000010c5a8a17 QApplication::~QApplication() + 999
11 org.keepassx.keepassxc 0x000000010c033a29 main + 4921
12 libdyld.dylib 0x00007fff5aeef115 start + 1
Thread 1:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff5b03efca __select + 10
1 com.apple.CoreFoundation 0x00007fff3361759b __CFSocketManager + 635
2 libsystem_pthread.dylib 0x00007fff5b17a6c1 _pthread_body + 340
3 libsystem_pthread.dylib 0x00007fff5b17a56d _pthread_start + 377
4 libsystem_pthread.dylib 0x00007fff5b179c5d thread_start + 13
Thread 2:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff5b0357c2 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff5b034cdc mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff335dd575 __CFRunLoopServiceMachPort + 341
3 com.apple.CoreFoundation 0x00007fff335dc8c7 __CFRunLoopRun + 1783
4 com.apple.CoreFoundation 0x00007fff335dbf43 CFRunLoopRunSpecific + 483
5 com.apple.AppKit 0x00007fff30cfc3c8 _NSEventThread + 184
6 libsystem_pthread.dylib 0x00007fff5b17a6c1 _pthread_body + 340
7 libsystem_pthread.dylib 0x00007fff5b17a56d _pthread_start + 377
8 libsystem_pthread.dylib 0x00007fff5b179c5d thread_start + 13
Thread 3:
0 libsystem_kernel.dylib 0x00007fff5b03f562 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff5b17a06a _pthread_wqthread + 1035
2 libsystem_pthread.dylib 0x00007fff5b179c4d start_wqthread + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff5b03f562 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff5b17a06a _pthread_wqthread + 1035
2 libsystem_pthread.dylib 0x00007fff5b179c4d start_wqthread + 13
Thread 5:
0 libsystem_kernel.dylib 0x00007fff5b03f562 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff5b17a06a _pthread_wqthread + 1035
2 libsystem_pthread.dylib 0x00007fff5b179c4d start_wqthread + 13
Thread 6:
0 libsystem_kernel.dylib 0x00007fff5b03f562 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff5b17a26f _pthread_wqthread + 1552
2 libsystem_pthread.dylib 0x00007fff5b179c4d start_wqthread + 13
Thread 7:
0 libsystem_pthread.dylib 0x00007fff5b179c40 start_wqthread + 0
1 ??? 0x4058504320000000 0 + 4636544065607827456
Thread 8:
Thread 9:
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00007fff93f48340 rcx: 0x00007ffee3bd2428 rdx: 0x0000000000000000
rdi: 0x0000000000000307 rsi: 0x0000000000000006 rbp: 0x00007ffee3bd2460 rsp: 0x00007ffee3bd2428
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000206
r12: 0x0000000000000307 r13: 0x0000000000000004 r14: 0x0000000000000006 r15: 0x000000000000002d
rip: 0x00007fff5b03ee3e rfl: 0x0000000000000206 cr2: 0x00007fff93f26148
Logical CPU: 0
Error Code: 0x02000148
Trap Number: 133
We saw this crash sporadically when using the prebuilt binary of the release version (KeePassXC-2.3.0.dmg) on macOS 10.2.6.
It happened a couple of times, but I can't seem to reproduce it again.
I think the circumstances were:
1.Download KeePassXC 2.3.0
2.Verify DMG sig, install.
3.Open an existing database
4.Edit an entry
5.Save Daabase
6.Use macOS 'close' button on app window.
7.In a few seconds, we get the macOS "Quit unexpectedly" error window.
I was able to reproduce the issue using OP's workflow. Both with the newly created file and on subsequent attempts with the same file.
I got the same issue with MacPorts' Qt. I guess this is not a Homebrew- or MacPorts-specific issue but a Qt one.
I've rebuild Qt with MacPorts' debug option. Now I have QtFoo and QtFoo_debug libraries. However, keepassxc always links to the non-debug version QtFoo. Any idea how to link to the debug version QtFoo_debug?
You need to set -DCMAKE_LIBRARY_PATH=... and perhaps also the -L flag via -DCMAKE_EXE_LINKER_FLAGS=....
For me it is pretty consistent:
Result:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libqcocoa.dylib 0x0000000104ab3446 0x1049a6000 + 1102918
1 libqcocoa.dylib 0x00000001049afd1c 0x1049a6000 + 40220
2 libqcocoa.dylib 0x00000001049b009e 0x1049a6000 + 41118
3 org.qt-project.QtGui 0x00000001025717e2 QGuiApplicationPrivate::~QGuiApplicationPrivate() + 418
4 org.qt-project.QtWidgets 0x0000000101e864ce QApplicationPrivate::~QApplicationPrivate() + 14
5 org.qt-project.QtCore 0x0000000102c6ffb8 QObject::~QObject() + 1864
6 org.qt-project.QtWidgets 0x0000000101e883e7 QApplication::~QApplication() + 999
7 org.keepassx.keepassxc 0x0000000101872639 main + 4521
8 libdyld.dylib 0x00007fffc68be235 start + 1
I bisected, and it appears that commit 806248ebd4a2ab68c159029ea94597c731c72414 ("Review fixes") causes this. I searched a bit in the Qt bug database, and this looks slightly related, but I'm unsure: https://bugreports.qt.io/browse/QTBUG-54832
I submitted a fix for review.
@phoerious, works fine for me. Thanks.
Great.
I actually didn't realize that you bisected as well. At least we got the same result. :-D
Most helpful comment
@phoerious, works fine for me. Thanks.