Program Crash on dive delete
Lubomir I. Ivanov
neolit123 at gmail.com
Sat Oct 19 02:15:04 UTC 2013
On 19 October 2013 08:26, Willem Ferguson
<willemferguson at zoology.up.ac.za> wrote:
> My version of subsurface crashes when deleting dives in a particular way.
> Here is a dataset :
> https://www.dropbox.com/s/zi5l9ez0s9laf9y/test1.xml
>
> Delete the top 6 dives by deleting the dive at the top of the list each
> time.
> Then delete dive number 4 (dated Sat Jul 6th)
> Program crashes.
attached is a temporary patch that fixes this.
here is a BT:
#0 0x0041b5cf in DiveListView::selectDive (this=0x22fc92c8, dive=0x0,
scrollto=true, toggle=false) at qt-ui/divelistview.cpp:69
#1 0x0041bc9e in DiveListView::reload (this=0x22fc92c8,
layout=DiveTripModel::TREE, forceSort=true) at qt-ui/divelistview.cpp:168
#2 0x004387c3 in MainWindow::refreshDisplay (this=0x22a015b0)
at qt-ui/mainwindow.cpp:70
#3 0x0041d277 in DiveListView::deleteDive (this=0x22fc92c8)
at qt-ui/divelistview.cpp:371
#4 0x00469c0a in DiveListView::qt_static_metacall (_o=0x22fc92c8,
_c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x289d08)
at .moc/moc_divelistview.cpp:75
divelistview.cpp: 169
if (amount_selected && selected_dive >= 0) {
selectDive(current_dive, true);
what happens here after willem's sequence of commands is that
selected_dive is 8, amount_selected is 1
but current_dive is NULL. so i think there should be a better fix,
perhaps in DiveListView::deleteDive().
something else - after selecting and deleting the topmost dive info is
shown for the next dive in the list, but it remains un-selected.
lubomir
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_crash_after_dive_delete.patch
Type: application/octet-stream
Size: 537 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131019/1f708cc7/attachment.obj>
More information about the subsurface
mailing list