https://bugs.kde.org/show_bug.cgi?id=406488

--- Comment #1 from skierpage <skierp...@gmail.com> ---
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."

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to