Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#1241 closed bug (fixed)

SPIT & Identify Features crashes

Reported by: msieczka Owned by: nobody
Priority: critical: causes crash or data corruption Milestone:
Component: Vectors Version: Trunk
Keywords: Cc:
Must Fix for Release: Yes Platform: Debian
Platform Version: Awaiting user input: no

Description

After the recent changes to Postgres stuff QGIS (r9120) crashes when using SPIT. The crash seems to originate in '/usr/lib/libQtCore.so.4'. Can QGIS do anything about it or is it all due to some QT bug?

PostgreSQL 8.2.7, PostGIS 1.3.3, QT 4.4.0 (all stock repository packages) on Debian testing amd64.

Sample shapefile attached.

  1. start SPIT
  1. connect to database
  1. select public schema
  1. select shapefile
  1. OK - crash:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f32afb7a7a0 (LWP 13164)]
0x00007f32aeff852c in ?? () from /usr/lib/libQtCore.so.4
(gdb) bt
#0  0x00007f32aeff852c in ?? () from /usr/lib/libQtCore.so.4
#1  0x00007f32aeff892d in QString::arg () from /usr/lib/libQtCore.so.4
#2  0x00007f329b0bbeeb in QgsShapeFile::insertLayer (this=0x1fe99d0, dbname=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 2628}, alloc = 0, size = 0, data = 0x9537ba, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 53}, alloc = 0, size = 0, data = 0x7f32af38685a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x7fffb7cb3e80, static codecForCStrings = 0x0}, schema=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 2628}, alloc = 0, size = 0, data = 0x9537ba, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 53}, alloc = 0, size = 0, data = 0x7f32af38685a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x7fffb7cb3e70, static codecForCStrings = 0x0}, primary_key=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 2628}, alloc = 0, size = 0, data = 0x9537ba, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 53}, alloc = 0, size = 0, data = 0x7f32af38685a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x7fffb7cb3e60, static codecForCStrings = 0x0}, geom_col=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 2628}, alloc = 0, size = 0, data = 0x9537ba, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 53}, alloc = 0, size = 0, data = 0x7f32af38685a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x7fffb7cb3e50, static codecForCStrings = 0x0}, srid=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 2628}, alloc = 0, size = 0, data = 0x9537ba, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 53}, alloc = 0, size = 0, data = 0x7f32af38685a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x7fffb7cb3e40, static codecForCStrings = 0x0}, conn=0x1ed43b0, pro=@0x7fffb7cb2ef0, fin=@0x7fffb7cb306f, 
    errorText=@0x7fffb7cb2fd0) at /home/shoofi/src/straight/qgis-trunk/src/plugins/spit/qgsshapefile.cpp:283
#3  0x00007f329b0a59a6 in QgsSpit::import (this=0x1e8bca0) at /home/shoofi/src/straight/qgis-trunk/src/plugins/spit/qgsspit.cpp:771
#4  0x00007f329b0c2f49 in QgsSpit::on_buttonBox_accepted (this=0x1e8bca0) at /home/shoofi/src/straight/qgis-trunk/build/src/plugins/spit/../../../../src/plugins/spit/qgsspit.h:84
#5  0x00007f329b0c2caf in QgsSpit::qt_metacall (this=0x1e8bca0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fffb7cb4220)
    at /home/shoofi/src/straight/qgis-trunk/build/src/plugins/spit/moc_qgsspit.cxx:90
