Bug report #865
SPIT segfaults
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | - | ||
Category: | - | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | All | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 10924 |
Description
QGIS SVN 7773, built and running against QT 4.3.2 on amd64 Ubuntu Dapper.
1. SPIT
2. select a shapefile to import
3. OK
4. kaboom
Backtrace with debugging enabled:
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46912604925728 (LWP 20332)] QString::append (this=0x7ffffff234b0, str=@0x0) at tools/qstring.cpp:1255 1255 if (str.d != &shared_null) { Current language: auto; currently c++ (gdb) bt #0 QString::append (this=0x7ffffff234b0, str=@0x0) at tools/qstring.cpp:1255 #3905 0x00000000004ab673 in QString::operator+= () #3906 0x00000000004d230e in operator+ () #3907 0x00002aaab4cddb92 in [[QgsShapeFile]]::insertLayer () from /usr/local/qgis09/lib/qgis/libspitplugin.so #3908 0x00002aaab4cccb9d in [[QgsSpit]]::import () from /usr/local/qgis09/lib/qgis/libspitplugin.so #3909 0x00002aaab4ce51a3 in [[QgsSpit]]::on_buttonBox_accepted () from /usr/local/qgis09/lib/qgis/libspitplugin.so #3910 0x00002aaab4ce4f91 in [[QgsSpit]]::qt_metacall () from /usr/local/qgis09/lib/qgis/libspitplugin.so #3911 0x00002aaaaacd4eab in QMetaObject::activate (sender=0xf1bbe0, from_signal_index=28, to_signal_index=28, argv=0x83ffd0) at kernel/qobject.cpp:3083 #3912 0x00002aaaab524945 in QDialogButtonBox::qt_metacall (this=0xf1bbe0, _c=QMetaObject::InvokeMetaMethod, _id=-2, _a=0x7ffffff253b0) at moc_qdialogbuttonbox.cpp:113 #3913 0x00002aaaaacd4eab in QMetaObject::activate (sender=0xf1b9a0, from_signal_index=29, to_signal_index=30, argv=0x83ffd0) at kernel/qobject.cpp:3083 #10 0x00002aaaab71f387 in QAbstractButton::clicked (this=0x7ffffff234b0, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:180 #3914 0x00002aaaab4f96eb in QAbstractButtonPrivate::emitClicked (this=0xf1b650) at widgets/qabstractbutton.cpp:532 #3915 0x00002aaaab4fa947 in QAbstractButtonPrivate::click (this=0xf1b650) at widgets/qabstractbutton.cpp:525 #3916 0x00002aaaab4fab8d in QAbstractButton::mouseReleaseEvent (this=0xf1b9a0, e=0x7ffffff25c40) at widgets/qabstractbutton.cpp:1102 #3917 0x00002aaaab271d6a in QWidget::event (this=dwarf2_read_address: Corrupted DW ARF expression. ) at kernel/qwidget.cpp:6129 #3918 0x00002aaaab4f9a01 in QAbstractButton::event (this=0xf1b9a0, e=0x0) at widgets/qabstractbutton.cpp:1064 #3919 0x00002aaaab5857e7 in QPushButton::event (this=0xf1b9a0, e=0x7ffffff25c40) at widgets/qpushbutton.cpp:667 #3920 0x00002aaaab22e2af in QApplicationPrivate::notify_helper (this=0x7e71f0, receiver=0xf1b9a0, e=0x7ffffff25c40) at kernel/qapplication.cpp:3558 #3921 0x00002aaaab231f08 in QApplication::notify (this=<value optimized out>, receiver=0xf1b9a0, e=0x7ffffff25c40) at kernel/qapplication.cpp:3257 #3922 0x00002aaaaacc3e10 in QCoreApplication::notifyInternal ( this=0x7ffffff267a0, receiver=0xf1b9a0, event=0x7ffffff25c40) at kernel/qcoreapplication.cpp:532 #3923 0x00002aaaab2877bb in QETWidget::translateMouseEvent (this=0xf1b9a0, event=<value optimized out>) at qcoreapplication.h:205 #3924 0x00002aaaab28684c in QApplication::x11ProcessEvent (this=0x97, event=0x7ffffff26230) at kernel/qapplication_x11.cpp:3024 #3925 0x00002aaaab2aaed2 in x11EventSourceDispatch (s=0x81b940, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:137 #3926 0x00002aaaae507bfd in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0 #3927 0x00002aaaae50aec5 in g_main_context_check () from /usr/lib64/libglib-2.0.so.0 #3928 0x00002aaaae50b374 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #3929 0x00002aaaaace66ce in QEventDispatcherGlib::processEvents (this=0x816fd0, flags=@0x7ffffff26500) at kernel/qeventdispatcher_glib.cpp:340 #3930 0x00002aaaab2aaaaf in QGuiEventDispatcherGlib::processEvents ( this=0x7ffffff234b0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:193 #3931 0x00002aaaaacc3778 in QEventLoop::processEvents ( this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:142 #3932 0x00002aaaaacc38c6 in QEventLoop::exec (this=0x7ffffff265a0, flags=@0x7ffffff265b0) at kernel/qeventloop.cpp:188 #3933 0x00002aaaaacc5dc2 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:761 #3934 0x00000000004ab10b in main () (gdb)
Associated revisions
spit plugin fix
- quote values and identifiers properly
- remove now unnecessary reserved word dialog
- also consider primary key field and geometry field in double field check
- allow rename of primary key field
- remove disabled connect button (spit automatically connects on OK)
- keep the window open window if there was an error
- fixes #865 and #930
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8293 c8812cc2-4d05-0410-92ff-de0c093fc19c
spit plugin fix
- quote values and identifiers properly
- remove now unnecessary reserved word dialog
- also consider primary key field and geometry field in double field check
- allow rename of primary key field
- remove disabled connect button (spit automatically connects on OK)
- keep the window open window if there was an error
- fixes #865 and #930
git-svn-id: http://svn.osgeo.org/qgis/trunk@8293 c8812cc2-4d05-0410-92ff-de0c093fc19c
History
#1 Updated by leo-lami - almost 17 years ago
In Debian and Windows system I have the same problem.
QGIS first says the follow message and then it crashes.
Problema nell'inserimento di elementi dal file:
/home/Documenti/Gis/Cartografia/Arezzo/uniti/10k/AU.shp
The database gave an error while executing this SQL:
SELECT AddGeometryColumn('corso', 'AU', 'the_geom', -1, 'POLYGON', 2)
The error was:
relazione "corso.AU" non esiste
CONTEXT: SQL statement "ALTER TABLE corso."AU" ADD COLUMN the_geom geometry "
PL/pgSQL function "addgeometrycolumn" line 86 at execute statement
SQL statement "SELECT AddGeometryColumn(_, $1 , $2 , $3 , $4 , $5 , $6 )"
PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement
#2 Updated by leo-lami - almost 17 years ago
Don't considere the last change. The reported problem is due to the all caps name choosen for the PostGis table.
#3 Updated by Maciej Sieczka - almost 17 years ago
Hmm. Same happens in QGIS 0.8.1. In both 0.9.x and 0.8.1 SPIT crashes, whatever shapefile I'm trying. Shapefiles are OK - QGIS can read and manipulate them.
I can import same shapefiles with ogr2ogr. Eg. a command:
ogr2ogr -f [[PostgreSQL]] PG:"dbname=dss_postgis port=31268" -lco "DIM=2" -nln gminy -a_srs EPSG:32633 caves_gminy.shp
works OK. QGIS can see the resultig PostGIS layer, lets me query it etc.
#4 Updated by Alessandro Pasotti almost 17 years ago
Could be a different bug, here is the bt (version 0.9.2 on gutsy 64 bit):
Debug: /home/ale/dev/cpp/qgis/src/plugins/spit/qgsshapefile.cpp: 292: (insertLayer) Escaped cat to cat Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 47908762661072 (LWP 3408)] 0x00002b9295e03a5a in QString::append () from /usr/lib/libQtCore.so.4 (gdb) (gdb) bt #0 0x00002b9295e03a5a in QString::append () from /usr/lib/libQtCore.so.4 #3905 0x00000000004b7e41 in QString::operator+= (this=0x7fff181b1b30, s=@0x0) at /usr/include/qt4/QtCore/qstring.h:242 #3906 0x00000000004e3b5c in operator+ (s1=0x2aaaafb5aa46 " ", s2=@0x0) at /usr/include/qt4/QtCore/qstring.h:955 #3907 0x00002aaaafb4fa1c in [[QgsShapeFile]]::insertLayer (this=0x2aaab81bdbb0, dbname=@0x7fff181b2c30, schema=@0x7fff181b2c20, geom_col=@0x7fff181b2c10, srid=@0x7fff181b2c00, conn=0x3f28460, pro=@0x7fff181b2070, fin=@0x7fff181b2f46, errorText=@0x7fff181b2100) at /home/ale/dev/cpp/qgis/src/plugins/spit/qgsshapefile.cpp:294 #3908 0x00002aaaafb3ba5a in [[QgsSpit]]::import (this=0x2aaab8024aa0) at /home/ale/dev/cpp/qgis/src/plugins/spit/qgsspit.cpp:801 #3909 0x00002aaaafb57659 in [[QgsSpit]]::on_buttonBox_accepted (this=0x2aaab8024aa0) at /home/ale/dev/cpp/qgis/build/src/plugins/spit/../../../../src/plugins/spit/qgsspit.h:91 #3910 0x00002aaaafb57381 in [[QgsSpit]]::qt_metacall (this=0x2aaab8024aa0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fff181b3050) at /home/ale/dev/cpp/qgis/build/src/plugins/spit/moc_qgsspit.cxx:91 #3911 0x00002b9295e84770 in QMetaObject::activate () from /usr/lib/libQtCore.so.4 #3912 0x00002b9295e84bbb in QMetaObject::activate () from /usr/lib/libQtCore.so.4 #3913 0x00002b92937dc340 in QDialogButtonBox::accepted () from /usr/lib/libQtGui.so.4 #10 0x00002b92937dc526 in ?? () from /usr/lib/libQtGui.so.4 #3914 0x00002b92937ddc49 in QDialogButtonBox::qt_metacall () from /usr/lib/libQtGui.so.4 #3915 0x00002b9295e84770 in QMetaObject::activate () from /usr/lib/libQtCore.so.4 #3916 0x00002b9295e84969 in QMetaObject::activate () from /usr/lib/libQtCore.so.4 #3917 0x00002b92939dc7bb in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4 #3918 0x00002b92937ade55 in ?? () from /usr/lib/libQtGui.so.4 #3919 0x00002b92937af06b in ?? () from /usr/lib/libQtGui.so.4 #3920 0x00002b92937af2ce in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4 #3921 0x00002b92934cb5d9 in QWidget::event () from /usr/lib/libQtGui.so.4 #3922 0x00002b92937addff in QAbstractButton::event () from /usr/lib/libQtGui.so.4 #3923 0x00002b92938489d3 in QPushButton::event () from /usr/lib/libQtGui.so.4 #3924 0x00002b929347ed51 in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4 #3925 0x00002b929347f949 in QApplication::notify () from /usr/lib/libQtGui.so.4 #3926 0x00002b9295e73846 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4 #3927 0x00002b9293489e73 in ?? () from /usr/lib/libQtGui.so.4 #3928 0x00002b92934e4742 in ?? () from /usr/lib/libQtGui.so.4 #3929 0x00002b92934e2239 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4 #3930 0x00002b9293510599 in ?? () from /usr/lib/libQtGui.so.4 #3931 0x00002b929a36afd3 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #3932 0x00002b929a36e2dd in ?? () from /usr/lib/libglib-2.0.so.0 #3933 0x00002b929a36e80e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #3934 0x00002b9295e9af4e in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4 #3935 0x00002b929350fe07 in ?? () from /usr/lib/libQtGui.so.4 #3936 0x00002b9295e70b31 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4 #3937 0x00002b9295e70c86 in QEventLoop::exec () from /usr/lib/libQtCore.so.4 #3938 0x00002b9295e73ffc in QCoreApplication::exec () from /usr/lib/libQtCore.so.4 #36 0x00002b929347e928 in QApplication::exec () from /usr/lib/libQtGui.so.4 #37 0x00000000004b74dc in main (argc=1, argv=0x7fff181b5908) at /home/ale/dev/cpp/qgis/src/app/main.cpp:631
#5 Updated by Paolo Cavallini almost 17 years ago
Given the frequent problems with the SPIT plugin, I think a different approach would be better:
- replace ogr2ogr within the current SPIT plugin with the more robust shp2pgsql (please note however that this would impose a dependency on the client side of PostGIS), or
- replace the current SPIT with a new plugin, possibly in python, as a thin wrapper to shp2pgsql
#6 Updated by ha9016559 - over 16 years ago
- Status changed from Open to In Progress
i use the qgis in windows XP ,I AM USING the chinese type character set (tranditional),in my region,we use big5 and UTF8 code in our language,when i use the SPIT PLUGIN to import a shapfile with a chinese file name or chinese path name,after i push the "OK" button in the bottom-right area of form,the form frozen,after few secondes,the QGIS APPLICATION crash,and the MS-windows ERROR report dialog appear,before i PUSH the ok button,i add the shapfile,and the file instance in the workarea appear it's filename and path in the quene,but after i push the ok button the qgis crash,i can add a shapfile with a chinese file name or path in the add vector layer function,but when i use the SPIT to import the shapfile to POSTGRESQL/POSTGIS,it crash
#7 Updated by Maciej Sieczka - over 16 years ago
- Status changed from In Progress to Open
ha9016559,
Thanks for confirming the bug on Windows. Please take more care when you modify the ticket's fields in future though. I've fixed it this time.
Cheers!
#8 Updated by leolami - over 16 years ago
It seems resolved in 0.9.2
Can you control and close it?
#9 Updated by Maciej Sieczka - over 16 years ago
#10 Updated by Jürgen Fischer over 16 years ago
- Status changed from Open to Closed
- Resolution set to fixed
fixed in a08e4de9 (SVN r8294)
#11 Updated by Anonymous over 15 years ago
Milestone Version 0.9.2 deleted