Bug report #14253

Crash on layer saveas Debian Stretch/Testing

Added by Richard Duivenvoorde over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Vectors
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:22249

Description

QGIS crashes upon trying to use 'saveAs' from layer context dialog, immidiatly after activating the menu.

If I run QGIS from withing gdb, I get the following backtrace after installing debug symbols of sqlite3 and spatialite:

src/core/qgscoordinatereferencesystem.cpp: 984: (setMapUnits) [1ms] Projection has linear units of metre

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007fffef3a5621 in sqlite3OsCurrentTimeInt64 (pVfs=<optimized out>, pTimeOut=0xb0490e8) at sqlite3.c:17851
#2  0x00007fffef3ab93b in sqlite3StmtCurrentTime (p=0xb049208, p=0xb049208) at sqlite3.c:72494
#3  setDateTimeToCurrent (context=context@entry=0xb049208, p=0x7fffffff7210, p=0x7fffffff7210) at sqlite3.c:16746
#4  0x00007fffef3c3b09 in parseDateOrTime (p=0x7fffffff7210, zDate=0xb048c58 "now", context=0xb049208) at sqlite3.c:16782
#5  isDate (context=0xb049208, argc=1, argv=0xb049240, p=0x7fffffff7210) at sqlite3.c:17231
#6  0x00007fffef3c5394 in strftimeFunc (context=0xb049208, argc=2, argv=0xb049238) at sqlite3.c:17356
#7  0x00007fffef4017d8 in sqlite3VdbeExec (p=p@entry=0xb049028) at sqlite3.c:75383
#8  0x00007fffef40b027 in sqlite3Step (p=0xb049028) at sqlite3.c:72358
#9  sqlite3_step (pStmt=<optimized out>) at sqlite3.c:6883
#10 0x00007fffeece1e49 in updateSpatiaLiteHistory (p_sqlite=p_sqlite@entry=0xb1c6a58, table=table@entry=0x7fffeef62394 "spatial_ref_sys", 
    geom=geom@entry=0x0, operation=operation@entry=0x7fffeef62379 "table successfully created") at metatables.c:207
#11 0x00007fffeecba092 in fnct_InitSpatialMetaData (context=0xb0486b8, argc=<optimized out>, argv=<optimized out>) at spatialite.c:1997
#12 0x00007fffef4017d8 in sqlite3VdbeExec (p=p@entry=0xb047dc8) at sqlite3.c:75383
#13 0x00007fffef40b027 in sqlite3Step (p=0xb047dc8) at sqlite3.c:72358
#14 sqlite3_step (pStmt=<optimized out>) at sqlite3.c:6883
#15 0x00007fffef40c07a in sqlite3_exec (db=0xb1c6a58, zSql=<optimized out>, xCallback=0x0, pArg=0x0, pzErrMsg=0x7fffffffa448) at sqlite3.c:104925
#16 0x00007ffff0308f66 in ?? () from /usr/lib/libgdal.so.1
#17 0x00007ffff030c466 in ?? () from /usr/lib/libgdal.so.1
#18 0x00007ffff02fa382 in OGR_Dr_CreateDataSource () from /usr/lib/libgdal.so.1
#19 0x00007ffff57563c3 in QgsVectorFileWriter::ogrDriverList () at /home/richard/dev/qgis/git/qgis/src/core/qgsvectorfilewriter.cpp:2348
#20 0x00007ffff79299a0 in QgsVectorLayerSaveAsDialog::setup (this=0xa5ffd30)
    at /home/richard/dev/qgis/git/qgis/src/app/ogr/qgsvectorlayersaveasdialog.cpp:59
#21 0x00007ffff79297b0 in QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog (this=0xa5ffd30, srsid=2517, layerExtent=..., 
    layerHasSelectedFeatures=false, options=-1, parent=0xacdb70, fl=...) at /home/richard/dev/qgis/git/qgis/src/app/ogr/qgsvectorlayersaveasdialog.cpp:40
#22 0x00007ffff75631ed in QgisApp::saveAsVectorFileGeneral (this=0xacdb70, vlayer=0xa9f3540, symbologyOption=true)
    at /home/richard/dev/qgis/git/qgis/src/app/qgisapp.cpp:5684
