The crash of KMM seems to happen every time, at least with one particular account. I get Segmentation fault (core dumped) but with no other detail.
(In reply to allan from comment #0) > The crash of KMM seems to happen every time, at least with one particular > account. I get Segmentation fault (core dumped) > but with no other detail. The Segmentation fault (core dumped) is not related to this problem, but seems to occur whenever KMM is closed. The main problem here was triggered by resource file content for this account, which I have now removed. What actually caused the crash looks to be an out of bounds index, but unfortunately I'm not familiar with the logic here.
I think I can see what has happened. I have created a profile for one of my banks, but I have more than one account there. The checking account has one column for the Amount, whereas the savings account has columns for both credits and debits. The latter therefore has more columns, and the column numbers from this account were saved in the resource file. If now a checking account is loaded, the saved column details will include more columns than in the checking file. Therefore, the result is that an attempt is made to access a nonexistent column, and an out-of-bounds index is generated. This happens circa line 576-578 in bankingwizardpage.cpp - if (!memo.isEmpty()) memo.append(QChar(QLatin1Char('\n'))); memo.append(m_columnList[m_wiz->m_memoColList[i]]); I have inserted if (m_wiz->m_memoColList[i] < m_columnList.count()) // avoid out of bounds before the last line to avoid it going out of bounds. This avoids the problem, but an additional profile will be needed to cover the different formats. Has anyone else a more elegant solution?
Totally unconnected, but I previously reported that I'd noticed the following - "QObject::connect: No such signal FormatsPage::statementReady(MyMoneyStatement&) QObject::connect: (sender name: 'FormatsPage') QObject::connect: (receiver name: 'csvimport') KMyMoneyPlugin::KMMStatementInterface::import start Updating account in MyMoneyStatementReader::startImport failed Importing statement for '' Importing statement for '' done QObject::connect: No such signal FormatsPage::statementReady(MyMoneyStatement&) QObject::connect: (sender name: 'FormatsPage') QObject::connect: (receiver name: 'csvimport') KMyMoneyPlugin::KMMStatementInterface::import start" A single line needed to be edited, which I've done in the code for this bug. Do I need to raise a separate bug or add it to this one? I can add the two fixes as an attachment here.
(In reply to allan from comment #1) > (In reply to allan from comment #0) > > The crash of KMM seems to happen every time, at least with one particular > > account. I get Segmentation fault (core dumped) > > but with no other detail. > > The Segmentation fault (core dumped) is not related to this problem, but > seems to occur whenever KMM is closed. In connection with this crash on exiting, which happens every time, I've just noticed a little more detail, which I had not noticed previously. "QXcbConnection: XCB error: 3 (BadWindow), sequence: 19563, resource id: 35699775, major code: 40 (TranslateCoords), minor code: 0 Segmentation fault (core dumped) " It means little to me, but most likely one of the devs will have a clue.
Based on comment #2: Different CSV files structures (amount input vs debit/credit input) require different importing profiles. It's not a bug if you import CSV file with wrong import profile.
(In reply to NSLW from comment #5) > Based on comment #2: > Different CSV files structures (amount input vs debit/credit input) require > different importing profiles. It's not a bug if you import CSV file with > wrong import profile. That is obviously the case. However, if it results in a crash, is that also not a bug? I'm not happy to leave this so and am reopening the bug.
Git commit 26f156543002b704d656b57764bcf3c87c2514c5 by Łukasz Wojniłowicz, on behalf of Allan Anderson. Committed on 22/01/2017 at 14:39. Pushed by wojnilowicz into branch 'master'. Don't go out of bounds of m_columnList FIXED-IN: 5.0 Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> M +2 -1 kmymoney/plugins/csvimport/bankingwizardpage.cpp M +2 -1 kmymoney/plugins/csvimport/investmentwizardpage.cpp https://commits.kde.org/kmymoney/26f156543002b704d656b57764bcf3c87c2514c5