I opened a big database, scrolled a table with more than one million records. Loading appeared in cells. I opened a second database. Dialog asking to stop the loading from the current database. I clicked yes. Then it crashed.
No crash. New DB opened.
I was running it under the debugger, because it wasn't the first time.
Program received signal SIGSEGV, Segmentation fault.
0x000000000075b284 in SqliteTableModel::isEditable (this=0x10d7180)
at /home/mgr/src/sqlitebrowser/src/sqlitetablemodel.cpp:916
916 return !m_sTable.isEmpty() && (m_db.getObjectByName(m_sTable)->type() == sqlb::Object::Types::Table || !m_pseudoPk.isEmpty());
(gdb) set pagination off
(gdb) thread apply all bt
Thread 27 (Thread 0x7fffdc835700 (LWP 5317)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007ffff64f891c in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2 0x0000000000765d22 in std::condition_variable::wait<RowLoader::run()::<lambda()> >(std::unique_lock<std::mutex> &, RowLoader::<lambda()>) (this=0x18c2660, __lock=..., __p=...) at /usr/include/c++/5/condition_variable:98
#3 0x00000000007652ae in RowLoader::run (this=0x18c25d0) at /home/mgr/src/sqlitebrowser/src/RowLoader.cpp:190
#4 0x00007ffff686c7be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007ffff7bc16ba in start_thread (arg=0x7fffdc835700) at pthread_create.c:333
#6 0x00007ffff5c6341d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 8 (Thread 0x7fffcede2700 (LWP 5296)):
#0 0x00007ffff5c5774d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007ffff500338c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007ffff500349c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007ffff6aa37eb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4 0x00007ffff6a4ab4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007ffff6867834 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007ffff686c7be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7 0x00007ffff7bc16ba in start_thread (arg=0x7fffcede2700) at pthread_create.c:333
#8 0x00007ffff5c6341d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 7 (Thread 0x7fffcf5e3700 (LWP 5295)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007ffff64f891c in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2 0x0000000000765d22 in std::condition_variable::wait<RowLoader::run()::<lambda()> >(std::unique_lock<std::mutex> &, RowLoader::<lambda()>) (this=0x10dda50, __lock=..., __p=...) at /usr/include/c++/5/condition_variable:98
#3 0x00000000007652ae in RowLoader::run (this=0x10dd9c0) at /home/mgr/src/sqlitebrowser/src/RowLoader.cpp:190
#4 0x00007ffff686c7be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007ffff7bc16ba in start_thread (arg=0x7fffcf5e3700) at pthread_create.c:333
#6 0x00007ffff5c6341d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 4 (Thread 0x7fffdd036700 (LWP 5292)):
#0 0x00007ffff5c5774d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007ffff500338c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007ffff5003712 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fffe92b59d6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4 0x00007ffff5029bb5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff7bc16ba in start_thread (arg=0x7fffdd036700) at pthread_create.c:333
#6 0x00007ffff5c6341d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 3 (Thread 0x7fffdd837700 (LWP 5291)):
#0 0x00007ffff5c5774d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007ffff500338c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007ffff500349c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007ffff50034d9 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007ffff5029bb5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff7bc16ba in start_thread (arg=0x7fffdd837700) at pthread_create.c:333
#6 0x00007ffff5c6341d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 2 (Thread 0x7fffeba62700 (LWP 5289)):
#0 0x00007ffff5c5774d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007ffff3293c62 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2 0x00007ffff32958d7 in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3 0x00007fffeec3f889 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4 0x00007ffff686c7be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007ffff7bc16ba in start_thread (arg=0x7fffeba62700) at pthread_create.c:333
#6 0x00007ffff5c6341d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 1 (Thread 0x7ffff7e25740 (LWP 5285)):
#0 0x000000000075b284 in SqliteTableModel::isEditable (this=0x10d7180) at /home/mgr/src/sqlitebrowser/src/sqlitetablemodel.cpp:916
#1 0x00000000006f25ed in MainWindow::updateInsertDeleteRecordButton (this=0x10d93c0) at /home/mgr/src/sqlitebrowser/src/MainWindow.cpp:3138
#2 0x00000000006e2a2c in MainWindow::enableEditing (this=0x10d93c0, enable_edit=true) at /home/mgr/src/sqlitebrowser/src/MainWindow.cpp:1740
#3 0x00000000006dad95 in MainWindow::setRecordsetLabel (this=0x10d93c0) at /home/mgr/src/sqlitebrowser/src/MainWindow.cpp:821
#4 0x0000000000804ac0 in MainWindow::qt_static_metacall (_o=0x10d93c0, _c=QMetaObject::InvokeMetaMethod, _id=25, _a=0x7fffffffc2d0) at /home/mgr/src/sqlitebrowser/moc_MainWindow.cpp:467
#5 0x00007ffff6a7bd2a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007ffff76da85e in QAbstractSlider::valueChanged(int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7 0x00007ffff74406ed in QAbstractSlider::setValue(int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8 0x00000000006bcf5e in ExtendedTableWidget::updateGeometries (this=0x1249710) at /home/mgr/src/sqlitebrowser/src/ExtendedTableWidget.cpp:694
#9 0x00007ffff75c94a6 in QTableView::columnCountChanged(int, int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff6a7bd2a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007ffff75aa30f in QHeaderView::sectionCountChanged(int, int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff75b4549 in QHeaderView::doItemsLayout() () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff75aac4c in QHeaderView::count() const () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff75aaddc in QHeaderView::sizeHint() const () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00000000006c3b36 in FilterTableHeader::sizeHint (this=0x1253750) at /home/mgr/src/sqlitebrowser/src/FilterTableHeader.cpp:49
#16 0x00007ffff75d4bc6 in QTableView::updateGeometries() () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00000000006bcea8 in ExtendedTableWidget::updateGeometries (this=0x1249710) at /home/mgr/src/sqlitebrowser/src/ExtendedTableWidget.cpp:686
#18 0x00007ffff75c94a6 in QTableView::columnCountChanged(int, int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff6a7bd2a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007ffff75aa30f in QHeaderView::sectionCountChanged(int, int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007ffff7598361 in QAbstractItemView::setModel(QAbstractItemModel*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff75b43f4 in QHeaderView::setModel(QAbstractItemModel*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff75d4419 in QTableView::setModel(QAbstractItemModel*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00000000006d88ae in MainWindow::clearTableBrowser (this=0x10d93c0) at /home/mgr/src/sqlitebrowser/src/MainWindow.cpp:493
#25 0x00000000006d83ef in MainWindow::populateStructure (this=0x10d93c0, old_table=...) at /home/mgr/src/sqlitebrowser/src/MainWindow.cpp:450
#26 0x00000000006d4270 in MainWindow::<lambda()>::operator()(void) const (__closure=0x7fffffffca60) at /home/mgr/src/sqlitebrowser/src/MainWindow.cpp:119
#27 0x00000000006f3c38 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, MainWindow::init()::<lambda()> >::call(MainWindow::<lambda()>, void **) (f=..., arg=0x7fffffffcbc0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:495
#28 0x00000000006f3ab3 in QtPrivate::Functor<MainWindow::init()::<lambda()>, 0>::call<QtPrivate::List<>, void>(MainWindow::<lambda()> &, void *, void **) (f=..., arg=0x7fffffffcbc0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:552
#29 0x00000000006f35d8 in QtPrivate::QFunctorSlotObject<MainWindow::init()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0x1346b10, r=0x10d9448, a=0x7fffffffcbc0, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:192
#30 0x00007ffff6a7bbaf in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x0000000000807b69 in DBBrowserDB::structureUpdated (this=0x10d9448) at /home/mgr/src/sqlitebrowser/moc_sqlitedb.cpp:174
#32 0x0000000000743ab7 in DBBrowserDB::close (this=0x10d9448) at /home/mgr/src/sqlitebrowser/src/sqlitedb.cpp:555
#33 0x00000000006d97c6 in MainWindow::fileClose (this=0x10d93c0) at /home/mgr/src/sqlitebrowser/src/MainWindow.cpp:646
#34 0x00000000006d7964 in MainWindow::fileOpen (this=0x10d93c0, fileName=..., dontAddToRecentFiles=false, readOnly=false) at /home/mgr/src/sqlitebrowser/src/MainWindow.cpp:373
#35 0x00000000006e1801 in MainWindow::openRecentFile (this=0x10d93c0) at /home/mgr/src/sqlitebrowser/src/MainWindow.cpp:1607
#36 0x0000000000804c7b in MainWindow::qt_static_metacall (_o=0x10d93c0, _c=QMetaObject::InvokeMetaMethod, _id=46, _a=0x7fffffffcff0) at /home/mgr/src/sqlitebrowser/moc_MainWindow.cpp:488
#37 0x00007ffff6a7bd2a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#38 0x00007ffff7336412 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007ffff7338898 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#40 0x00007ffff74bae52 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#41 0x00007ffff74c10ec in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#42 0x00007ffff74c5060 in QMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#43 0x00007ffff7382fc8 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#44 0x00007ffff74c5ab3 in QMenu::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#45 0x00007ffff734005c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#46 0x00007ffff7345c19 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#47 0x00007ffff6a4d38b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#48 0x00007ffff7344b32 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#49 0x00007ffff739d91d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#50 0x00007ffff739fb7b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#51 0x00007ffff734005c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#52 0x00007ffff7345516 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#53 0x00007ffff6a4d38b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#54 0x00007ffff6d8f4e1 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#55 0x00007ffff6d911a5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#56 0x00007ffff6d74f08 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#57 0x00007fffeec71200 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#58 0x00007ffff5003197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#59 0x00007ffff50033f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#60 0x00007ffff500349c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#61 0x00007ffff6aa37cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#62 0x00007ffff6a4ab4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#63 0x00007ffff6a52bec in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#64 0x00000000007bd3d2 in main (argc=1, argv=0x7fffffffdf68) at /home/mgr/src/sqlitebrowser/src/main.cpp:13
(gdb) info args
this = 0x10d7180
(gdb) p *this
$1 = {<QAbstractTableModel> = {<No data fields>}, static staticMetaObject = {d = {superdata = 0x7ffff6c95e80 <QAbstractTableModel::staticMetaObject>, stringdata = 0xb0dce0 <qt_meta_stringdata_SqliteTableModel>, data = 0xb0de00 <qt_meta_data_SqliteTableModel>, static_metacall = 0x807bec <SqliteTableModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, worker = 0x10dd9c0, m_db = @0x10d9448, m_lifeCounter = 22, m_rowCountAvailable = SqliteTableModel::RowCount::Complete, m_currentRowCount = 1758312, m_headers = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = -1}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x1675880}, d = 0x1675880}}, <No data fields>}, m_cache = {segments = {<std::_Vector_base<RowCache<QVector<QByteArray> >::Segment, std::allocator<RowCache<QVector<QByteArray> >::Segment> >> = {_M_impl = {<std::allocator<RowCache<QVector<QByteArray> >::Segment>> = {<__gnu_cxx::new_allocator<RowCache<QVector<QByteArray> >::Segment>> = {<No data fields>}, <No data fields>}, _M_start = 0x7fffc0007290, _M_finish = 0x7fffc00072d0, _M_end_of_storage = 0x7fffc00072d0}}, <No data fields>}}, m_sQuery = {static null = {<No data fields>}, d = 0x18f0200}, m_sTable = {m_schema = {static null = {<No data fields>}, d = 0x167a5b0}, m_name = {static null = {<No data fields>}, d = 0x1721a60}}, m_sRowidColumn = {static null = {<No data fields>}, d = 0x1ac3810}, m_pseudoPk = {static null = {<No data fields>}, d = 0x7ffff6b203e0 <QArrayData::shared_null>}, m_iSortColumn = 0, m_sSortOrder = {static null = {<No data fields>}, d = 0x16b76a0}, m_mWhere = {d = 0x7ffff6b61400 <QMapDataBase::shared_null>}, m_vDisplayFormat = {d = 0x7ffff6b203e0 <QArrayData::shared_null>}, m_vDataTypes = {d = 0x18d6200}, m_chunkSize = 50000, m_encoding = {static null = {<No data fields>}, d = 0x7ffff6b203e0 <QArrayData::shared_null>}, m_mutexDataCache = {<QBasicMutex> = {d_ptr = {_q_value = 0x0}}, <No data fields>}}
(gdb) info locals
No locals.
(gdb) gcore
Saved corefile core.5285
I have a core, just in case more information is needed.
Last state of the application:

The info below often helps, please fill it out if you're able to. :)
Heh Heh Heh
That postcode lookup database is turning out to be useful in lots of ways. :smile:
Also interesting the 'Delete record' button isn't translated... ?
Also interesting the 'Delete record' button isn't translated... ?
Well, there are a lot of new strings that are still untranslated, but this is old enough to not be one of them.
The reason is that this commit changed it from "Delete Record" to "Delete record":
5fbf5ca1b28373323591f05a339f18b58e9c283c
I never know where to use title-case style, but given that the button at its left is "New Record" and that we have lost a lot of translations, I think I'm going to revert the button label to "Delete Record".
In the Spanish translation I changed all the button labels to normal casing style, since in Spanish that style is less usual and often regarded as a bad influence from English :stuck_out_tongue_winking_eye:. And in this way, we don't have to worry for these discrepancies in the translation.
Is there some GUI style guide for this matter in English? Is a case like this ("Delete records") considered bad style?
I never know where to use title-case style
In my programming, I tend to follow Microsoft - they've spent millions on R&D! ;) However, even they are inconsistent between teams and applications. I would argue buttons follow the style of menus, which are Title Case ('Save As', etc). Maybe I'll create a PR which gives a consistent case across the application (and change the translation files) so we can see what it looks like......