#6  0x00007f32af0b3764 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#7  0x00007f32ae902221 in QDialogButtonBox::qt_metacall () from /usr/lib/libQtGui.so.4
#8  0x00007f32af0b3764 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#9  0x00007f32aeb4c6e7 in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4
#10 0x00007f32ae8d253b in ?? () from /usr/lib/libQtGui.so.4
#11 0x00007f32ae8d4082 in ?? () from /usr/lib/libQtGui.so.4
#12 0x00007f32ae8d42d5 in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
#13 0x00007f32ae6203af in QWidget::event () from /usr/lib/libQtGui.so.4
#14 0x00007f32ae5cde5d in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#15 0x00007f32ae5d639a in QApplication::notify () from /usr/lib/libQtGui.so.4
#16 0x00007f32af09f411 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#17 0x00007f32ae5d5738 in QApplicationPrivate::sendMouseEvent () from /usr/lib/libQtGui.so.4
#18 0x00007f32ae639719 in ?? () from /usr/lib/libQtGui.so.4
#19 0x00007f32ae6385ef in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#20 0x00007f32ae65f9cc in ?? () from /usr/lib/libQtGui.so.4
#21 0x00007f32ab168892 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#22 0x00007f32ab16c01d in ?? () from /usr/lib/libglib-2.0.so.0
#23 0x00007f32ab16c1db in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#24 0x00007f32af0c783f in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#25 0x00007f32ae65f16f in ?? () from /usr/lib/libQtGui.so.4
#26 0x00007f32af09dd22 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#27 0x00007f32af09dead in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#28 0x00007f32af0a037d in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#29 0x00000000004bc63a in main (argc=1, argv=0x7fffb7cb6108) at /home/shoofi/src/straight/qgis-trunk/src/app/main.cpp:684
(gdb)

Attachments (1)

buffer1.zip (179.3 KB ) - added by msieczka 16 years ago.
sample shapefile to reproduce the crash

Download all attachments as: .zip

Change History (9)

by msieczka, 16 years ago

Attachment: buffer1.zip added

sample shapefile to reproduce the crash

comment:1 by jctull, 16 years ago

I just tested on my system and was able to add a shapefile to my postgis. Tried with your sample file and it also worked. OS X 10.5.4, Qt4.4.1, postgis 1.3.3. Using revision 9120 of qgis.

comment:2 by jef, 16 years ago

not reproducable here either, but I fixed a spit bug in r9168. Does that help here too?

in reply to:  2 comment:3 by msieczka, 16 years ago

Replying to jef:

not reproducable here either, but I fixed a spit bug in r9168. Does that help here too?

Nope. Still crashes in r9173. The backtrace slightly changed:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f901a5847a0 (LWP 24529)]
0x00007f90199b152c in ?? () from /usr/lib/libQtCore.so.4
(gdb) bt
#0  0x00007f90199b152c in ?? () from /usr/lib/libQtCore.so.4
#1  0x00007f90199b192d in QString::arg () from /usr/lib/libQtCore.so.4
#2  0x00007f9005809dcb in QgsShapeFile::insertLayer (this=0x3144440, dbname=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 3117}, alloc = 0, size = 0, data = 0x92f33a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 53}, alloc = 0, size = 0, data = 0x7f9019d3f85a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x7fff226bb720, static codecForCStrings = 0x0}, schema=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 3117}, alloc = 0, size = 0, data = 0x92f33a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 53}, alloc = 0, size = 0, data = 0x7f9019d3f85a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x7fff226bb710, static codecForCStrings = 0x0}, 
    primary_key=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 3117}, alloc = 0, size = 0, data = 0x92f33a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 53}, alloc = 0, size = 0, data = 0x7f9019d3f85a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x7fff226bb700, static codecForCStrings = 0x0}, 
    geom_col=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 3117}, alloc = 0, size = 0, data = 0x92f33a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 53}, alloc = 0, size = 0, data = 0x7f9019d3f85a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x7fff226bb6f0, static codecForCStrings = 0x0}, srid=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 3117}, alloc = 0, size = 0, data = 0x92f33a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 53}, alloc = 0, size = 0, data = 0x7f9019d3f85a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x7fff226bb6e0, static codecForCStrings = 0x0}, 
    conn=0x3ee7ce0, pro=@0x7fff226ba790, fin=@0x7fff226ba90f, 
    errorText=@0x7fff226ba870)
    at /home/shoofi/src/straight/qgis-trunk/src/plugins/spit/qgsshapefile.cpp:301
#3  0x00007f90057f3886 in QgsSpit::import (this=0x1a02230)
    at /home/shoofi/src/straight/qgis-trunk/src/plugins/spit/qgsspit.cpp:772
#4  0x00007f9005810f35 in QgsSpit::on_buttonBox_accepted (this=0x1a02230)
    at /home/shoofi/src/straight/qgis-trunk/build/src/plugins/spit/../../../../src/plugins/spit/qgsspit.h:84
