After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 582048 - gnucash 2.2.9 crashes when transfering money online in Germany
gnucash 2.2.9 crashes when transfering money online in Germany
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Import - AqBanking
2.2.9
Other All
: High critical
: ---
Assigned To: Christian Stimming
Christian Stimming
: 583320 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-05-10 10:17 UTC by Dr. Edgar Alwers
Modified: 2018-06-29 22:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
complete results of calling gnucash --logto /tmp/gnucash.trace (55.91 KB, text/plain)
2009-05-12 08:42 UTC, Dr. Edgar Alwers
  Details
stack trace with help of gdb (9.00 KB, text/plain)
2009-05-13 11:37 UTC, Dr. Edgar Alwers
  Details
Patch for gwenhyfar to use checked input box (368 bytes, patch)
2009-05-17 20:34 UTC, palfrey
committed Details | Review
Get a new "gui"... (684 bytes, patch)
2009-06-26 19:53 UTC, Patrick Beckmann
committed Details | Review

Description Dr. Edgar Alwers 2009-05-10 10:17:36 UTC
Steps to reproduce:
1. try to make a money transfer. Crashes always. See Newsgroups: gmane.comp.gnome.apps.gnucash.german. Date: 2009-03-17 20:05:31 GMT
2. 
3. 


Stack trace:
According to Christoph Brinkmann:
/var/log/messages:
[  855.383960] gnucash-bin[6415]: segfault at 00000000 eip 00000000 esp
bfccc0cc error 4



Other information:
Reports from Christoph Brinkmann et alt. 17.3.2009 to 4.5.2009
Linux from Scratch, Kernel 2.6.27.4
gwenhywfar-3.8.0
aqbanking-3.99.11rc5
Comment 1 palfrey 2009-05-11 11:39:51 UTC
Thanks for taking the time to report this bug.
Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 2 Dr. Edgar Alwers 2009-05-12 08:42:39 UTC
Created attachment 134473 [details]
complete results of calling gnucash --logto /tmp/gnucash.trace
Comment 3 Dr. Edgar Alwers 2009-05-12 08:57:25 UTC
The result from "gnucash --logto /tmp/gnucash.trace" is as follows:

* 10:12:37  WARN <aqhbci> jobmultitransfer.c:  315: No local name, filling in
* 10:12:37  CRIT <> jobmultitransfer.c:  488: Setting groupID to 43
* 10:12:37  CRIT <> jobmultitransfer.c:  668: Prepare function called
* 10:12:37  WARN <aqhbci> msgengine.c:  388: SystemId requested (deprecated)

The last lines from the text in the calling window are:
quote
-------------------------------
7:2009/05/12 10-12-37:gwen(2604):iorequest.c:  309: Request 0x88e3248 finished (                                            disconnect, 0/0, result=0)
7:2009/05/12 10-12-37:gwen(2604):libloader.c:   86: Loading library "/usr/lib/aq                                            banking/plugins/28/bankinfo/de"
7:2009/05/12 10-12-37:gwen(2604):libloader.c:   86: Loading library "/usr/lib/aq                                            banking/plugins/28/bankinfo/de.so"
7:2009/05/12 10-12-37:gwen(2604):directory_all.c:  300: Trying "/usr/share/ktobl                                            zcheck/bankdata.txt"
7:2009/05/12 10-12-37:gwen(2604):directory_all.c:  307: File "ktoblzcheck/bankda                                            ta.txt" found in folder "/usr/share"
7:2009/05/12 10-12-38:gwen(2604):iorequest.c:   81: Request 0x88cd570 created (r                                            ead, 1024)
7:2009/05/12 10-12-38:gwen(2604):iorequest.c:  309: Request 0x88cd570 finished (                                            read, 1024/1024, result=0)
7:2009/05/12 10-12-38:gwen(2604):iorequest.c:   81: Request 0x88cd570 created (d                                            isconnect, 0)
7:2009/05/12 10-12-38:gwen(2604):iorequest.c:  309: Request 0x88cd570 finished (                                            disconnect, 0/0, result=0)
Segmentation fault
bash-3.2$
-------------------------------
unquote

