mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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); git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22087 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
c6141acc5a
commit
59aba947d7
@ -189,8 +189,8 @@ on_matcher_ok_clicked (GtkButton *button,
|
||||
/* 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 @@ on_matcher_ok_clicked (GtkButton *button,
|
||||
/* 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 @@ on_matcher_ok_clicked (GtkButton *button,
|
||||
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") */
|
||||
|
Loading…
Reference in New Issue
Block a user