| Summary: | crash importing a CSV | ||
|---|---|---|---|
| Product: | [Applications] skrooge | Reporter: | skierpage <info> |
| Component: | general | Assignee: | Stephane MANKOWSKI <stephane> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | stephane |
| Priority: | NOR | Keywords: | drkonqi |
| Version First Reported In: | unspecified | ||
| Target Milestone: | 25.1.0 | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/skrooge/e3d977287c660e826ae8470e698a35515a9fcc39 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
skierpage
2019-04-13 00:36:37 UTC
I narrowed the problem is. My bank inserts extra lines of text in the CSV file *after* the row of column header labels, e.g.: "Date","Type","Number","Payee","Withdrawal (-)","Amount" "Pending Transactions are not reflected within this sort criterion." "Posted Transactions" "12/31/2018","INTADJUST","","Interest Paid","","$2.51" ... The first bogus extra line (2) triggers the segfault in QChar::isSpace() in comment 0. The second bogus extra line (3) causes a different segfault in QArrayData::data(), but the rest of the backtrace is about the same. The workaround is to delete anything after the line of column headers that doesn't exactly match the layout they specify. It would be nice if Skrooge didn't crash and displayed a brown warning message such as "Invalid lines 2,3 in CSV file ignored." (There are already other errors in import that appear in trace output but are not shown to the user, such as "Date format not supported" and "Columns date and amount not found. Set import parameters in settings (Configure Skrooge... / Import/Export / CSV / Edit regular expressions...)" Another fix would be to document this limitation in the Skrooge handbook under CSV import: "The CSV file must contain a line of column header labels and Skrooge must be able to find Date and Amount columns in it (you can see and modify the label matching in Settings > Configure Skrooge... > Import/Export > CSV > Edit regular expressions...). All the lines in the CSV file after this line of column header labels must match its format." Git commit e3d977287c660e826ae8470e698a35515a9fcc39 by Stephane MANKOWSKI. Committed on 13/04/2019 at 21:12. Pushed by smankowski into branch 'master'. crash importing a CSV M +1 -0 CHANGELOG M +15 -10 plugins/import/skrooge_import_csv/skgimportplugincsv.cpp A +4 -0 tests/input/skgtestimportcsv/406488.csv M +22 -0 tests/skgbankmodelertest/skgtestimportcsv.cpp https://commits.kde.org/skrooge/e3d977287c660e826ae8470e698a35515a9fcc39 |