[GNC] Call of Import Map Editor leads to crash of gnucash

Peter Zimmerer pkzw at web.de
Mon Feb 3 14:29:02 EST 2020


Hi all,

inspired by a thread at the German gnucash mailing list I tried to use
the Import Map Editor. Unfortunately, this led to a crash of gnucash.
Standard output has shown the following error message:

terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr: __pos (which is 17) > this->size()
(which is 16)

The abort is triggered within function parse_bayes_imap_info (source
file gnucash/libgnucash/engine/Account.cpp) and is caused by entries
within the mapping data (table SLOTS) with value NAME = 'import-map-bayes'.

Beside such entries there are a lof of other mapping entries which don
not match the pattern (regular expression)
'^import-map-bayes/.*/[0-9a-f]{32}$'. I suppose, those are mappings,
which have been created by an older version of gnucash and which have
not been migrated/converted by an upgrade of gnucash in the meantime.
They also do not refer to an existing gnucash account with their
OBJ_GUID but they refer to another SLOTS entry instead.

If I create a new gnucash file/book and create new mappings by getting
transactions from my bank only "flat" mappings with account guids are
created.

My gnucash data is stored within a postgres database. I would try to get
rid of the old mappings with the help of the following SQL command:

delete from slots
where
  name     =      'import-map-bayes'       or
  name     like   'import-map-bayes/%' and
  obj_guid not in (select guid from accounts)

Could somebody confirm this or propose an alternative procedure to
repair the gnucash file?

Thank you very much in advance!

Regards,
Peter


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20200203/2845a96f/attachment.sig>


More information about the gnucash-user mailing list