I included the complete text as attachment. The result of "gnucash --debug --logto /tmp/gnucash.trace" was more then 315000 lines long, I am afraid you did not want to see it. However, tell me if I can contribute more making special tests for you.
Thank you very much
Edgar
Comment 4 palfrey 2009-05-12 10:15:14 UTC
The log might be useful eventually, but for the moment we need a stack trace. Please see http://live.gnome.org/GettingTraces/Details#learn-about-stacktraces for details about what is and isn't a stack trace, and http://live.gnome.org/GettingTraces/Details#gdb-not-yet-running for details on how to get the stack trace.
Comment 5 Dr. Edgar Alwers 2009-05-13 11:35:42 UTC
Find attached "gnucash_trace" obtained running gdb
Comment 6 Dr. Edgar Alwers 2009-05-13 11:37:37 UTC
Created attachment 134559 [details]
stack trace with help of gdb
Comment 7 palfrey 2009-05-13 12:15:12 UTC
(Copying part of the gdb trace here for ease of searching later on)

  • #0 ??
  • #1 GWEN_Gui_GetPassword
    at gui.c line 430
  • #2 AH_User_InputPin
    at user.c line 1157
  • #3 AH_Msg_SignPinTan
    at msgcrypt_pintan.c line 249
  • #4 AH_Msg__Sign
    at msgcrypt.inc line 29
  • #5 AH_Msg_EncodeMsg
    at message.c line 534
  • #6 AH_JobQueue_ToMessage
    at jobqueue.c line 440
  • #7 AH_Outbox__CBox_SendAndRecvQueue
    at outbox.c line 701
  • #8 AH_Outbox__CBox_SendAndRecvSelected
    at outbox.c line 919
  • #9 AH_Outbox_Execute
    at outbox.c line 1472
  • #10 AH_Provider_Execute
    at provider.c line 770
  • #11 AB_Provider_Execute
    at provider.c line 342
  • #12 AB_Banking_ExecuteJobs
    at banking_online.c line 116
  • #13 gnc_ab_maketrans
    at gnc-ab-transfer.c line 240

Comment 8 palfrey 2009-05-13 12:20:23 UTC
Judging from the trace, it looks like the problem either lies in libgwenhywfar (http://gwenhywfar.sourceforge.net/) or the AqBanking module (http://www2.aquamaniac.de/sites/aqbanking/index.php), which are being used by a plugin of GnuCash, and neither of which are part of the Gnome project's bug tracking. 

http://www2.aquamaniac.de/sites/download/packages.php indicates that there are later versions of the libraries available, which may help you. Alternately, the aqbanking-devel forum might also help (http://sourceforge.net/mailarchive/forum.php?forum_name=aqbanking-devel)
Comment 9 Dr. Edgar Alwers 2009-05-13 20:32:48 UTC
Thank you Tom for all the help.
Unfortunatly, the bug is still alive after compiling GnuCash 2.2.9 with the latest versions of gwenhywfar ( Version 3.8.1 from 9.5.2009 ) and aqbanking ( Version 3.99.13rc7 )
GnuCash 2.2.9 does not work at the moment. I am going to forward this problem to the aqbanking people and see what happens..

Edgar
Comment 10 Dr. Edgar Alwers 2009-05-14 21:12:54 UTC
Hi Tom,
I forwarded the problem to the developers of aqbanking, as I promised. They came back with two arguments: the first one, aqbanking ( and gwenhywfar ) is  working smotly with three other applications, including online transfers and loads. This does not support the assumption, the problem must be on the aqbanking side. The second one should perhaps be followed: Could it be, that the GUI callbacks were not setted or that they are pointing to NIL ?
quote
-----------------------
[...]
> #1  0xb5d03a77 in GWEN_Gui_GetPassword (flags=0,
> token=0x8c3ea00 "PIN_67050505_12345678", title=0xb5b24452 "Enter PIN",
>     text=0xbf96bbac "Please enter the PIN for \nuser 12345678 at Sparkasse
> Rhein Neckar Nord\n<html>Please enter the PIN for user <i>12345678</i> at
> <i>Sparkasse Rhein Neckar Nord</i>.<br></html>", buffer=0xbf96bf2d "",
> minLen=4, maxLen=64,
>     guiid=0) at gui.c:430
[...]
-----------------------
unquote

