Bug 304405

Summary: Kexi crashes on importing CSV files with more than 1024 columns
Product: [Applications] KEXI Reporter: Jarosław Staniek <staniek>
Component: Migration/Import/ExportAssignee: Jarosław Staniek <staniek>
Status: CLOSED FIXED    
Severity: crash CC: adam, mateolan
Priority: NOR    
Version: 2.4.3   
Target Milestone: 2.5   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed In: 2.5.1
Sentry Crash Report:
Bug Depends on: 304329    
Bug Blocks:    

Description Jarosław Staniek 2012-08-01 23:03:47 UTC
-- Information about the crash:
Trying to import data via external data menu. It has more than 1024 columns.

-- Backtrace, the same as in bug #304329:
Application: Kexi (kexi), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f3435657780 (LWP 31443))]

Thread 3 (Thread 0x7f341ba95700 (LWP 31447)):
#0  0x00007f34305d605d in __pthread_mutex_unlock_usercnt (mutex=<optimized out>, decr=<optimized out>) at pthread_mutex_unlock.c:52
#1  __pthread_mutex_unlock (mutex=0x7f341400c2a0) at pthread_mutex_unlock.c:290
#2  0x00007f34301415d1 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f343010602a in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f343010649a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f342383f406 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00007f34301279e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007f34305d2e9a in start_thread (arg=0x7f341ba95700) at pthread_create.c:308
#8  0x00007f34335724bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f341c296700 (LWP 32381)):
#0  0x00007f3433566b03 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f3430106036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f3430106164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f34339e7426 in QEventDispatcherGlib::processEvents (this=0x7f3414001360, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f34339b6c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f34339b6ed7 in QEventLoop::exec (this=0x7f341c295dd0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f34338b5fa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f34339969ff in QInotifyFileSystemWatcherEngine::run (this=0x2ce2c60) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f34338b8fcb in QThreadPrivate::start (arg=0x2ce2c60) at thread/qthread_unix.cpp:298
#9  0x00007f34305d2e9a in start_thread (arg=0x7f341c296700) at pthread_create.c:308
#10 0x00007f34335724bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f3435657780 (LWP 31443)):
[KCrash Handler]
#6  isEmpty (this=0x9b5959592a000000) at /usr/include/qt4/QtCore/qlist.h:99
#7  isEmpty (this=0x9b5959592a000000) at /usr/include/qt4/QtCore/qlist.h:152
#8  KexiCSVImportDialog::detectTypeAndUniqueness (this=0x2c9d810, row=<optimized out>, col=1024, text=...) at /build/buildd/calligra-2.4.0/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp:1054
#9  0x00007f33f891954e in KexiCSVImportDialog::setText (this=0x2c9d810, row=2, col=1025, text=..., inGUI=<optimized out>) at /build/buildd/calligra-2.4.0/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp:1253
#10 0x00007f33f891ab69 in KexiCSVImportDialog::loadRows (this=0x2c9d810, field=..., row=@0x7fff7bc37080: 1, column=@0x7fff7bc37084: 1025, maxColumn=@0x7fff7bc37088: 0, inGUI=true) at /build/buildd/calligra-2.4.0/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp:854
#11 0x00007f33f891c200 in KexiCSVImportDialog::fillTable (this=0x2c9d810) at /build/buildd/calligra-2.4.0/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp:510
#12 0x00007f33f891c8bf in KexiCSVImportDialog::initLater (this=0x2c9d810) at /build/buildd/calligra-2.4.0/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp:431
#13 0x00007f33f891ecea in KexiCSVImportDialog::KexiCSVImportDialog (this=0x2c9d810, mode=<optimized out>, parent=<optimized out>) at /build/buildd/calligra-2.4.0/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp:414
#14 0x00007f33f891712b in KexiCSVImportExportPart::createWidget (this=0x2e37260, widgetClass=<optimized out>, parent=0x2767ad0, objName=0x7f343524d69d "csv_importexport", args=0x7fff7bc37cb0) at /build/buildd/calligra-2.4.0/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp:45
#15 0x00007f3434f02bab in KexiInternalPart::createModalDialogInstance (partName=0x7f343524d69d "csv_importexport", dialogClass=0x7f343524d689 "KexiCSVImportDialog", msgHdr=<optimized out>, objName=<optimized out>, args=0x7fff7bc37cb0) at /build/buildd/calligra-2.4.0/kexi/core/kexiinternalpart.cpp:169
#16 0x00007f343519f8c2 in KexiMainWindow::slotProjectImportDataTable (this=0x2767ad0) at /build/buildd/calligra-2.4.0/kexi/main/KexiMainWindow.cpp:4041
#17 0x00007f34351a47c5 in qt_static_metacall (_a=0x7fff7bc37ef0, _id=<optimized out>, _o=0x2767ad0, _c=<optimized out>) at /build/buildd/calligra-2.4.0/obj-x86_64-linux-gnu/kexi/main/KexiMainWindow.moc:484
#18 KexiMainWindow::qt_static_metacall (_o=0x2767ad0, _c=<optimized out>, _id=<optimized out>, _a=0x7fff7bc37ef0) at /build/buildd/calligra-2.4.0/obj-x86_64-linux-gnu/kexi/main/KexiMainWindow.moc:370
#19 0x00007f34339cc281 in QMetaObject::activate (sender=0x27a8cd0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff7bc37ef0) at kernel/qobject.cpp:3547
#20 0x00007f34343ac132 in QAction::triggered (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qaction.cpp:277
#21 0x00007f34343ac31f in QAction::activate (this=0x27a8cd0, event=<optimized out>) at kernel/qaction.cpp:1257
#22 0x00007f3434781d4a in QAbstractButtonPrivate::click (this=0x2886cd0) at widgets/qabstractbutton.cpp:530
#23 0x00007f3434781ffc in QAbstractButton::mouseReleaseEvent (this=0x2804f10, e=0x7fff7bc387d0) at widgets/qabstractbutton.cpp:1123
#24 0x00007f343483f5da in QToolButton::mouseReleaseEvent (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:718
#25 0x00007f3434403144 in QWidget::event (this=0x2804f10, event=0x7fff7bc387d0) at kernel/qwidget.cpp:8362
#26 0x00007f34343b2894 in notify_helper (e=0x7fff7bc387d0, receiver=0x2804f10, this=0x24efb00) at kernel/qapplication.cpp:4559
#27 QApplicationPrivate::notify_helper (this=0x24efb00, receiver=0x2804f10, e=0x7fff7bc387d0) at kernel/qapplication.cpp:4531
#28 0x00007f34343b80bf in QApplication::notify (this=<optimized out>, receiver=0x2804f10, e=0x7fff7bc387d0) at kernel/qapplication.cpp:4102
#29 0x00007f34314659e6 in KApplication::notify (this=0x24e1950, receiver=0x2804f10, event=0x7fff7bc387d0) at ../../kdeui/kernel/kapplication.cpp:311
#30 0x00007f34339b7e9c in QCoreApplication::notifyInternal (this=0x24e1950, receiver=0x2804f10, event=0x7fff7bc387d0) at kernel/qcoreapplication.cpp:876
#31 0x00007f34343b3862 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#32 QApplicationPrivate::sendMouseEvent (receiver=0x2804f10, event=0x7fff7bc387d0, alienWidget=0x2804f10, nativeWidget=0x27bcde0, buttonDown=0x2804f10, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3170
#33 0x00007f3434432bf5 in QETWidget::translateMouseEvent (this=0x27bcde0, event=<optimized out>) at kernel/qapplication_x11.cpp:4617
#34 0x00007f3434431bae in QApplication::x11ProcessEvent (this=0x24e1950, event=0x7fff7bc390a0) at kernel/qapplication_x11.cpp:3732
#35 0x00007f343445b0d2 in x11EventSourceDispatch (s=0x24f1700, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#36 0x00007f3430105d53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007f34301060a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007f3430106164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007f34339e73bf in QEventDispatcherGlib::processEvents (this=0x2479ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#40 0x00007f343445ad5e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#41 0x00007f34339b6c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#42 0x00007f34339b6ed7 in QEventLoop::exec (this=0x7fff7bc39440, flags=...) at kernel/qeventloop.cpp:204
#43 0x00007f34339bbf67 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#44 0x0000000000400891 in main (argc=<optimized out>, argv=0x7fff7bc39588) at /build/buildd/calligra-2.4.0/kexi/main.cpp:36
Comment 1 Jarosław Staniek 2012-08-10 20:39:52 UTC
Git commit f2c11adb7eeff01d0261f8b73c270248f52ce31a by Jaroslaw Staniek.
Committed on 03/08/2012 at 23:56.
Pushed by staniek into branch 'calligra/2.5'.

Fix crash on importing CSV files with more than 1024 columns
REVIEW:105844
FIXED-IN:2.5.1

M  +90   -28   kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
M  +3    -8    kexi/plugins/importexport/csv/kexicsvimportdialog.h

http://commits.kde.org/calligra/f2c11adb7eeff01d0261f8b73c270248f52ce31a
Comment 2 Jarosław Staniek 2012-08-10 20:51:34 UTC
Git commit 10451576f484318231dba286683519a4ab8f2927 by Jaroslaw Staniek.
Committed on 03/08/2012 at 23:56.
Pushed by staniek into branch 'master'.

Fix crash on importing CSV files with more than 1024 columns
REVIEW:105844

M  +90   -28   kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
M  +3    -8    kexi/plugins/importexport/csv/kexicsvimportdialog.h

http://commits.kde.org/calligra/10451576f484318231dba286683519a4ab8f2927