Errors when closing KMyMoney
Thomas Spuhler
thomas.spuhler at btspuhler.com
Thu Feb 25 23:13:08 UTC 2016
On Wednesday, February 24, 2016 07:23:15 PM Thomas Baumgart wrote:
> Hi Thomas,
>
> On Tuesday 23 February 2016 14:58:24 Thomas Spuhler wrote:
> > I got again an error (crash) when exiting KMyMoney
> >
> > Unknown account id 'A000101' in file
> > /home/iurt/rpmbuild/BUILD/kmymoney-4.7.2/kmymoney/mymoney/storage/mymoneys
> > eq accessmgr.cpp line 146
>
> Hmm, looks like the application is trying to access an account that is not
> present (anymore).
>
> What did you do before?
Entered data
> Can you try to take a look at the file (it's
> compressed XML) and see where the pattern A000101 is referenced?
This is the section of the cpp file:
/**
* This method is used to get a SQL reader for subsequent database access
*/
KSharedPtr <MyMoneyStorageSql> MyMoneySeqAccessMgr::connectToDatabase
(const KUrl& /*url*/)
{
return KSharedPtr <MyMoneyStorageSql>();
}
bool MyMoneySeqAccessMgr::isStandardAccount(const QString& id) const
{
return id == STD_ACC_LIABILITY
|| id == STD_ACC_ASSET
|| id == STD_ACC_EXPENSE
|| id == STD_ACC_INCOME
|| id == STD_ACC_EQUITY;
}
void MyMoneySeqAccessMgr::setAccountName(const QString& id, const QString&
name)
{
if (!isStandardAccount(id))
throw MYMONEYEXCEPTION("Only standard accounts can be modified using
setAccountName()");
MyMoneyAccount acc = m_accountList[id];
acc.setName(name);
m_accountList.modify(acc.id(), acc);
}
const MyMoneyAccount MyMoneySeqAccessMgr::account(const QString& id) const
{
// locate the account and if present, return it's data
if (m_accountList.find(id) != m_accountList.end())
return m_accountList[id];
// throw an exception, if it does not exist
QString msg = "Unknown account id '" + id + '\'';
throw MYMONEYEXCEPTION(msg);
}
>
> This is very strange.
--
Best regards
Thomas Spuhler
All of my e-mails have a valid digital signature
ID 60114E63
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney/attachments/20160225/d825ffa1/attachment.sig>
More information about the KMyMoney
mailing list