Crash on deleting dive after undoing delete

Dirk Hohndel dirk at hohndel.org
Fri Oct 2 04:48:03 PDT 2015


On Fri, Oct 02, 2015 at 08:35:24PM +1000, Rick Walsh wrote:
> Hi,
> 
> Subsurface is crashing if I:
> - delete dive
> - undo (ctrl z) delete dive
> - delete a dive (same or other)

There must be a little more to it than that. The stack trace indicates
that a trip might have been deleted in the process as well? I just tried
with some random deletes and undos and redos and nothing happened.

But then when I deleted the last dive in a trip, things went KABOOM
indeed. I'm about to go on my last two dives for this trip and should have
plenty of time later today to look into that.

Thanks for the report!

/D


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

> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface



More information about the subsurface mailing list