In der Console einen Dateinamen (also, das TextEdit im "Console"-Tab des mainwindow) eingeben. Da der OP kein Beispielfile mitgegeben hat, hab ich einfach mainwindow.cpp eingegeben, LoadData im Menü wählen und - hopp - SegFault ^^
Code: Alles auswählen
(gdb) bt
#0 QString (other=..., this=0x7fffffff9200)
at ../../include/QtCore/../../src/corelib/tools/qstring.h:726
#1 QLocalePrivate::stringToDouble (this=<optimized out>, number=..., ok=0x7fffffff925f,
group_sep_mode=QLocalePrivate::FailOnGroupSeparators) at tools/qlocale.cpp:2971
#2 0x00007ffff6d2e43e in QString::toDouble (this=0x7082e0, ok=0x0) at tools/qstring.cpp:5870
#3 0x0000000000407a65 in data::loadFile(QString) ()
#4 0x000000000040555a in MainWindow::on_actionLoadData_activated() ()
#5 0x00000000004093ab in MainWindow::qt_metacall(QMetaObject::Call, int, void**) ()
#6 0x00007ffff6df7268 in QMetaObject::activate (sender=0x6868f0, m=<optimized out>,
local_signal_index=<optimized out>, argv=0x7fffffff9810) at kernel/qobject.cpp:3566
#7 0x00007ffff730a341 in QAction::activated (this=<optimized out>, _t1=-2)
at .moc/release-shared/moc_qaction.cpp:297
#8 0x00007ffff730a3d5 in QAction::activate (this=0x6868f0, event=<optimized out>)
at kernel/qaction.cpp:1260
#9 0x00007ffff773a0f9 in QMenuPrivate::activateCausedStack (this=0x792880, causedStack=...,
action=0x6868f0, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1028
#10 0x00007ffff77402d3 in QMenuPrivate::activateAction (this=0x792880, action=0x6868f0,
action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1120
#11 0x00007ffff7363599 in QWidget::event (this=0x790630, event=0x7fffffffa400)
---Type <return> to continue, or q <return> to quit---
at kernel/qwidget.cpp:8362
#12 0x00007ffff774192b in QMenu::event (this=0x790630, e=0x7fffffffa400) at widgets/qmenu.cpp:2469
#13 0x00007ffff7310cc4 in notify_helper (e=0x7fffffffa400, receiver=0x790630, this=0x60cd20)
at kernel/qapplication.cpp:4554
#14 QApplicationPrivate::notify_helper (this=0x60cd20, receiver=0x790630, e=0x7fffffffa400)
at kernel/qapplication.cpp:4526
#15 0x00007ffff7316e49 in QApplication::notify (this=<optimized out>, receiver=0x790630,
e=0x7fffffffa400) at kernel/qapplication.cpp:4097
#16 0x00007ffff6de35cc in QCoreApplication::notifyInternal (this=0x7fffffffafa0, receiver=0x790630,
event=0x7fffffffa400) at kernel/qcoreapplication.cpp:876
#17 0x00007ffff7311c82 in sendEvent (event=<optimized out>, receiver=<optimized out>)
at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#18 QApplicationPrivate::sendMouseEvent (receiver=0x790630, event=0x7fffffffa400, alienWidget=0x0,
nativeWidget=0x790630, buttonDown=0x0, lastMouseReceiver=..., spontaneous=true)
at kernel/qapplication.cpp:3165
#19 0x00007ffff738ccb4 in QETWidget::translateMouseEvent (this=0x790630, event=<optimized out>)
at kernel/qapplication_x11.cpp:4436
#20 0x00007ffff738b42a in QApplication::x11ProcessEvent (this=0x7fffffffafa0, event=0x7fffffffab20)
at kernel/qapplication_x11.cpp:3625
---Type <return> to continue, or q <return> to quit---
#21 0x00007ffff73b28fa in x11EventSourceDispatch (s=0x611d40, callback=0, user_data=0x0)
at kernel/qguieventdispatcher_glib.cpp:146
#22 0x00007ffff657d091 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#23 0x00007ffff657d840 in g_main_context_iterate.isra.21 () from /usr/lib64/libglib-2.0.so.0
#24 0x00007ffff657da49 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#25 0x00007ffff6e11a2f in QEventDispatcherGlib::processEvents (this=0x60e110, flags=...)
at kernel/qeventdispatcher_glib.cpp:424
#26 0x00007ffff73b259e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...)
at kernel/qguieventdispatcher_glib.cpp:204
#27 0x00007ffff6de23e2 in QEventLoop::processEvents (this=<optimized out>, flags=...)
at kernel/qeventloop.cpp:149
#28 0x00007ffff6de2637 in QEventLoop::exec (this=0x7fffffffaee0, flags=...) at kernel/qeventloop.cpp:204
#29 0x00007ffff6de7065 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#30 0x00000000004051a9 in main ()In data::loadFile() greifst du mehrfach ungeprüft (!) auf eine QStringList zu. Ich gehe fest davon aus, dass dein Inputfile Fehler enthält (sprich: die Anordnung der Zeichen enzspricht nicht dem, was das Programm erwartet).
Trotzdem ist dein _Programm_ fehlerhaft, da es nicht angemessen auf Unstimmigkeiten bei der Eingabe reagiert.