Bug report #16287

New SpatiaLite layer creates incompatible layer

Added by marisn - almost 7 years ago. Updated almost 7 years ago.

Category:Data Provider/SpatiaLite
Affected QGIS version:2.18.4 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:not reproducable
Crashes QGIS or corrupts data:No Copied to github as #:24197


It is possible to create a new SpatiaLite layer via dialog, still it produces an error message. Also it is not possible to add the new layer via "Add SpatiaLite Layers" dialog. If it is added via OGR, it is not editable. Created DB and layer passes spatialite> .checkgeom without any errors (except of being empty).

src/app/qgsnewspatialitelayerdialog.cpp: 364: (apply) [13185ms] Creating table in database /home/maris/soft/grass_trunk/point_sample.sqlite
src/app/qgsnewspatialitelayerdialog.cpp: 366: (apply) [0ms] create table "my_points"(pkuid integer primary key autoincrement,"description" text)
src/app/qgsnewspatialitelayerdialog.cpp: 373: (apply) [0ms] select AddGeometryColumn('my_points','geometry',3059,'POINT',2)
src/app/qgsnewspatialitelayerdialog.cpp: 378: (apply) [0ms] select CreateSpatialIndex('my_points','geometry')
src/core/qgsproviderregistry.cpp: 377: (provider) [3028ms] Library name is /home/maris/soft/qgis_bin/lib/qgis/plugins/libspatialiteprovider.so
src/providers/spatialite/qgsspatialiteconnection.cpp: 736: (openDb) [1ms] New sqlite connection for /home/maris/soft/grass_trunk/point_sample.sqlite
src/providers/spatialite/qgsspatialiteconnection.cpp: 757: (openDb) [6ms] Connection to the database was successful
src/core/qgsmessagelog.cpp: 45: (logMessage) [0ms] 2017-03-05T12:42:13 SpatiaLite[1] SQLite kļūda: no such column: type
SQL: SELECT type, srid, spatial_index_enabled, coord_dimension FROM geometry_columns WHERE upper(f_table_name) = upper('my_points') and upper(f_geometry_column) = upper('geometry')
src/providers/spatialite/qgsspatialiteprovider.cpp: 562: (QgsSpatiaLiteProvider) [3ms] Invalid SpatiaLite layer
src/core/qgsproviderregistry.cpp: 399: (provider) [1ms] Instantiated the data provider plugin: spatialite
src/core/qgsvectorlayer.cpp: 1733: (setDataProvider) [0ms] Instantiated the data provider plugin
src/core/qgsvectorlayer.cpp: 1738: (setDataProvider) [0ms] Invalid provider plugin dbname='/home/maris/soft/grass_trunk/point_sample.sqlite' table='my_points'(geometry) sql=
src/app/qgsnewspatialitelayerdialog.cpp: 438: (apply) [0ms] my_points is an invalid layer - not loaded

QGIS versija 2.18.4
QGIS koda revīzija d79bb3a0f3
Kompilēts priekš Qt 4.8.7
Darbina ar Qt 4.8.7
Kompilēts priekš GDAL/OGR 2.0.3
Darbina ar GDAL/OGR 2.0.3
Kompilēts priekš GEOS 3.6.1-CAPI-1.10.1
Darbina ar GEOS 3.6.1-CAPI-1.10.1 r0
PostgreSQL klienta versija 9.4.9
SpatiaLite versija 4.3.0a
QWT versija 5.2.3
PROJ.4 versija 492
QScintilla2 versija 2.9.4
Šī QGIS kopija raksta atkļūdošanas informāciju.


#1 Updated by Giovanni Manghi almost 7 years ago

  • Status changed from Open to Feedback

Please attach sample data and exact steps to replicate. I cannot replicate here with sample data I use for tests.

#2 Updated by Giovanni Manghi almost 7 years ago

  • Resolution set to not reproducable
  • Status changed from Feedback to Closed

Closing for lack of feedback, please reopen if necessary.

Also available in: Atom PDF