Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3188 closed bug (fixed)

Bug in delimited text plugin

Reported by: ccrook Owned by: jef
Priority: critical: causes crash or data corruption Milestone: Version 1.6.0
Component: C++ Plugins Version: Trunk
Keywords: delimited text plugin Cc:
Must Fix for Release: Yes Platform: Windows
Platform Version: Windows XP SP 3 Awaiting user input: no

Description (last modified by jef)

Accessing attributes in a delimited text file layer causes QGIS to crash.

Steps to repeat.

  1. Open QGIS in a new project
  2. Select a project CRS with parameters:
    +proj=merc +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +a=6378137 +b=6378137 +units=m +no_defs
    
  3. Click the delimited text plugin and enter text file: attached file test.txt layer name: text delimiter string: \t, plain characters X field: x Y field: y click OK
  4. Map should display 3 points
  5. Right click layer in the layers list and select "Open attribute table"

QGIS dies with the Windows 'Send error report' dialog.

Operating system: MS Windows XP, service pack 3 QGIS version: 1.6.0 - build 14500

Attachments (1)

test.txt (143 bytes ) - added by ccrook 14 years ago.

Download all attachments as: .zip

Change History (6)

by ccrook, 14 years ago

Attachment: test.txt added

comment:1 by timlinux, 14 years ago

Backtrace from when the crash occurs with the provided sample data:

Debug: /home/timlinux/dev/cpp/qgis/src/app/attributetable/qgsattributetablemodel.cpp: 188: (loadLayer) entered.
Debug: /home/timlinux/dev/cpp/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp: 74: (splitLine) Attempting to split the input line: 50000.00	50000.00	0.01577	0.01914	0.01218 using delimiter 	
Debug: /home/timlinux/dev/cpp/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp: 82: (splitLine) Split line into 5 parts
Debug: /home/timlinux/dev/cpp/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp: 74: (splitLine) Attempting to split the input line: 50000.00	60000.00	0.01669	0.02088	0.01301 using delimiter 	
Debug: /home/timlinux/dev/cpp/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp: 82: (splitLine) Split line into 5 parts
Debug: /home/timlinux/dev/cpp/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp: 74: (splitLine) Attempting to split the input line: 60000.00	60000.00	0.01563	0.02183	0.01243 using delimiter 	
Debug: /home/timlinux/dev/cpp/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp: 82: (splitLine) Split line into 5 parts
Debug: /home/timlinux/dev/cpp/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp: 74: (splitLine) Attempting to split the input line:  using delimiter 	
Debug: /home/timlinux/dev/cpp/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp: 82: (splitLine) Split line into 1 parts
Fatal: ASSERT failure in QList<T>::operator[]: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 463

Program received signal SIGABRT, Aborted.
0x00007ffff3110ba5 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
	in ../nptl/sysdeps/unix/sysv/linux/raise.c

comment:2 by timlinux, 14 years ago

Sorry last bt was no use, try again:

#0  0x00007ffff3110ba5 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff31146b0 in abort () at abort.c:92
#2  0x0000000000511cad in myMessageOutput (type=QtFatalMsg, 
    msg=0x1735f38 "ASSERT failure in QList<T>::operator[]: \"index out of range\", file /usr/include/qt4/QtCore/qlist.h, line 463")
    at /home/timlinux/dev/cpp/qgis/src/app/main.cpp:241
#3  0x00007ffff619c80e in qt_message_output(QtMsgType, char const*) () from /usr/lib/libQtCore.so.4
#4  0x00007ffff619ca42 in ?? () from /usr/lib/libQtCore.so.4
#5  0x00007ffff619cbf5 in qFatal(char const*, ...) () from /usr/lib/libQtCore.so.4
#6  0x00000000005530d5 in QList<QString>::operator[] (this=0x7fffffffba30, i=1) at /usr/include/qt4/QtCore/qlist.h:463
#7  0x00007fffd4c1bd27 in QgsDelimitedTextProvider::nextFeature (this=0x32e3800, feature=...)
    at /home/timlinux/dev/cpp/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp:450
#8  0x00007ffff76556ca in QgsVectorLayer::nextFeature (this=0x35c1dc0, f=...)
    at /home/timlinux/dev/cpp/qgis/src/core/qgsvectorlayer.cpp:1678
#9  0x000000000079b9d8 in QgsAttributeTableModel::loadLayer (this=0x1aa8fe0)
    at /home/timlinux/dev/cpp/qgis/src/app/attributetable/qgsattributetablemodel.cpp:222
#10 0x0000000000799e2e in QgsAttributeTableModel::QgsAttributeTableModel (this=0x1aa8fe0, theLayer=0x35c1dc0, parent=0x0)
    at /home/timlinux/dev/cpp/qgis/src/app/attributetable/qgsattributetablemodel.cpp:46
#11 0x00000000007a0971 in QgsAttributeTableMemoryModel::QgsAttributeTableMemoryModel (this=0x1aa8fe0, theLayer=0x35c1dc0)
    at /home/timlinux/dev/cpp/qgis/src/app/attributetable/qgsattributetablememorymodel.cpp:44
#12 0x00000000007a1eb3 in QgsAttributeTableView::setLayer (this=0x32a0f20, layer=0x35c1dc0)
    at /home/timlinux/dev/cpp/qgis/src/app/attributetable/qgsattributetableview.cpp:56
#13 0x000000000078ee12 in QgsAttributeTableDialog::QgsAttributeTableDialog (this=0x1aa9610, theLayer=0x35c1dc0, parent=0x0, 
    flags=...) at /home/timlinux/dev/cpp/qgis/src/app/attributetable/qgsattributetabledialog.cpp:66
#14 0x000000000053f85c in QgisApp::attributeTable (this=0xefc930) at /home/timlinux/dev/cpp/qgis/src/app/qgisapp.cpp:3847
#15 0x00000000007faeb8 in QgisApp::qt_metacall (this=0xefc930, _c=QMetaObject::InvokeMetaMethod, _id=142, _a=0x7fffffffc370)
    at /home/timlinux/dev/cpp/qgis/build/src/app/moc_qgisapp.cxx:479
#16 0x00007ffff62b0b27 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#17 0x00007ffff55f8852 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#18 0x00007ffff55f9f5b in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#19 0x00007ffff59d957a in ?? () from /usr/lib/libQtGui.so.4
#20 0x00007ffff59d982c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#21 0x00007ffff5aa952a in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4

comment:3 by timlinux, 14 years ago

Owner: changed from timlinux to jef

Juergen do you have an idea as to what is causing this?

Regards

Tim

comment:4 by jef, 14 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

fixed in r14507.

comment:5 by jef, 14 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.