Anyway, I would like to ask you, not to close this issue with status "resolved". Evidently, the problem persists, and both sides claim that the other side should  fix it.

By the way, GnuCash ( I consider it a very good financial program ) depends in a significant way on aqbanking and gwenhywfar. I think, a close relationship between the two developer teams before a new major version of one of the two systems is released could help to avoid bugs like the one we are now trying to fix. Do you agree ?

Again, thank you very much.
Edgar
Comment 11 palfrey 2009-05-15 12:19:33 UTC
(In reply to comment #10)
> aqbanking side. The second one should perhaps be followed: Could it be, that
> the GUI callbacks were not setted or that they are pointing to NIL ?

The problem is actually that GWEN_Gui_GetPassword assumes that if
GWEN_Gui_SetGetPasswordFn hasn't been called to set getPasswordFn,
then it assumes that GWEN_Gui_SetInputBoxFn has been called to set
inputBoxFn, which isn't true in this case. I've just forwarded a patch to fix this to the aqbanking-devel mailing list, but probably either GWEN_Gui_SetGetPasswordFn or GWEN_Gui_SetInputBoxFn needs to get called earlier on to make this properly usable.

> Anyway, I would like to ask you, not to close this issue with status
> "resolved". Evidently, the problem persists, and both sides claim that the
> other side should  fix it.

Now reopened.

> By the way, GnuCash ( I consider it a very good financial program ) depends in
> a significant way on aqbanking and gwenhywfar. I think, a close relationship
> between the two developer teams before a new major version of one of the two
> systems is released could help to avoid bugs like the one we are now trying to
> fix. Do you agree ?

I'd agree, but I'm not actually part of the GnuCash team, who may actually already have some relationship with aqbanking/gwenhywfar! I'm part of the BugSquad, and was just trying to triage this bug to figure out what the actual problem was, rather than leaving it to rot as unfortunately happens given the large number of bugs in Bugzilla. OTOH, we might be a bit closer to an actual fix here, and I do try and patch some stuff that I come across.
Comment 12 Dr. Edgar Alwers 2009-05-17 20:16:20 UTC
Hi Tom, 
thanks for your comment Nr. 11. I forwarded your diagnosis to Martin Preuss from aqbanking/gwenhywfar. He says ( I hope to translate acceptable ) " of course, all callbacks have to be set, as each one of them may be needed. They exists for this purpose "
I hope, the issue is more or less clear.

My 3 cents question: are you going to deliver a patch for gnucash, or should aqbanking deliver one ( or a new version ) for gwenhywfar/aqbanking, or should the gnucash people deliver a patched version ? I would very much appreciate a patch or a patched version I could test, rather then to wait for an oficial upgrade. What is the followup ? Who is supposed to improve the calls GWEN_Gui_SetGetPasswordFn or GWEN_Gui_SetInputBoxFn ?

Again, thank you very much for your help up to now.
Have a nice week !
Edgar
 
Comment 13 palfrey 2009-05-17 20:34:59 UTC
Created attachment 134832 [details] [review]
Patch for gwenhyfar to use checked input box

I've just attached the patch I sent to the aqbanking-devel list earlier (which bounced, due to my not being subscribed). This is for libgwenhyfar, and makes it use an error-checked version of the inputbox function. This *might* stop the crash, but if it does it'll most likely cause other functions to complain.

As Martin Preuss said, the callbacks need to be set, and this patch merely causes a function to return a "callback hasn't been set" value, rather than crashing, but that might not be vastly useful still, as no callback means nothing actually gets done... The problem is that I don't know what failed to set them, and that'll probably require one of the actual GnuCash developers to have a better look at things.

I'm going to re-send the patch to them at some point, but if the callbacks get properly set, then it won't really matter whether this patch gets applied or not.
Comment 14 Dr. Edgar Alwers 2009-05-18 20:21:21 UTC
Hi Tom,
> if the callbacks get properly set, then it won't really matter whether this    > patch gets applied or not.

Who should set the callbacks properly ? If, as I understand it, this is a question of the calling program  (GnuCash), then the developers of GnuCash should fix their program as soon as possible. It makes not sense to send a patch to the developers of gwenhywfar, as they may argue "do your task properly and fix gnucash, our system works correctly" On the other hand, if it is a gwenhywfar or aqbanking problem, I could ask Martin Preuss to help us fixing it. But for sure, we first need to get the one who should do the job. 

If gnucash is the one, could you inform the gnucash development team ? I do not know much of them. I am informing Martin Preuss.
I hope, we will get the cow out of the ice
Edgar
Comment 15 Phil Longstaff 2009-06-20 01:36:10 UTC
Set component to AqBanking
Comment 16 Phil Longstaff 2009-06-20 23:24:33 UTC
Comment on attachment 134832 [details] [review]
Patch for gwenhyfar to use checked input box

I'll apply it when I get the chance.
Comment 17 Phil Longstaff 2009-06-20 23:25:58 UTC
Comment on attachment 134832 [details] [review]
Patch for gwenhyfar to use checked input box

Hmmm  I need to read the file this applies to before I comment.
Comment 18 Christian Stimming 2009-06-21 18:49:18 UTC
Comment on attachment 134832 [details] [review]
Patch for gwenhyfar to use checked input box

A comparable patch has been committed to gwenhywfar as r1558, which will be included in the next gwenhywfar release (probably 3.9.1).

However, as comment#13 correctly said, even if this hopefully fixes the crash, it will give complaints about other issues. However, the callback in question is indeed set in gnucash (see src/import-export/aqbanking/gnc-gwen-gui.c line 320)
Comment 19 Dr. Edgar Alwers 2009-06-23 21:19:59 UTC
(In reply to comment #18)
> (From update of attachment 134832 [details] [review] [edit])
> A comparable patch has been committed to gwenhywfar as r1558, which will be
> included in the next gwenhywfar release (probably 3.9.1).
> 
> However, as comment#13 correctly said, even if this hopefully fixes the crash,
> it will give complaints about other issues. However, the callback in question
> is indeed set in gnucash (see src/import-export/aqbanking/gnc-gwen-gui.c line
> 320)
> 
Hallo Christian,

as fas as I got it, the patch aims to intercept the crash, asking for an error condition and landing the program soft. However, that does not solve the problem. The user needs a connection to the bank and not a message telling him that the connection failed. I thing the callbacks (not only one, according to Martin Preuss ) needs to be set, as you say, in gnucash.
Good luck and many thanks.
Edgar
Comment 20 Patrick Beckmann 2009-06-26 19:53:24 UTC
Created attachment 137440 [details] [review]
Get a new "gui"...

With this patch Gnucash gets a new "gui" before executing AB_Banking_ExecuteJobs(). So the callbacks are set again and can be used for a password entry.

With that I was able to transfer a single transaction. I did not test it in other cases.
Comment 21 Christian Stimming 2009-07-02 08:05:13 UTC
Committed as r18167 - thanks a lot! I hope this fixes the problem. Can anyone confirm?
Comment 22 Dr. Edgar Alwers 2009-07-05 19:35:52 UTC
I already added a comment yesterday, that seems gone with the wind !
So, again here: I can confirm, that the patch submitted by Patrick Beckmann works ! I could make transactions to my bank without problems. So thank you very much, Patrick, Christian and all the GnuCash manteiners for this work.

By the way, I patched version 2.3.1 and not 2.2.9.

Edgar
Comment 23 Christian Stimming 2009-09-21 08:50:02 UTC
*** Bug 583320 has been marked as a duplicate of this bug. ***
Comment 24 John Ralls 2018-06-29 22:21:25 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=582048. Please update any external references or bookmarks.