Bug 497174

Summary: configure aqbanking w/o customerID crashes KMyMoney
Product: [Applications] kmymoney Reporter: Heiko Zinke <bugs.kde.org>
Component: onlinebankingAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED UPSTREAM    
Severity: crash CC: sebastian
Priority: NOR    
Version First Reported In: 5.1.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: crash file

Description Heiko Zinke 2024-12-07 18:59:07 UTC
Created attachment 176423 [details]
crash file

SUMMARY
Configure aqbanking without a customerID crashes KMyMoney. It's most likely an aqbanking bug (AH_User_SetSelectedTanMethod: Assertion `u' failed).
But KMyMoney should not crash. 

STEPS TO REPRODUCE
1. have a vanilla KMyMoney installation, no ~/.aqbanking folder
2. click settings -> configure aqbanking -> create user
3. select hbci aqbanking
4. setup pin/tan
5. fill in a valid bank code (12030000), bank name (DKB), server url (https://fints.dkb.de/fints)
6. fill in a valid user name and user id, keep customer id blank!
7. accept certificate
8. fill in a valid pin
9. select a tan method (e.g. chiptan)

OBSERVED RESULT
KMyMoney crashes

[17180:6:1207/195019.351202:ERROR:command_buffer_proxy_impl.cc(141)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
7:2024-12-07 19:50:22:aqhbci started
7:2024-12-07 19:50:22:aqpaypal started
3:2024-12-07 19:50:24:gwenhywfar pathmanager.c:   85: Path "aqhbci/xmldatadir" already exists
7:2024-12-07 19:50:24:aqhbci stopped
3:2024-12-07 19:50:24:gwenhywfar dialog.c:  723: Widget [hbciInitChipcardRadio] not found
3:2024-12-07 19:51:20: cppgui.cpp:  141: CppGuiLinker::OpenDialog
4:2024-12-07 19:51:20:gwenhywfar syncio_tls.c:  137: No checkCertFn set, using GWEN_GUI
kmymoney: user.c:1854: AH_User_SetSelectedTanMethod: Assertion `u' failed.
KCrash: Application 'kmymoney' crashing...
KCrash: Attempting to start /usr/lib/drkonqi

EXPECTED RESULT
KMyMoney should give me a reasonable error message if something in the backend fails. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Leap 15.6
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
aqbanking-config --vstring
6.5.12

gwenhywfar-config --vstring
5.11.2
Comment 1 Jack 2025-10-12 15:53:15 UTC
Does this now work with the latest versions?  I don't know if OpenSuse provide 5.2.1, but if not, you can try Appimage, Snap, or Flatpak.
Comment 2 Thomas Baumgart 2025-10-13 13:58:39 UTC
I think I fixed this upstream in AqBanking. This is incorporated into versions 6.5.12 and above (current is 6.6.4). I therefore close it here as fixed upstream.

Here's the commit message:

> Fix crash when function is called without user
> 
> Changes made in commit 964e0a3d cause dlg_edituserpintan::_fromGui to be
> called without a user to check the data in the dialog for validity. This
> causes the following crash due to usage of NULL pointer:
> 
> kmymoney: user.c:1213: void AH_User_SetHttpVMajor(AB_USER *, int):
> Zusicherung »u« nicht erfüllt.
> 
> Also, in some erroneous cases, the return code is not provided when the
> quiet mode (no GUI activity) is selected.
> 
> This change corrects all of the above.