GnuCash OFX account setup crashes with assertion failure

Bug #351189 reported by cdurst
4
Affects Status Importance Assigned to Milestone
libaqbanking (Debian)
Fix Released
Unknown
libaqbanking (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Karmic by Micha Lenk

Bug Description

Binary package hint: libaqbanking20-plugins-qt

This applies to both Ubuntu 8.04 and 8.10, (ever since Ubuntu shipped aqconnect).

It worked in GnuCash 2.2.1 (aqbanking-3.99.6beta built from source).
It fails on gnucash-2.2.6 (libaqbanking20-3.5.1-1).

The problem:
It crashes while setting up an online banking account, following the instructions in "Setting up OFXDirectConnect in GnuCash 2" (http://wiki.gnucash.org/wiki/Setting_up_OFXDirectConnect_in_GnuCash_2).

I start the aqBanking wizard (with Tools-> Online Baking Setup),
I then "Start AqBanking Wizard",
I select the "Users" tab,
I bring up the dialog to create a "New" user,
I fill in all the data. Note that as far as I can tell, it crashes before it even tries to log in, so you probably don't need a valid account to test this.

For example, in the "General" tab:
   User Settings
      User Name: anything
      User Id: (my DiscoverCard login id)
      Customer Id: (same as the User ID)
   Bank Settings
      Country: United States of America
      Bank Id: 7101
In the OFX tab:
   Bank Settings
      FID: 7101
      ORG: Discover Financial Services
      Broker Id: (leave blank)
   Connection Settings
      Server URL: https://ofx.discovercard.com/
   Server Options
      Supports Account List Download (SELECT)
      Supports Statement Download (SELECT)
      Force SSLv3 (SELECT)
      (Leave all others blank)
   Expert Settings (Leave alone)

Then press the "Get Accounts" button and it will crash with messages like this:
   aqbanking(14182):qbanking.cpp: 420: No Qt translation found for your language en
   gwen(14182):dbrw.c: 963: open(/home/user/.aqbanking/shared/qbanking/settings.conf, O_RDONLY): No such file or directory
   qt3_wizard(14182):qbcfgtabpageusers.cpp: 149: Selected backend: aqofxconnect
   qt3-wizard: buffer.c:987: GWEN_Buffer_AppendString: Assertion `buffer' failed.

For many months I've tried everything I could think of. I Googled every combination I could think of, I tried out various updates, I downloaded the source, compiled it myself, and even tried debugging it with GDB. The assertion failure seemed to happen when it tried to access a "user" field while attempting to construct the message to send to the banking site (from what I can remember).

Today I found a workaround.

Do not push the "Get Accounts" button while setting up a "New User". Instead, hit the "OK" button to finish user creation, then select that new User from the "Configuration" dialog, edit the user using the "Edit" button, switch back to the "OFX" tab you were on a moment ago, and now hit the "Get Accounts" button.

It looks like the "Get Accounts" button is ignoring the current entries in the "User Configuration" dialog, and only using the entries that have previously been saved out to the overall "Configuration" dialog.

cdurst (cdurst)
description: updated
Revision history for this message
Micha Lenk (micha) wrote :

Can you please re-try to reproduce this bug with a more recent version of libaqbanking20?

Revision history for this message
balak (balak) wrote :

First of all, thank you cdurst for this bug report and the work-around. I was dealing with this problem for several days and finally stumbled upon the solution through a google search.

I see the same issue in ubuntu intrepid (amd64). Here are the appropriate versions of gnucash and libaqbanking:
 dpkg -l | grep gnucash
ii gnucash 2.2.6-2ubuntu3 A personal finance tracking program
ii gnucash-common 2.2.6-2ubuntu3 A personal finance tracking program
ii gnucash-docs 2.2.0-3 Documentation for gnucash, a personal financ

$ dpkg -l | grep libaqbank
ii libaqbanking-data 3.5.1-1 configuration files for libaqbanking
ii libaqbanking-plugins-libgwenhywfar47 3.5.1-1 library for online banking applications plug
ii libaqbanking20 3.5.1-1 library for online banking applications
ii libaqbanking20-plugins 3.5.1-1 plugins needed by libaqbanking20
ii libaqbanking20-plugins-qt 3.5.1-1 plugins needed by libaqbanking20

These are latest version in the repositories. If you would like me to try out the newer versions, can you point me how/where to get them.

Thanks!

Revision history for this message
Micha Lenk (micha) wrote :

balak, apparently you found a solution. How did you solve the problem?

This bug is very likely related to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505509

Can you please confirm that a newer libaqbanking version fixes the problem?

Regards
  Micha

Revision history for this message
balak (balak) wrote :

Micha, I read through the debian bug. Yes, this is the same issue as mentioned in the other bug report.

The workaround was described by cdurst. Once you enter all the information to the wizard, don't use the "Get Accounts" buttton but close it by pressing 'OK'. The accounts can be retreived later on by "edit"ing the same user and using the "Get Accounts"

Can you let me know how to get the new version of libaqbanking (for ubuntu intrepid). Thanks!

Revision history for this message
Micha Lenk (micha) wrote :

I've just triaged this bug with libaqbanking 4.1.0 on Debian Lenny. Whereas the particular bug described in Debian bug #505509 seems to be fixed, there is apparently another one, leading to a segfault too:

3:2009/08/05 12-42-29:aqbanking(7474):qbanking.cpp: 420: No Qt translation found for your language C
3:2009/08/05 12-42-36:qt3_wizard(7474):qbcfgtabpageusers.cpp: 165: Selected backend: aqofxconnect
qt3-wizard: cfgdir.c:284: GWEN_ConfigMgrDir_AddGroupFileName: Assertion `subGroupName' failed.
Aborted

I will investigate this and report back later.

Changed in libaqbanking (Ubuntu):
status: New → Confirmed
Revision history for this message
Micha Lenk (micha) wrote :

I've triaged it again with AqBanking current trunk from upstream SVN (rev. 1729) and still got a segfault. The console output is on the previous message. The backtrace is:

#0 0xb7f80424 in __kernel_vsyscall ()
#1 0xb73d0640 in raise () from /lib/i686/cmov/libc.so.6
#2 0xb73d2018 in abort () from /lib/i686/cmov/libc.so.6
#3 0xb73c95be in __assert_fail () from /lib/i686/cmov/libc.so.6
#4 0xb6ea710c in GWEN_ConfigMgrDir_AddGroupFileName (cfg=0x8991970, groupName=0xb7ed5298 "users", subGroupName=0x0, nbuf=0x8a0d4e0)
    at cfgdir.c:284
#5 0xb6ea77aa in GWEN_ConfigMgrDir_LockGroup (cfg=0x8991970, groupName=0xb7ed5298 "users", subGroupName=0x0, guiid=0) at cfgdir.c:446
#6 0xb7e1d0bf in GWEN_ConfigMgr_LockGroup (mgr=0x336e, groupName=0xb7ed5298 "users", subGroupName=0x0, guiid=0) at configmgr.c:277
#7 0xb7e9929b in AB_Banking_BeginExclUseUser (ab=0x89901b0, u=0x89cff80, guiid=0) at banking_cfg.c:1077
#8 0xb7f0f6de in AB_Banking::beginExclUseUser (this=0x898ff68, u=0x89cff80, guiid=0) at banking.cpp:486
#9 0xb7f3867c in QBEditUser::fromGui (this=0xbfd98f50) at qbedituser.cpp:90
#10 0xb7f389f0 in QBEditUser::editUser (kb=0x898ff68, u=0x89cff80, parent=0x8a8e898) at qbedituser.cpp:128
#11 0xb7f36268 in QBCfgTabPageUsers::slotUserNew (this=0x8a8e898) at qbcfgtabpageusers.cpp:186
#12 0xb7f36e0d in QBCfgTabPageUsers::qt_invoke (this=0x8a8e898, _id=46, _o=0xbfd99214) at qbcfgtabpageusers.moc:98
#13 0xb78c11aa in QObject::activate_signal (this=0x8a95e00, clist=0x8a96bc0, o=0xbfd99214) at kernel/qobject.cpp:2359
#14 0xb78c36cb in QObject::activate_signal (this=0x8a95e00, signal=4) at kernel/qobject.cpp:2328
#15 0xb7c2645c in QButton::clicked (this=0x8a95e00) at .moc/release-shared-mt/moc_qbutton.cpp:152
#16 0xb795b300 in QButton::mouseReleaseEvent (this=0x8a95e00, e=0xbfd995f4) at widgets/qbutton.cpp:839
#17 0xb78fb727 in QWidget::event (this=0x8a95e00, e=0xbfd995f4) at kernel/qwidget.cpp:4705
#18 0xb785c7c5 in QApplication::internalNotify (this=0xbfd99e00, receiver=0x8a95e00, e=0xbfd995f4) at kernel/qapplication.cpp:2638
#19 0xb785d9e2 in QApplication::notify (this=0xbfd99e00, receiver=0x8a95e00, e=0xbfd995f4) at kernel/qapplication.cpp:2424
#20 0xb77f6fbe in QApplication::sendSpontaneousEvent (receiver=0x8a95e00, event=0xbfd995f4) at kernel/qapplication.h:526
#21 0xb77f3f21 in QETWidget::translateMouseEvent (this=0x8a95e00, event=0xbfd998e8) at kernel/qapplication_x11.cpp:4347
#22 0xb77f3334 in QApplication::x11ProcessEvent (this=0xbfd99e00, event=0xbfd998e8) at kernel/qapplication_x11.cpp:3524
#23 0xb7806e2c in QEventLoop::processEvents (this=0x89a8a08, flags=<value optimized out>) at kernel/qeventloop_x11.cpp:195
#24 0xb78751a0 in QEventLoop::enterLoop (this=0x89a8a08) at kernel/qeventloop.cpp:201
#25 0xb785cdcf in QApplication::enter_loop (this=0xbfd99e00) at kernel/qapplication.cpp:2796
#26 0xb7a5415d in QDialog::exec (this=0xbfd99b0c) at dialogs/qdialog.cpp:435
#27 0xb7f1915f in QBCfgTab::exec (this=0xbfd99b0c) at qbcfgtab.cpp:191
#28 0xb7f11668 in QBanking::setupDialog (this=0x898ff68, parent=0x0) at qbanking.cpp:681
#29 0x080492cc in main (argc=Cannot access memory at address 0x336e
) at qt3_wizard.cpp:93

Revision history for this message
Micha Lenk (micha) wrote :

I've reported the new issue as a separate Debian bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=540114

Changed in libaqbanking (Debian):
status: Unknown → Fix Released
Revision history for this message
Micha Lenk (micha) wrote :

Switch to the most recent bug about this.
debbugs #505509 is fixed by the upload of libaqbanking 4.1.0-2ubuntu1 to Ubuntu Karmic.
debbugs #540114 is still an outstanding issue which needs a fix in Ubuntu Karmic.

Changed in libaqbanking (Debian):
status: Fix Released → Unknown
Micha Lenk (micha)
Changed in libaqbanking (Ubuntu):
status: Confirmed → Fix Released
status: Fix Released → Confirmed
Changed in libaqbanking (Debian):
status: Unknown → Fix Released
Revision history for this message
Micha Lenk (micha) wrote :

A fix has recently been accepted in Ubuntu karmic.
Debian bug 540114 is LP: 351189.

libaqbanking (4.1.2-1) unstable; urgency=low

  * New upstream release
    + fixes OFX account setup crash (closes: #540114).

libaqbanking (4.1.1-1) unstable; urgency=low

  * New upstream release
    + builds with GCC 4.4 now (closes: #537675)
    + drop patch 01_print_bugfix_538017 (included upstream) and dpatch.
  * Build-dep on libgwenhywfar47-dev >= 3.10.0 as required by ./configure.
  * Add new symbol AH_Provider_SendUserKeys2 to debian/libaqhbci16.symbols.
  * Remove obsolete (symbols file available) file debian/libaqbanking29.shlibs.
  * debian/rules: Add -X/usr/lib/aqbanking/plugins to dh_makeshlibs call
    to avoid the useless call to ldconfig reported by lintian.
  * Package is compliant to Debian policy version 3.8.3 (no changes needed).

libaqbanking (4.1.0-3) unstable; urgency=low

  * Add dpatch to build system and add patch 01_print_bugfix_538017:
    Fixes infinite recursion on INI letter printing (closes: #538017).
  * Let aqbanking-tools depend on libaqbanking29-plugins.

Changed in libaqbanking (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.