Bug #2167

Application crash on attempt to load txt.gz file from GUI

Added by dmitry over 1 year ago. Updated over 1 year ago.

Status:ResolvedStart date:24 Sep 2018
Priority:NormalDue date:
Assignee:juan% Done:

100%

Category:-Estimated time:0.50 hour
Target version:Sprint 39

Description

To reproduce:
1. Open BornAgain GUI
2. Switch to import view
3. Import file mg6a_Merged.txt.gz (attached)

mg6a_Merged.txt.gz (8.99 KB) dmitry, 24 Sep 2018 10:51

GIGO-CsvImportAssistant.png (98.9 KB) juan, 25 Sep 2018 12:16

History

#1 Updated by pospelov over 1 year ago

Found the same while trying to load corrupted *.int.gz file

First, it tries to read in ImportDataUtils::ImportData in method IntensityDataIOFactory::readOutputData.
Exception is thrown (error in gzip), then it is caught, control is passed to CsvImportAssistant.
CvsImportDataAssistand then fails silently in guessSeparator. See stack below.

1   std::istream::get(char&)                                                                                                                                                                                                         0x7fffefcbee57 
2   CsvImportAssistant::guessSeparator                                                                                                                                                               CsvImportAssistant.cpp      505 0x7ffff750d470 
3   CsvImportAssistant::createFileDetailsLayout                                                                                                                                                      CsvImportAssistant.cpp      118 0x7ffff750a5e8 
4   CsvImportAssistant::createLayout                                                                                                                                                                 CsvImportAssistant.cpp      89  0x7ffff750a1e9 
5   CsvImportAssistant::CsvImportAssistant                                                                                                                                                           CsvImportAssistant.cpp      50  0x7ffff7509e84 
6   ImportDataUtils::UseImportAssistant                                                                                                                                                              ImportDataUtils.cpp         83  0x7ffff751537d 
7   ImportDataUtils::ImportData                                                                                                                                                                      ImportDataUtils.cpp         73  0x7ffff75151e8 
8   RealDataSelectorActions::onImportDataAction                                                                                                                                                      RealDataSelectorActions.cpp 120 0x7ffff752f6b5 
9   QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (RealDataSelectorActions:: *)()>::call(void (RealDataSelectorActions:: *)(), RealDataSelectorActions *, void * *) qobjectdefs_impl.h          134 0x7ffff7532d1e 
10  QtPrivate::FunctionPointer<void (RealDataSelectorActions:: *)()>::call<QtPrivate::List<>, void>(void (RealDataSelectorActions:: *)(), RealDataSelectorActions *, void * *)                       qobjectdefs_impl.h          167 0x7ffff7532cb0 
11  QtPrivate::QSlotObject<void (RealDataSelectorActions:: *)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *)                                      qobjectdefs_impl.h          396 0x7ffff7532c1a 
12  QMetaObject::activate(QObject *, int, int, void * *)                                                                                                                                                                             0x7ffff01d9af6 
13  QAbstractButton::clicked(bool)                                                                                                                                                                                                   0x7ffff1476512 
14  QAbstractButtonPrivate::emitClicked()                                                                                                                                                                                            0x7ffff1476714 
15  QAbstractButtonPrivate::click()                                                                                                                                                                                                  0x7ffff14782ae 
16  QAbstractButton::mouseReleaseEvent(QMouseEvent *)                                                                                                                                                                                0x7ffff1478405 
17  QToolButton::mouseReleaseEvent(QMouseEvent *)                                                                                                                                                                                    0x7ffff1556e9a 
18  QWidget::event(QEvent *)                                                                                                                                                                                                         0x7ffff13ce708 
19  QToolButton::event(QEvent *)                                                                                                                                                                                                     0x7ffff1556f69 
20  QApplicationPrivate::notify_helper(QObject *, QEvent *)                                                                                                                                                                          0x7ffff1391eac 
... <More>                                                                                                                                                                                                                                          

#2 Updated by juan over 1 year ago

My fault, sorry -- A cast of a char-to-int was made instead of char-to-unsigned.
Now I've corrected it in my CsvImportAssistant branch and the widget displays without crashing the stream that is being passed --"Garbage in Garbage out" (see figure).

#3 Updated by juan over 1 year ago

  • Target version changed from Sprint 38 to Sprint 39

#4 Updated by juan over 1 year ago

  • Status changed from Sprint to Resolved

Also available in: Atom PDF