Application: kaddressbook (6.2.1 (24.08.1)) Qt Version: 6.7.2 Frameworks Version: 6.6.0 Operating System: Linux 6.8.0-45-generic x86_64 Windowing System: X11 Distribution: KDE neon 6.1 DrKonqi: 6.1.5 [CoredumpBackend] -- Information about the crash: I created a new contact by right clicking on an email address in Kmail and filled out some information and closed the dialog. Then I opened Kaddressbook searched by first name and tried to edit the contact to add some more information. The edit dialog would appear for a moment before the app crashed. This was repeatable, I could restart kaddressbook, search and press edit to repeat the crash. I have now made the changes I wanted using mekuro contacts and the crash no longer occurs. The crash can be reproduced every time. -- Backtrace (Reduced): #6 __pthread_kill_implementation (no_tid=0, signo=6, threadid=128972826141248) at ./nptl/pthread_kill.c:44 #7 __pthread_kill_internal (signo=6, threadid=128972826141248) at ./nptl/pthread_kill.c:78 #8 __GI___pthread_kill (threadid=128972826141248, signo=signo@entry=6) at ./nptl/pthread_kill.c:89 #9 0x0000754cdba42476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #10 0x0000754cdba287f3 in __GI_abort () at ./stdlib/abort.c:79 Reported using DrKonqi
Created attachment 174505 [details] New crash information added by DrKonqi DrKonqi auto-attaching complete backtrace.
Created attachment 174589 [details] Patch to fix the crash Can confirm this happening. It seems to be when the contact entry being edited has a phone number type which is not one of the standard ones ("Home", "Work" etc). In this case Akonadi::PhoneComboBoxType::setType() in src/akonadi-contacts-widgets/editor/generalinfoeditor/phone/phonecomboboxtype.cpp tries to insert the previously unknown type into mTypeList as the penultimate entry. The code looks correct to me (although it's a bit clumsy), but it crashes with the assert as per the backtrace. The attached patch appears to fix the problem, although there may be a better way.
A possibly relevant merge request was started @ https://invent.kde.org/pim/akonadi-contacts/-/merge_requests/48
Git commit f11e81cebba7956f0b0aca27420ab66d7da2b602 by Jonathan Marten. Committed on 10/10/2024 at 08:29. Pushed by marten into branch 'master'. Fix KAddressBook crash when editing a contact with nonstandard phone type In this case PhoneComboBoxType::setType() attempts to insert the new type as the penultimate item in the mTypeList. However, using an iterator for insertion appears to cause an assertion within QList. There is no need to obtain an interator to do the insertion, the index can be used directly. Test case: Importing this contact into KAddressBook and attempting to edit it will trigger the crash. VERSION:3.0 EMAIL;TYPE=PREF,WORK:foo@bar.com EMAIL;TYPE=WORK:info@bar.com FN:Foo Bar N:Bar;Foo;;Mx.; TEL;TYPE=CELL,WORK:0000 000 0000 TEL;TYPE=HOME:01000 000000 END:VCARD M +1 -1 src/akonadi-contacts-widgets/editor/generalinfoeditor/phone/phonecomboboxtype.cpp https://invent.kde.org/pim/akonadi-contacts/-/commit/f11e81cebba7956f0b0aca27420ab66d7da2b602