Bug 451677 - crashes on new category with a double colon
Summary: crashes on new category with a double colon
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Unclassified
Component: general (show other bugs)
Version: 5.1.2
Platform: Debian testing Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-19 08:24 UTC by Joao Matos
Modified: 2022-07-01 10:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.1.3


Attachments
backtrace of the crash (1.75 KB, text/plain)
2022-03-19 08:24 UTC, Joao Matos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joao Matos 2022-03-19 08:24:24 UTC
Created attachment 147591 [details]
backtrace of the crash

SUMMARY
***
Looks similar to this one that was fixed on the CVS importer code
https://marc.info/?l=kmymoney-devel&m=161617380432300&w=2
https://bugs.kde.org/show_bug.cgi?id=434605

STEPS TO REPRODUCE
right click 'Expense'; 'New category'; add a new category: name it anything with a double colon like 1::1 or a::a


OBSERVED RESULT
Crashes and leaves a window with the following message: 
"Account has no name ./kmymoney/mymoney/mymoneyfile.cpp:939"

EXPECTED RESULT
a category with name with a double colon eg a::a

SOFTWARE/OS VERSIONS
See below debian bug report

ADDITIONAL INFORMATION
debian bug report
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1007871
Comment 1 Thomas Baumgart 2022-03-19 16:49:20 UTC
Git commit 464b05dbaa11ef31593184828726bbf2f9820c92 by Thomas Baumgart.
Committed on 19/03/2022 at 16:49.
Pushed by tbaumgart into branch 'master'.

Rework checks in account / category editor

Show tooltips in case of problems, eg percentage out of range, name
missing or :: part of name

M  +41   -26   kmymoney/dialogs/knewaccountdlg.cpp
M  +93   -99   kmymoney/dialogs/knewaccountdlg.ui
M  +1    -1    kmymoney/widgets/kmymoneyselector.cpp

https://invent.kde.org/office/kmymoney/commit/464b05dbaa11ef31593184828726bbf2f9820c92
Comment 2 Thomas Baumgart 2022-07-01 10:37:28 UTC
Git commit 6c446284b68bc96cef7b4e9a3d1100f3f7cf6de0 by Thomas Baumgart.
Committed on 01/07/2022 at 10:36.
Pushed by tbaumgart into branch '5.1'.

Prevent to create a category with a double colon in the name
FIXED-IN: 5.1.3

M  +18   -17   kmymoney/dialogs/knewaccountdlg.cpp
M  +1    -1    kmymoney/widgets/kmymoneyselector.cpp

https://invent.kde.org/office/kmymoney/commit/6c446284b68bc96cef7b4e9a3d1100f3f7cf6de0