r22087 - gnucash/trunk/src/import-export - Bug #672161: Fix double-free error when importer dialog is canceled
Christian Stimming
cstim at code.gnucash.org
Fri Mar 16 16:26:36 EDT 2012
Author: cstim
Date: 2012-03-16 16:26:36 -0400 (Fri, 16 Mar 2012)
New Revision: 22087
Trac: http://svn.gnucash.org/trac/changeset/22087
Modified:
gnucash/trunk/src/import-export/import-main-matcher.c
Log:
Bug #672161: Fix double-free error when importer dialog is canceled
Patch by Robert Fewell:
There is an existing problem with the main matcher which can causes the
following errors if you have the relevant account register open:
CRIT <qof> qof_instance_get_editlevel: assertion `QOF_IS_INSTANCE(ptr)' failed
This is caused when you decide to not add all the transactions displayed on the
matcher dialog and then the system trying to delete the temporary transaction
twice. I think this patch comments out the offending lines, if correct I will
provide a patch to remove them.
The error below is only seen when the relevant account register is open and in
the preferences you have double line mode enabled. Not sure how it gets fired,
probably part of the register update process but it is because we do not have a
valid transaction any more.
CRIT <gnc.engine> xaccTransGetVoidReason: assertion `trans' failed
The function concerned is gnc_split_register_get_vnotes_entry and could be
solved by adding the following but not sure if this is a valid fix.
if(trans == NULL)
return g_strdup('\0');
else
return xaccTransGetVoidReason(trans);
Modified: gnucash/trunk/src/import-export/import-main-matcher.c
===================================================================
--- gnucash/trunk/src/import-export/import-main-matcher.c 2012-03-16 20:26:22 UTC (rev 22086)
+++ gnucash/trunk/src/import-export/import-main-matcher.c 2012-03-16 20:26:36 UTC (rev 22087)
@@ -189,8 +189,8 @@
/* transaction skipped -> destroy
* Otherwise temporary transactions remains visible if account is open
* (see gnc_import_process_trans_item() case GNCImport_CLEAR) */
- xaccTransDestroy(gnc_import_TransInfo_get_trans(trans_info));
- xaccTransCommitEdit(gnc_import_TransInfo_get_trans(trans_info));
+/*FIXME xaccTransDestroy(gnc_import_TransInfo_get_trans(trans_info));
+ xaccTransCommitEdit(gnc_import_TransInfo_get_trans(trans_info)); */
}
}
@@ -200,7 +200,7 @@
/* DRH: Is this necessary. Isn't the call to trans_list_delete at
the end of this routine going to destroy the entire list store
anyway? */
- for (item = refs_list; item; item = g_slist_next(item))
+/*FIXME for (item = refs_list; item; item = g_slist_next(item))
{
ref = item->data;
path = gtk_tree_row_reference_get_path(ref);
@@ -209,7 +209,7 @@
gtk_tree_path_free(path);
gtk_tree_row_reference_free(ref);
}
- g_slist_free(refs_list);
+ g_slist_free(refs_list); */
gnc_gen_trans_list_delete (info);
/* DEBUG ("End") */
More information about the gnucash-changes
mailing list