GNOME Bugzilla – Bug 794730
SIGSEGV when entering an exchange rate
Last modified: 2018-06-30 00:06:05 UTC
Created attachment 370197 [details] backtrace In 2.7.8, entering an exchange rate when posting an invoice in a foreign currency, the application crashes whith the attached backtrace.
In 2.7.6, it doesn't crash but the invoice is not posted properly (it's possible to enter a payment but the post button is still active and nothing appears in the A/R account of the currency).
Thanks for your report. However I can't reproduce it on my test system. Can you provide more detailed steps of what you did ? And perhaps a small sample file in which I can reproduce ?
Created attachment 370211 [details] Test case To reproduce, try to post invoice 000002
This smells rather like bug 794360. Have a look at https://github.com/Gnucash/gnucash/pull/319 for the discussion as Bob and I worked out the actual root cause.
2.7.8 includes PR 319 so that shouldn't happen, right?
nvm, I guess you meant it's the same kind of issue.
(In reply to François Guerraz from comment #6) > nvm, I guess you meant it's the same kind of issue. Exactly.
I feel like the crash and the accounting issue may be separate as the stable (GTK2) version doesn't crash but still doesn't post the invoice properly. 1) Should I open a separate issue? 2) Any idea of a workaround? I'm currently stuck not being able to invoice this customer....
*** Bug 794791 has been marked as a duplicate of this bug. ***
*** Bug 794823 has been marked as a duplicate of this bug. ***
Try this: diff --git a/gnucash/gnome-utils/dialog-transfer.c b/gnucash/gnome-utils/dialog-transfer.c index beab40a..13204f0 100644 --- a/gnucash/gnome-utils/dialog-transfer.c +++ b/gnucash/gnome-utils/dialog-transfer.c @@ -2054,8 +2054,8 @@ close_handler (gpointer user_data) gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW (dialog)); gtk_widget_hide (dialog); - gtk_widget_destroy (dialog); gnc_xfer_dialog_close_cb(GTK_DIALOG(dialog), xferData); + gtk_widget_destroy (dialog); g_free (to_info); to_info = NULL; g_free (from_info); It removes an assertion message in Debian Unstable.
Created attachment 370321 [details] Simpler Test Case Hello, I come from 794823. After messing around for an hour debugging the obfuscating script (that's quite outdated and doesn't work, btw) I finally managed to make a test case that's quite simpler. Steps to this testcase: - Open [Assets:1 - Local Currency Asset] - Make a transaction against [Expenses:Accounted in Local Currency] - Works fine. - Now open [Assets:2 - Foreign Currency Asset] - Make a transaction against [Expenses:Accounted in Local Currency] - Transfer Funds dialog opens - Do anything: OK, Cancel or close the window - Segfault.
Just tested John Ralls patch (comment 11), can confirm it fixes the issue.
So this patch fixes the crash indeed. But it's only part of the problem. As I mentioned, even with the stable version, with the test case I proposed, the invoice doesn't get posted and the transaction doesn't appear in the A/R.
FYI, the test-case is created using these instructions: https://lists.gnucash.org/pipermail/gnucash-user/2004-September/011572.html
Created attachment 370352 [details] [review] Fixes mismatch between post button and post function. I have a different result: The cross-currency invoice won't post and no transaction is created. I traced that to a couple of problems addressed in this patch. I've already pushed it, but if you're working from a tarball you might find it more convenient to apply it from here. Once that's patched I find that GnuCash unstable posts your invoice correctly with both splits present. Please test it on Arch.
I must be rubbish at expressing myself, but that's exactly what I meant, and your patch fixed it. Thanks a ton! If there's anything I can do to support the project (donation?) I'll be glad to contribute.
We don't really have much need for money. We need volunteers to write code, write documentation, translate, do publicity, help users on the mailing list and IRC, and recruit more volunteers.
volunteers can not work in full time to create good and stable software.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=794730. Please update any external references or bookmarks.