Hi,
Le 20/10/2017 à 15:57, Stefan Fuchs a écrit :
Am 20.10.2017 um 15:03 schrieb Stefan Fuchs:
Am 20.10.2017 um 12:17 schrieb Willem Ferguson:
On 20/10/2017 11:19, Stefan Fuchs wrote:
That's ugly. I found s.th. similar this morning also when deleting a cylinder
but only in the merged dive I played with.
Could come from my changes. I found already one bug and fixed it (see PRs) but
that was not all - crash still there.
Start Subsurface
Select file -> New logbook
Select Log -> Plan dive
Mine starts with a single D12 AIR twinset being defined and a 20 min dive at
15m.
Add an AL80 cylinder with EAN50
In nth Dive points table change the dive to 60 minutes at 20m (results in awful
profile)
Delete EAN50 cylinder
Crash
Odd. Usually I'm the one seeing all the crashes with my MXE Windows build. But
not this one.
Any new findings?
Can you provide a screenshot of the full planner window with the setup?
Meanwhile I will try another build flavor and then also Linux.
Ok, I have it in front of me now:
Seems to be nothing were we or I did really change s.th. during the last days.
But for sure what I did is that I implemented a few more triggers for updates
between the cylinder table and everything else in the planner. That may have
revealed an issue.
BT attached below.
From my limited experience:
Is this s.th. coming from a race condition?
We do check in planner .c update_cylinder_pressure for "if (!cyl)", this doesn't "fail" and
then we crash a few lines later doing "cyl->gas_used.mliter += gas_used.mliter;"
(gdb) run
Starting program:
/home/stefan/Entwicklung/Subsurface/subsurface/build/subsurface
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe58a0700 (LWP 14117)]
[New Thread 0x7fffd9c4b700 (LWP 14118)]
[New Thread 0x7fffd944a700 (LWP 14119)]
[New Thread 0x7fffd895b700 (LWP 14120)]
[New Thread 0x7fffcb694700 (LWP 14121)]
[New Thread 0x7fffc8bc1700 (LWP 14122)]
[New Thread 0x7fffc10b8700 (LWP 14123)]
Thread 1 "subsurface" received signal SIGSEGV, Segmentation fault.
0x000000000077586b in update_cylinder_pressure (d=0xc94080 <displayed_dive>,
old_depth=0, new_depth=15000, duration=49,
sac=20000, cyl=0xbc0cd8, in_deco=false) at
/home/stefan/Entwicklung/Subsurface/subsurface/core/planner.c:243
243 cyl->gas_used.mliter += gas_used.mliter;
(gdb) bt
#0 0x000000000077586b in update_cylinder_pressure (d=0xc94080
<displayed_dive>, old_depth=0, new_depth=15000, duration=49,
sac=20000, cyl=0xbc0cd8, in_deco=false) at
/home/stefan/Entwicklung/Subsurface/subsurface/core/planner.c:243
#1 0x0000000000775d2d in create_dive_from_plan (diveplan=0xcd1580, dive=0xc94080
<displayed_dive>, track_gas=true)
at /home/stefan/Entwicklung/Subsurface/subsurface/core/planner.c:349
#2 0x0000000000776ae0 in plan (diveplan=0xcd1580, dive=0xc94080
<displayed_dive>, timestep=60,
decostoptable=0x7fffffffc440, cached_datap=0x7fffffffc400, is_planner=true,
show_disclaimer=false)
at /home/stefan/Entwicklung/Subsurface/subsurface/core/planner.c:693
#3 0x0000000000710038 in DivePlannerPointsModel::createTemporaryPlan
(this=0xcd1570)
at
/home/stefan/Entwicklung/Subsurface/subsurface/qt-models/diveplannermodel.cpp:922
#4 0x00000000006d5869 in ProfileWidget2::plotDive (this=0x1350db0, d=0x0,
force=true)
at
/home/stefan/Entwicklung/Subsurface/subsurface/profile-widget/profilewidget2.cpp:587
#5 0x00000000006d456b in ProfileWidget2::replot (this=0x1350db0, d=0x0)
at
/home/stefan/Entwicklung/Subsurface/subsurface/profile-widget/profilewidget2.cpp:397
#6 0x0000000000704cd0 in ProfileWidget2::qt_static_metacall (_o=0x1350db0,
_c=QMetaObject::InvokeMetaMethod, _id=17,
_a=0x7fffffffc970) at
/home/stefan/Entwicklung/Subsurface/subsurface/build/profile-widget/moc_profilewidget2.cpp:236
#7 0x00007ffff546dd2a in QMetaObject::activate(QObject*, int, int, void**) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007ffff54e9e2c in QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex
const&, QVector<int> const&) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9 0x000000000070e33b in DivePlannerPointsModel::emitDataChanged
(this=0xcd1570)
at
/home/stefan/Entwicklung/Subsurface/subsurface/qt-models/diveplannermodel.cpp:419
#10 0x000000000070dd39 in DivePlannerPointsModel::cylinderRenumber
(this=0xcd1570, mapping=0x7fffffffcb00)
at
/home/stefan/Entwicklung/Subsurface/subsurface/qt-models/diveplannermodel.cpp:363
#11 0x000000000070b20e in CylindersModel::remove (this=0x1485350, index=...)
at
/home/stefan/Entwicklung/Subsurface/subsurface/qt-models/cylindermodel.cpp:589
#12 0x000000000073b3bc in CylindersModel::qt_static_metacall (_o=0x1485350,
_c=QMetaObject::InvokeMetaMethod, _id=0,
_a=0x7fffffffccc0) at
/home/stefan/Entwicklung/Subsurface/subsurface/build/qt-models/moc_cylindermodel.cpp:74
#13 0x00007ffff546dd2a in QMetaObject::activate(QObject*, int, int, void**) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ffff68e07f5 in QAbstractItemView::clicked(QModelIndex const&) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff68e47d3 in QAbstractItemView::mouseReleaseEvent(QMouseEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff66cafc8 in QWidget::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff67c9b8e in QFrame::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff68ef6db in QAbstractItemView::viewportEvent(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff543f172 in
QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007ffff668803c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007ffff668dc19 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff543f38b in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007ffff668cb32 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*,
QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007ffff66e55bb in ?? () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007ffff66e7b7b in ?? () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007ffff668805c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007ffff668d516 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007ffff543f38b in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007ffff5d074e1 in
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)
()
from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#30 0x00007ffff5d091a5 in
QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#31 0x00007ffff5cecf08 in
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)
()
from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#32 0x00007fffe7e27200 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#33 0x00007ffff290c197 in g_main_context_dispatch () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007ffff290c3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007ffff290c49c in g_main_context_iteration () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007ffff54957cf in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#37 0x00007ffff543cb4a in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#38 0x00007ffff5444bec in QCoreApplication::exec() () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#39 0x000000000059825b in run_ui () at
/home/stefan/Entwicklung/Subsurface/subsurface/subsurface-desktop-helper.cpp:46
#40 0x0000000000596fe2 in main (argc=1, argv=0x7fffffffde58)
at
/home/stefan/Entwicklung/Subsurface/subsurface/subsurface-desktop-main.cpp:115
(gdb)
On my side the crash with the planner is :
Thread 1 (Thread 0x7effdfe91880 (LWP 22510)):
#0 0x0000000000699219 in copy_string (s=0x1e003c <error: Cannot access memory at
address 0x1e003c>) at /usr/src/debug/subsurfacedaily-4.6.4.1031/core/dive.h:42
#1 copy_dive (s=0xc3dda0 <displayed_dive>, d=0x32504f0) at
/usr/src/debug/subsurfacedaily-4.6.4.1031/core/dive.c:545
#2 0x000000000065747c in DivePlannerPointsModel::computeVariations
(this=this@entry=0x159e130) at
/usr/src/debug/subsurfacedaily-4.6.4.1031/qt-models/diveplannermodel.cpp:1007
#3 0x0000000000657c83 in DivePlannerPointsModel::createTemporaryPlan
(this=this@entry=0x159e130) at
/usr/src/debug/subsurfacedaily-4.6.4.1031/qt-models/diveplannermodel.cpp:923
#4 0x00000000006336d5 in ProfileWidget2::plotDive (this=0x2021770, d=0x0,
force=<optimized out>) at
/usr/src/debug/subsurfacedaily-4.6.4.1031/profile-widget/profilewidget2.cpp:587
#5 0x00007effd848d7d1 in QMetaObject::activate(QObject*, int, int, void**) ()
from /usr/lib64/libQt5Core.so.5
#6 0x00007effd850410c in QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex
const&, QVector<int> const&) () from /usr/lib64/libQt5Core.so.5
#7 0x0000000000657d2a in DivePlannerPointsModel::emitDataChanged
(this=this@entry=0x159e130) at
/usr/src/debug/subsurfacedaily-4.6.4.1031/qt-models/diveplannermodel.cpp:419
#8 0x0000000000659248 in DivePlannerPointsModel::cylinderRenumber
(this=0x159e130, mapping=mapping@entry=0x7fff71d02cc0) at
/usr/src/debug/subsurfacedaily-4.6.4.1031/qt-models/diveplannermodel.cpp:363
#9 0x00000000006529a8 in CylindersModel::remove (this=0x224b390, index=...) at
/usr/src/debug/subsurfacedaily-4.6.4.1031/qt-models/cylindermodel.cpp:580
#10 0x00007effd848d7d1 in QMetaObject::activate(QObject*, int, int, void**) ()
from /usr/lib64/libQt5Core.so.5
#11 0x00007effda5a9225 in QAbstractItemView::clicked(QModelIndex const&) ()
from /usr/lib64/libQt5Widgets.so.5
#12 0x00007effda5af793 in QAbstractItemView::mouseReleaseEvent(QMouseEvent*) ()
from /usr/lib64/libQt5Widgets.so.5
#13 0x00007effda3a146a in QWidget::event(QEvent*) () from
/usr/lib64/libQt5Widgets.so.5
#14 0x00007effda49beee in QFrame::event(QEvent*) () from
/usr/lib64/libQt5Widgets.so.5
#15 0x00007effda5b5e7b in QAbstractItemView::viewportEvent(QEvent*) () from
/usr/lib64/libQt5Widgets.so.5
#16 0x00007effd8463ab1 in
QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()
from /usr/lib64/libQt5Core.so.5
#17 0x00007effda35f265 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib64/libQt5Widgets.so.5
#18 0x00007effda364164 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib64/libQt5Widgets.so.5
#19 0x00007effd8463be5 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() from /usr/lib64/libQt5Core.so.5
#20 0x00007effda362e60 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*,
QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from
/usr/lib64/libQt5Widgets.so.5
#21 0x00007effda3ba601 in ?? () from /usr/lib64/libQt5Widgets.so.5
#22 0x00007effda3bcba3 in ?? () from /usr/lib64/libQt5Widgets.so.5
#23 0x00007effda35f28c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib64/libQt5Widgets.so.5
#24 0x00007effda3638ea in QApplication::notify(QObject*, QEvent*) () from
/usr/lib64/libQt5Widgets.so.5
#25 0x00007effd8463be5 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() from /usr/lib64/libQt5Core.so.5
#26 0x00007effd95b186b in
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)
() from /usr/lib64/libQt5Gui.so.5
#27 0x00007effd95b3005 in
QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)
() from /usr/lib64/libQt5Gui.so.5
#28 0x00007effd9594eab in
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() from /usr/lib64/libQt5Gui.so.5
#29 0x00007effcbe6f8a0 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#30 0x00007effd4b55134 in g_main_context_dispatch () from
/usr/lib64/libglib-2.0.so.0
#31 0x00007effd4b55388 in ?? () from /usr/lib64/libglib-2.0.so.0
#32 0x00007effd4b5542c in g_main_context_iteration () from
/usr/lib64/libglib-2.0.so.0
#33 0x00007effd84b418c in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib64/libQt5Core.so.5
#34 0x00007effd8461bfb in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib64/libQt5Core.so.5
#35 0x00007effd8469ae6 in QCoreApplication::exec() () from
/usr/lib64/libQt5Core.so.5
#36 0x000000000052c789 in main (argc=1, argv=<optimized out>) at
/usr/src/debug/subsurfacedaily-4.6.4.1031/subsurface-desktop-main.cpp:115
I just start dive planner, add a new cylinder and remove it directly > it
crashes.
Guillaume
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface