<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Jan 10, 2015 at 1:22 AM, Dirk Hohndel <span dir="ltr"><<a href="mailto:dirk@hohndel.org" target="_blank">dirk@hohndel.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I redid the logic for downloading from the divecomputer.<br>
The cool "select which dives you want" UI had some major flaws (as poor<br>
Miika found out) which triggered me to actually read some of the ancient<br>
code around downloading from dive computers which almost made me puke.<br>
<br>
So instead of patching around this and make the new UI kinda work I<br>
decided to rip things out and redo them.<br></blockquote><div><br></div><div>A segmentation fault:<br>Program received signal SIGSEGV, Segmentation fault.<br>0x00000000004a9036 in MainTab::updateDiveInfo (this=0xb20940, clear=false)<br>    at ../qt-ui/maintab.cpp:517<br>517            ui.DiveType->setCurrentIndex(current_dc->divemode);<br>(gdb) bt<br>#0  0x00000000004a9036 in MainTab::updateDiveInfo (this=0xb20940, clear=false)<br>    at ../qt-ui/maintab.cpp:517<br>#1  0x00000000004b9cd1 in MainWindow::current_dive_changed (this=0xadeae0, <br>    divenr=-1) at ../qt-ui/mainwindow.cpp:236<br>#2  0x000000000058be6c in MainWindow::qt_static_metacall (_o=0xadeae0, <br>    _c=QMetaObject::InvokeMetaMethod, _id=31, _a=0x7fffffffbc90)<br>    at .moc/moc_mainwindow.cpp:347<br>#3  0x00007ffff52162a6 in QMetaObject::activate(QObject*, int, int, void**) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#4  0x00000000005885f6 in DiveListView::currentDiveChanged (this=0xf003c0, <br>    _t1=-1) at .moc/moc_divelistview.cpp:208<br>#5  0x0000000000479f98 in DiveListView::selectionChanged (this=0xf003c0, <br>    selected=..., deselected=...) at ../qt-ui/divelistview.cpp:561<br>#6  0x00007ffff652e6c9 in ?? ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#7  0x00007ffff52162a6 in QMetaObject::activate(QObject*, int, int, void**) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#8  0x00007ffff51b00a7 in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#9  0x00007ffff51b49dd in QItemSelectionModel::emitSelectionChanged(QItemSelection const&, QItemSelection const&) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#10 0x00007ffff51b7ef0 in QItemSelectionModel::select(QItemSelection const&, QFlags<QItemSelectionModel::SelectionFlag>) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#11 0x00007ffff51b1448 in QItemSelectionModel::clearSelection() ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#12 0x0000000000478318 in DiveListView::unselectDives (this=0xf003c0)<br>    at ../qt-ui/divelistview.cpp:269<br>#13 0x00000000004992cf in DownloadFromDCWidget::on_ok_clicked (<br>    this=0x7fffffffd0c0) at ../qt-ui/downloadfromdivecomputer.cpp:439<br>#14 0x000000000058a1bb in DownloadFromDCWidget::qt_static_metacall (<br>    _o=0x7fffffffd0c0, _c=QMetaObject::InvokeMetaMethod, _id=1, <br>    _a=0x7fffffffc3c0) at .moc/moc_downloadfromdivecomputer.cpp:275<br>#15 0x000000000058a384 in DownloadFromDCWidget::qt_metacall (<br>    this=0x7fffffffd0c0, _c=QMetaObject::InvokeMetaMethod, _id=1, <br>    _a=0x7fffffffc3c0) at .moc/moc_downloadfromdivecomputer.cpp:317<br>#16 0x00007ffff521636d in QMetaObject::activate(QObject*, int, int, void**) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#17 0x00007ffff666be42 in QAbstractButton::clicked(bool) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#18 0x00007ffff63f5096 in ?? ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#19 0x00007ffff63f5bae in ?? ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#20 0x00007ffff63f5d24 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#21 0x00007ffff6339ea5 in QWidget::event(QEvent*) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#22 0x00007ffff62fec8c in QApplicationPrivate::notify_helper(QObject*, QEvent*)<br>    () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#23 0x00007ffff6304b61 in QApplication::notify(QObject*, QEvent*) ()<br>---Type <return> to continue, or q <return> to quit---<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#24 0x00007ffff51eec2d in QCoreApplication::notifyInternal(QObject*, QEvent*)<br>    () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#25 0x00007ffff63029e1 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#26 0x00007ffff6356bbf in ?? ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#27 0x00007ffff63589bb in ?? ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#28 0x00007ffff62fec8c in QApplicationPrivate::notify_helper(QObject*, QEvent*)<br>    () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#29 0x00007ffff6303e56 in QApplication::notify(QObject*, QEvent*) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#30 0x00007ffff51eec2d in QCoreApplication::notifyInternal(QObject*, QEvent*)<br>    () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#31 0x00007ffff570e25c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5<br>#32 0x00007ffff570f925 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5<br>#33 0x00007ffff56f8858 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5<br>#34 0x00007fffe7ba25b0 in ?? ()<br>   from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so<br>#35 0x00007ffff0aa6e04 in g_main_context_dispatch ()<br>   from /lib/x86_64-linux-gnu/libglib-2.0.so.0<br>#36 0x00007ffff0aa7048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0<br>#37 0x00007ffff0aa70ec in g_main_context_iteration ()<br>   from /lib/x86_64-linux-gnu/libglib-2.0.so.0<br>#38 0x00007ffff523b98c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#39 0x00007ffff51ed96b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#40 0x00007ffff64e5e0d in QDialog::exec() ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#41 0x00000000004ba8f0 in MainWindow::on_actionDownloadDC_triggered (<br>    this=0xadeae0) at ../qt-ui/mainwindow.cpp:418<br>#42 0x000000000058bcd4 in MainWindow::qt_static_metacall (_o=0xadeae0, <br>    _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x7fffffffd4a0)<br>    at .moc/moc_mainwindow.cpp:325<br>#43 0x000000000058c2fe in MainWindow::qt_metacall (this=0xadeae0, <br>    _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x7fffffffd4a0)<br>    at .moc/moc_mainwindow.cpp:413<br>#44 0x00007ffff521636d in QMetaObject::activate(QObject*, int, int, void**) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#45 0x00007ffff62f7a52 in QAction::triggered(bool) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#46 0x00007ffff62f9f38 in QAction::activate(QAction::ActionEvent) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>---Type <return> to continue, or q <return> to quit---<br>#47 0x00007ffff62fa054 in QAction::event(QEvent*) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#48 0x00007ffff62fec8c in QApplicationPrivate::notify_helper(QObject*, QEvent*)<br>    () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#49 0x00007ffff6303e56 in QApplication::notify(QObject*, QEvent*) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#50 0x00007ffff51eec2d in QCoreApplication::notifyInternal(QObject*, QEvent*)<br>    () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#51 0x00007ffff5733921 in QShortcutMap::dispatchEvent(QKeyEvent*) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5<br>#52 0x00007ffff5733a3c in QShortcutMap::tryShortcutEvent(QObject*, QKeyEvent*)<br>    () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5<br>#53 0x00007ffff6303d48 in QApplication::notify(QObject*, QEvent*) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5<br>#54 0x00007ffff51eec2d in QCoreApplication::notifyInternal(QObject*, QEvent*)<br>    () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#55 0x00007ffff570b33b in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5<br>#56 0x00007ffff570f905 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5<br>#57 0x00007ffff56f8858 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5<br>#58 0x00007fffe7ba25b0 in ?? ()<br>   from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so<br>#59 0x00007ffff0aa6e04 in g_main_context_dispatch ()<br>   from /lib/x86_64-linux-gnu/libglib-2.0.so.0<br>#60 0x00007ffff0aa7048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0<br>#61 0x00007ffff0aa70ec in g_main_context_iteration ()<br>   from /lib/x86_64-linux-gnu/libglib-2.0.so.0<br>#62 0x00007ffff523b98c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#63 0x00007ffff51ed96b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#64 0x00007ffff51f40e1 in QCoreApplication::exec() ()<br>   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5<br>#65 0x000000000046aad9 in run_ui () at ../qt-gui.cpp:184<br>#66 0x000000000045031f in main (argc=1, argv=0x7fffffffdea8) at ../main.cpp:68<br><br></div><div>This occurred after the download when clicking OK for the new dives to be processed.<br>e219bc70f863eaaa9b81ba5abc240975a128c904<br><br></div><div>First I tried to DL Vyper a couple of times with no success, then Stinger succeeded on first go but got me this crash.<br><br><br></div><div>When I get a DL error at the last of the new dives, I think discarding the current DL when I hit retry would be appropriate. (I have the first run and the retry on the DL list. Otherwise, highlight the newly downloaded dives.)<br><br></div><div>Deselecting some of the downloaded dives enable a tick mark on one of the already de-selected ones. But this turns out to be that the list is not properly refreshed.. If I go to different desktop and back, the selection is done properly. (Initially I thought the first un-tick was not accepted and redid it due to display not being updated properly.) Anyway, I cannot really be sure of what would be imported due to the crashing after OK button.<br></div><div><br></div><div>miika<br></div></div></div></div>