Skip to content

Crash when permanently deleting trashed entry inside search view #369

@weslly

Description

@weslly

Expected Behavior

The program should not crash when deleting an entry from the recycle bin inside the search view.

Current Behavior

When deleting an entry from the recycle bin, the program crashes immediately.

Process:               KeePassXC [5687]
Path:                  /Applications/KeePassXC.app/Contents/MacOS/KeePassXC
Identifier:            org.keepassx.keepassxc
Version:               2.1.3 (2.1.3)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           KeePassXC [5687]
User ID:               501

Date/Time:             2017-03-03 11:09:12.752 -0300
OS Version:            Mac OS X 10.12.3 (16D32)
Report Version:        12
Anonymous UUID:        3E5BCE5E-EB2C-D644-6D5F-9D2678AFA53A


Time Awake Since Boot: 16000 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   org.keepassx.keepassxc          0x000000010f734cef 0x10f726000 + 60655
1   org.keepassx.keepassxc          0x000000010f7303ec 0x10f726000 + 41964
2   org.keepassx.keepassxc          0x000000010f7a3de5 0x10f726000 + 515557
3   org.qt-project.QtCore           0x00000001107b1cf1 QSortFilterProxyModel::data(QModelIndex const&, int) const + 113
4   org.qt-project.QtWidgets        0x000000010fd11c15 QStyledItemDelegate::initStyleOption(QStyleOptionViewItem*, QModelIndex const&) const + 1781
5   org.qt-project.QtWidgets        0x000000010fd11de4 QStyledItemDelegate::paint(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const + 68
6   org.qt-project.QtWidgets        0x000000010fcc9c40 QTreeView::drawRow(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const + 3872
7   org.qt-project.QtWidgets        0x000000010fcc7a81 QTreeView::drawTree(QPainter*, QRegion const&) const + 1233
8   org.qt-project.QtWidgets        0x000000010fcc7585 QTreeView::paintEvent(QPaintEvent*) + 309
9   org.qt-project.QtWidgets        0x000000010fa55888 QWidget::event(QEvent*) + 1144
10  org.qt-project.QtWidgets        0x000000010fb4e47d QFrame::event(QEvent*) + 45
11  org.qt-project.QtWidgets        0x000000010fbdef07 QAbstractScrollArea::viewportEvent(QEvent*) + 135
12  org.qt-project.QtWidgets        0x000000010fc85199 QAbstractItemView::viewportEvent(QEvent*) + 1369
13  org.qt-project.QtWidgets        0x000000010fcc7325 QTreeView::viewportEvent(QEvent*) + 517
14  org.qt-project.QtWidgets        0x000000010fbdfaa4 0x10fa03000 + 1952420
15  org.qt-project.QtCore           0x00000001107dfccb QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 203
16  org.qt-project.QtWidgets        0x000000010fa14d28 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 280
17  org.qt-project.QtWidgets        0x000000010fa160e1 QApplication::notify(QObject*, QEvent*) + 369
18  org.qt-project.QtCore           0x00000001107dfa34 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 164
19  org.qt-project.QtWidgets        0x000000010fa4f5e3 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 3507
20  org.qt-project.QtWidgets        0x000000010fa22425 0x10fa03000 + 128037
21  org.qt-project.QtWidgets        0x000000010fa55ae7 QWidget::event(QEvent*) + 1751
22  org.qt-project.QtWidgets        0x000000010fb65de5 QMainWindow::event(QEvent*) + 1733
23  org.qt-project.QtWidgets        0x000000010fa14d3d QApplicationPrivate::notify_helper(QObject*, QEvent*) + 301
24  org.qt-project.QtWidgets        0x000000010fa160e1 QApplication::notify(QObject*, QEvent*) + 369
25  org.qt-project.QtCore           0x00000001107dfa34 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 164
26  org.qt-project.QtCore           0x00000001107e0aab QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 891
27  libqcocoa.dylib                 0x0000000112611b3e 0x1125ec000 + 154430
28  libqcocoa.dylib                 0x0000000112612401 0x1125ec000 + 156673
29  com.apple.CoreFoundation        0x00007fff7bb9d8d1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
30  com.apple.CoreFoundation        0x00007fff7bb7ec6c __CFRunLoopDoSources0 + 556
31  com.apple.CoreFoundation        0x00007fff7bb7e156 __CFRunLoopRun + 934
32  com.apple.CoreFoundation        0x00007fff7bb7db54 CFRunLoopRunSpecific + 420
33  com.apple.HIToolbox             0x00007fff7b108a5c RunCurrentEventLoopInMode + 240
34  com.apple.HIToolbox             0x00007fff7b108799 ReceiveNextEventCommon + 184
35  com.apple.HIToolbox             0x00007fff7b1086c6 _BlockUntilNextEventMatchingListInModeWithFilter + 71
36  com.apple.AppKit                0x00007fff796ae5b4 _DPSNextEvent + 1120
37  com.apple.AppKit                0x00007fff79e28d6b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2789
38  com.apple.AppKit                0x00007fff796a2f35 -[NSApplication run] + 926
39  libqcocoa.dylib                 0x0000000112611143 0x1125ec000 + 151875
40  org.qt-project.QtCore           0x00000001107db811 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 417
41  org.qt-project.QtCore           0x00000001107e00a7 QCoreApplication::exec() + 343
42  org.keepassx.keepassxc          0x000000010f72a915 0x10f726000 + 18709
43  org.keepassx.keepassxc          0x000000010f729af4 start + 52

Thread 1:
0   libsystem_kernel.dylib          0x00007fff912a94e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff91391791 _pthread_wqthread + 1426
2   libsystem_pthread.dylib         0x00007fff913911ed start_wqthread + 13

Thread 2:
0   libsystem_kernel.dylib          0x00007fff912a94e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff91391791 _pthread_wqthread + 1426
2   libsystem_pthread.dylib         0x00007fff913911ed start_wqthread + 13

Thread 3:
0   libsystem_kernel.dylib          0x00007fff912a94e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff913915fe _pthread_wqthread + 1023
2   libsystem_pthread.dylib         0x00007fff913911ed start_wqthread + 13

Thread 4:
0   libsystem_kernel.dylib          0x00007fff912a94e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff91391791 _pthread_wqthread + 1426
2   libsystem_pthread.dylib         0x00007fff913911ed start_wqthread + 13

Thread 5:: com.apple.CFSocket.private
0   libsystem_kernel.dylib          0x00007fff912a8f4a __select + 10
1   com.apple.CoreFoundation        0x00007fff7bbba239 __CFSocketManager + 729
2   libsystem_pthread.dylib         0x00007fff91391aab _pthread_body + 180
3   libsystem_pthread.dylib         0x00007fff913919f7 _pthread_start + 286
4   libsystem_pthread.dylib         0x00007fff913911fd thread_start + 13

Thread 6:: com.apple.NSEventThread
0   libsystem_kernel.dylib          0x00007fff912a138a mach_msg_trap + 10
1   libsystem_kernel.dylib          0x00007fff912a07d7 mach_msg + 55
2   com.apple.CoreFoundation        0x00007fff7bb7ee84 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation        0x00007fff7bb7e301 __CFRunLoopRun + 1361
4   com.apple.CoreFoundation        0x00007fff7bb7db54 CFRunLoopRunSpecific + 420
5   com.apple.AppKit                0x00007fff797fba62 _NSEventThread + 205
6   libsystem_pthread.dylib         0x00007fff91391aab _pthread_body + 180
7   libsystem_pthread.dylib         0x00007fff913919f7 _pthread_start + 286
8   libsystem_pthread.dylib         0x00007fff913911fd thread_start + 13

Thread 7:: Thread (pooled)
0   libsystem_kernel.dylib          0x00007fff912a8c86 __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff9139296a _pthread_cond_wait + 712
2   org.qt-project.QtCore           0x000000011061e1d0 0x1105f2000 + 180688
3   org.qt-project.QtCore           0x000000011061df1b 0x1105f2000 + 179995
4   org.qt-project.QtCore           0x000000011061ded2 QWaitCondition::wait(QMutex*, unsigned long) + 162
5   org.qt-project.QtCore           0x000000011061994a 0x1105f2000 + 162122
6   org.qt-project.QtCore           0x000000011061c9ba 0x1105f2000 + 174522
7   libsystem_pthread.dylib         0x00007fff91391aab _pthread_body + 180
8   libsystem_pthread.dylib         0x00007fff913919f7 _pthread_start + 286
9   libsystem_pthread.dylib         0x00007fff913911fd thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x000000010f7a3dd6  rbx: 0x00007fff504d6618  rcx: 0x000000010f7a3ef0  rdx: 0x000000010f9c9048
  rdi: 0x00007fff504d6618  rsi: 0x3ff0000000000000  rbp: 0x00007fff504d6570  rsp: 0x00007fff504d6540
   r8: 0x000060000064a7e0   r9: 0x0000000000000001  r10: 0x00007fb5092dd600  r11: 0x0000000000000010
  r12: 0x46d0d68b3a39001e  r13: 0x000000010f9c9048  r14: 0x00007fff504d6618  r15: 0x0000000110abed30
  rip: 0x000000010f734cef  rfl: 0x0000000000010203  cr2: 0x00006000003a9000
  
Logical CPU:     0
Error Code:      0x00000000
Trap Number:     13

Steps to Reproduce (for bugs)

  1. Delete any entry from the database (moving to the recycle bin)
  2. Find that entry using the search field
  3. Inside the search results, delete the entry again to remove it permanently from the recycle bin

Your Environment

  • KeePassXC version/commit used: 2.1.3
  • Qt version (e.g. Qt 5.3): 5.8.0
  • Compiler (e.g. Clang++3.6.0): -
  • Operating System and version: macOS Sierra 1.12.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions