<div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>Subsurface is crashing if I:<br></div>- delete dive<br></div>- undo (ctrl z) delete dive<br></div>- delete a dive (same or other)<br><br></div>If re-delete the same dive, I get this (running in gdb with -v -v):<br>subsurface: /home/rick/src/subsurface/divelist.c:577: delete_trip: Assertion `!trip->dives' failed.<br>[New Thread 0x7fff77872700 (LWP 7059)]<br>[New Thread 0x7fff78752700 (LWP 7058)]<br>[New Thread 0x7fff78f53700 (LWP 7057)]<br>[New Thread 0x7fff79754700 (LWP 7056)]<br>[New Thread 0x7fffc8871700 (LWP 7055)]<br>[New Thread 0x7fffc9072700 (LWP 7054)]<br>[New Thread 0x7fffc9ef9700 (LWP 7048)]<br>[New Thread 0x7fffd7a66700 (LWP 7047)]<br><br>Program received signal SIGABRT, Aborted.<br>0x00007fffefa279c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55<br>55        return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);<br>Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.6-14.fc22.x86_64 cyrus-sasl-lib-2.1.26-22.fc22.x86_64 cyrus-sasl-lib-2.1.26-23.fc22.x86_64 dbus-libs-<br></div>----snip----<br><div>5.2.0-2.fc22.x86_64 zlib-1.2.8-7.fc22.x86_64<br>(gdb) bt<br>#0  0x00007fffefa279c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55<br>#1  0x00007fffefa2965a in __GI_abort () at abort.c:89<br>#2  0x00007fffefa20187 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x7e1795 "!trip->dives", <br>    file=file@entry=0x7e1770 "/home/rick/src/subsurface/divelist.c", line=line@entry=577, <br>    function=function@entry=0x7e17b8 <__PRETTY_FUNCTION__.13154> "delete_trip") at assert.c:92<br>#3  0x00007fffefa20232 in __GI___assert_fail (assertion=0x7e1795 "!trip->dives", file=0x7e1770 "/home/rick/src/subsurface/divelist.c", line=577, <br>    function=0x7e17b8 <__PRETTY_FUNCTION__.13154> "delete_trip") at assert.c:101<br>#4  0x00000000006abb37 in delete_trip (trip=0x455f490) at /home/rick/src/subsurface/divelist.c:577<br>#5  0x00000000006abdf7 in remove_dive_from_trip (dive=0x45608b0, was_autogen=0) at /home/rick/src/subsurface/divelist.c:667<br>#6  0x00000000006ac0d0 in delete_single_dive (idx=216) at /home/rick/src/subsurface/divelist.c:754<br>#7  0x00000000005e1ed4 in DiveListView::deleteDive (this=0x1010500) at /home/rick/src/subsurface/qt-ui/divelistview.cpp:792<br>#8  0x00000000005df949 in DiveListView::eventFilter (this=0x1010500, event=0x7fffffffd990) at /home/rick/src/subsurface/qt-ui/divelistview.cpp:370<br>#9  0x00007ffff05cf40c in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /lib64/libQt5Core.so.5<br>#10 0x00007ffff178e48c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5<br>#11 0x00007ffff1795563 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5<br>#12 0x00007ffff05cf61b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib64/libQt5Core.so.5<br>#13 0x00007ffff17ee323 in QWidgetWindow::event(QEvent*) () from /lib64/libQt5Widgets.so.5<br>#14 0x00007ffff178e4ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5<br>#15 0x00007ffff1793976 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5<br>#16 0x00007ffff05cf61b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib64/libQt5Core.so.5<br>#17 0x00007ffff0fde757 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /lib64/libQt5Gui.so.5<br>#18 0x00007ffff0fe37a5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /lib64/libQt5Gui.so.5<br>#19 0x00007ffff0fc75d8 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Gui.so.5<br>#20 0x00007fffda663b10 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5XcbQpa.so.5<br>#21 0x00007fffea6b2a8a in g_main_context_dispatch () from /lib64/libglib-2.0.so.0<br>---Type <return> to continue, or q <return> to quit--- <br>#22 0x00007fffea6b2e20 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0<br>#23 0x00007fffea6b2ecc in g_main_context_iteration () from /lib64/libglib-2.0.so.0<br>#24 0x00007ffff0625d8f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5<br>#25 0x00007ffff05ccdaa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5<br>#26 0x00007ffff05d4e6c in QCoreApplication::exec() () from /lib64/libQt5Core.so.5<br>#27 0x00000000004ec5b0 in run_ui () at /home/rick/src/subsurface/qt-gui.cpp:72<br>#28 0x00000000004eb53a in main (argc=3, argv=0x7fffffffded8) at /home/rick/src/subsurface/main.cpp:78<br><br><br></div><div>If I delete the next dive in the same trip, I get:<br>[New Thread 0x7fffb6ffd700 (LWP 7187)]<br>subsurface: /home/rick/src/subsurface/divelist.c:665: remove_dive_from_trip: Assertion `trip->nrdives > 0' failed.<br>[New Thread 0x7fffb77fe700 (LWP 7186)]<br>[New Thread 0x7fffb7fff700 (LWP 7185)]<br>[New Thread 0x7fffc9072700 (LWP 7184)]<br>[New Thread 0x7fffc37fe700 (LWP 7183)]<br>[New Thread 0x7fffc3fff700 (LWP 7182)]<br>[New Thread 0x7fffc8871700 (LWP 7181)]<br>[New Thread 0x7fffc9ef9700 (LWP 7175)]<br>[New Thread 0x7fffd7a66700 (LWP 7174)]<br><br>Program received signal SIGABRT, Aborted.<br>0x00007fffefa279c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55<br>55        return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);<br>(gdb) bt<br>#0  0x00007fffefa279c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55<br>#1  0x00007fffefa2965a in __GI_abort () at abort.c:89<br>#2  0x00007fffefa20187 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x7e17a2 "trip->nrdives > 0", <br>    file=file@entry=0x7e1770 "/home/rick/src/subsurface/divelist.c", line=line@entry=665, <br>    function=function@entry=0x7e17d0 <__PRETTY_FUNCTION__.13193> "remove_dive_from_trip") at assert.c:92<br>#3  0x00007fffefa20232 in __GI___assert_fail (assertion=0x7e17a2 "trip->nrdives > 0", file=0x7e1770 "/home/rick/src/subsurface/divelist.c", line=665, <br>    function=0x7e17d0 <__PRETTY_FUNCTION__.13193> "remove_dive_from_trip") at assert.c:101<br>#4  0x00000000006abdcf in remove_dive_from_trip (dive=0x4560420, was_autogen=0) at /home/rick/src/subsurface/divelist.c:665<br>#5  0x00000000006ac0d0 in delete_single_dive (idx=215) at /home/rick/src/subsurface/divelist.c:754<br>#6  0x00000000005e1ed4 in DiveListView::deleteDive (this=0x1010ab0) at /home/rick/src/subsurface/qt-ui/divelistview.cpp:792<br>#7  0x00000000005df949 in DiveListView::eventFilter (this=0x1010ab0, event=0x7fffffffd990) at /home/rick/src/subsurface/qt-ui/divelistview.cpp:370<br>#8  0x00007ffff05cf40c in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /lib64/libQt5Core.so.5<br>#9  0x00007ffff178e48c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5<br>#10 0x00007ffff1795563 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5<br>#11 0x00007ffff05cf61b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib64/libQt5Core.so.5<br>#12 0x00007ffff17ee323 in QWidgetWindow::event(QEvent*) () from /lib64/libQt5Widgets.so.5<br>#13 0x00007ffff178e4ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5<br>#14 0x00007ffff1793976 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5<br>#15 0x00007ffff05cf61b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib64/libQt5Core.so.5<br>#16 0x00007ffff0fde757 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /lib64/libQt5Gui.so.5<br>#17 0x00007ffff0fe37a5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /lib64/libQt5Gui.so.5<br>#18 0x00007ffff0fc75d8 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Gui.so.5<br>#19 0x00007fffda663b10 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5XcbQpa.so.5<br>#20 0x00007fffea6b2a8a in g_main_context_dispatch () from /lib64/libglib-2.0.so.0<br>#21 0x00007fffea6b2e20 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0<br>---Type <return> to continue, or q <return> to quit---<br>#22 0x00007fffea6b2ecc in g_main_context_iteration () from /lib64/libglib-2.0.so.0<br>#23 0x00007ffff0625d8f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5<br>#24 0x00007ffff05ccdaa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5<br>#25 0x00007ffff05d4e6c in QCoreApplication::exec() () from /lib64/libQt5Core.so.5<br>#26 0x00000000004ec5b0 in run_ui () at /home/rick/src/subsurface/qt-gui.cpp:72<br>#27 0x00000000004eb53a in main (argc=3, argv=0x7fffffffded8) at /home/rick/src/subsurface/main.cpp:78<br><br><br></div><div>Cheers,<br><br></div><div>Rick<br></div></div>