#23 0x00007ffff7562d9e in QgisApp::saveAsFile (this=0xacdb70) at /home/richard/dev/qgis/git/qgis/src/app/qgisapp.cpp:5646
#24 0x00007ffff798a625 in QgisApp::qt_static_metacall (_o=0xacdb70, _c=QMetaObject::InvokeMetaMethod, _id=292, _a=0x7fffffffb240)
    at /home/richard/dev/qgis/git/qgis/build/src/app/moc_qgisapp.cxx:952
#25 0x00007ffff4c5a160 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#26 0x00007ffff3f88912 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#27 0x00007ffff3f89c73 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#28 0x00007ffff43e85cd in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#29 0x00007ffff43ec9b9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#30 0x00007ffff3fe51b0 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#31 0x00007ffff43f0c3b in QMenu::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#32 0x00007ffff3f8e8dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#33 0x00007ffff3f959d6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#34 0x00007ffff54e9a97 in QgsApplication::notify (this=0x7fffffffd360, receiver=0xa520090, event=0x7fffffffba00)
    at /home/richard/dev/qgis/git/qgis/src/core/qgsapplication.cpp:281
#35 0x00007ffff4c45a6d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#36 0x00007ffff3f94fdd in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#37 0x00007ffff401094c in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#38 0x00007ffff400e98d in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#39 0x00007ffff40389a2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#40 0x00007fffecb52fd7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007fffecb53230 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#42 0x00007fffecb532dc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007ffff4c76384 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#44 0x00007ffff4038a76 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#45 0x00007ffff4c442e1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#46 0x00007ffff4c44655 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#47 0x00007ffff43ef727 in QMenu::exec(QPoint const&, QAction*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#48 0x00007ffff6c0c142 in QgsLayerTreeView::contextMenuEvent (this=0xd3a780, event=0x7fffffffc940)
    at /home/richard/dev/qgis/git/qgis/src/gui/layertree/qgslayertreeview.cpp:121
#49 0x00007ffff3fe51b0 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#50 0x00007ffff43ab80e in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#51 0x00007ffff44d0fd3 in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#52 0x00007ffff45129fc in QTreeView::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#53 0x00007ffff4c45bd6 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#54 0x00007ffff3f8e8bc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#55 0x00007ffff3f9680c in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#56 0x00007ffff54e9a97 in QgsApplication::notify (this=0x7fffffffd360, receiver=0xd1fc60, event=0x7fffffffc940)
    at /home/richard/dev/qgis/git/qgis/src/core/qgsapplication.cpp:281
#57 0x00007ffff4c45a6d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#58 0x00007ffff401002c in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#59 0x00007ffff400e98d in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#60 0x00007ffff40389a2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#61 0x00007fffecb52fd7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#62 0x00007fffecb53230 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#63 0x00007fffecb532dc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#64 0x00007ffff4c76384 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#65 0x00007ffff4038a76 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#66 0x00007ffff4c442e1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#67 0x00007ffff4c44655 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#68 0x00007ffff4c4a629 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#69 0x0000000000409ab5 in main (argc=1, argv=0x7fffffffe098) at /home/richard/dev/qgis/git/qgis/src/app/main.cpp:1232

Does this mean there is something wrong with (my?) sqlite or spatialite?

Anything else I can do?

History

#1 Updated by Paolo Cavallini over 8 years ago

  • Priority changed from Normal to Severe/Regression

#2 Updated by Giovanni Manghi over 8 years ago

  • Target version set to Version 2.14
  • Status changed from Open to Feedback
  • Category set to Vectors

Just tested on latest master on Ubuntu (nightly build repo + ubuntugis) and OSGeo4w, all ok...

#3 Updated by Paolo Cavallini over 8 years ago

See also #14123

#4 Updated by Giovanni Manghi over 8 years ago

  • Resolution set to duplicate
  • Status changed from Feedback to Closed

debian testing ships sqlite3 3.10, so it is duplicate of #14123

#5 Updated by Even Rouault over 8 years ago

This is a Unix specific issue since SQLite 3.10.0 (where the unixCurrentTime implementation of the xCurrentTime SQLite VFS function has been aliased to NULL). See https://trac.osgeo.org/gdal/ticket/6360 for a GDAL fix

Also available in: Atom PDF