#5  0x00007f9005810c9b in QgsSpit::qt_metacall (this=0x1a02230, 
    _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fff226bbac0)
    at /home/shoofi/src/straight/qgis-trunk/build/src/plugins/spit/moc_qgsspit.cxx:90
#6  0x00007f9019a6c764 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#7  0x00007f90192bb221 in QDialogButtonBox::qt_metacall ()
   from /usr/lib/libQtGui.so.4
#8  0x00007f9019a6c764 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#9  0x00007f90195056e7 in QAbstractButton::clicked ()
   from /usr/lib/libQtGui.so.4
#10 0x00007f901928b53b in ?? () from /usr/lib/libQtGui.so.4
#11 0x00007f901928d082 in ?? () from /usr/lib/libQtGui.so.4
#12 0x00007f901928d2d5 in QAbstractButton::mouseReleaseEvent ()
   from /usr/lib/libQtGui.so.4
#13 0x00007f9018fd93af in QWidget::event () from /usr/lib/libQtGui.so.4
#14 0x00007f9018f86e5d in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#15 0x00007f9018f8f39a in QApplication::notify () from /usr/lib/libQtGui.so.4
#16 0x00007f9019a58411 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#17 0x00007f9018f8e738 in QApplicationPrivate::sendMouseEvent ()
   from /usr/lib/libQtGui.so.4
#18 0x00007f9018ff2719 in ?? () from /usr/lib/libQtGui.so.4
#19 0x00007f9018ff15ef in QApplication::x11ProcessEvent ()
   from /usr/lib/libQtGui.so.4
#20 0x00007f90190189cc in ?? () from /usr/lib/libQtGui.so.4
#21 0x00007f9015b21892 in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#22 0x00007f9015b2501d in ?? () from /usr/lib/libglib-2.0.so.0
#23 0x00007f9015b251db in g_main_context_iteration ()
   from /usr/lib/libglib-2.0.so.0
#24 0x00007f9019a8083f in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#25 0x00007f901901816f in ?? () from /usr/lib/libQtGui.so.4
#26 0x00007f9019a56d22 in QEventLoop::processEvents ()
   from /usr/lib/libQtCore.so.4
#27 0x00007f9019a56ead in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#28 0x00007f9019a5937d in QCoreApplication::exec ()
   from /usr/lib/libQtCore.so.4
#29 0x00000000004b1829 in main (argc=1, argv=0x7fff226bdb18)
    at /home/shoofi/src/straight/qgis-trunk/src/app/main.cpp:683
(gdb)

comment:4 by gabrimonfa, 16 years ago

I've exactly the same problem on qgis 0.11, postgreSQL 8.1, POSTGIS="1.1.6" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004" on Ubuntu Hardy amd64, on every shapefile

comment:5 by msieczka, 16 years ago

Component: SPITVectors
Summary: SPIT crashesSPIT & Identify Features crashes

I just had an *exactly* the same backtrace after a crash during querying a shapefile with *Identify Features* tool.

This seems a bug somewhere deep in QGIS, or a QT 4.4.0 bug.

in reply to:  5 comment:6 by brendonwp, 15 years ago

Replying to msieczka:

I just had an *exactly* the same backtrace after a crash during querying a shapefile with *Identify Features* tool.

This seems a bug somewhere deep in QGIS, or a QT 4.4.0 bug.

Imported shape files successfully to QGIS 1.0.0 Preview 2 with PostgreSQL 8.3 on Ubuntu 8.04. Using the provided shape file I get: "Problem inserting features from file: /home/workshop/Desktop/buffer1.shp The database gave an error while executing this SQL: CREATE TABLE ""."buffer1"("gid" int4 PRIMARY KEY,"CAT" float,"NAZWA" varchar(80) ) The error was: ro-length delimited identifier at or near """" LINE 1: CREATE TABLE ""."buffer1"("gid" int4 PRIMARY KEY,"CAT" float..."

comment:7 by jef, 15 years ago

Resolution: fixed
Status: newclosed

fixed in r10094

comment:8 by (none), 15 years ago

Milestone: Version 1.0.1

Milestone Version 1.0.1 deleted

Note: See TracTickets for help on using tickets.