Bug 424776 - Kontact hangs when typing in recipient email addresses
Summary: Kontact hangs when typing in recipient email addresses
Status: RESOLVED FIXED
Alias: None
Product: kontact
Classification: Applications
Component: contacts (show other bugs)
Version: 5.14.80
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-29 04:21 UTC by Aaron Williams
Modified: 2020-07-30 05:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.15.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Williams 2020-07-29 04:21:19 UTC
SUMMARY


STEPS TO REPRODUCE
1. Click "New Message"
2. Start typing in the name of a frequent recipient address
3. After the first three letters are typed it hangs and consumes 100% of the CPU.
Note that if I type in the complete email address elsewhere and copy and paste it then it works just fine.

OBSERVED RESULT
Hangs when typing in the email address

EXPECTED RESULT
It should not hang and offer matching email addresses

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.19.3
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
Comment 1 Aaron Williams 2020-07-30 04:46:44 UTC
I have some more information. It's getting stuck in an endless loop in QStringList ContactCompleter::complete() where it keeps getting the exception a Xapian::DatabaseModifiedError exception when it tries processEnquire. It reopens the database and retries endlessly and never completes.
Comment 2 Aaron Williams 2020-07-30 05:03:49 UTC
It looks like my emailContacts database was corrupted and xapian could not fix it. Deleting the database fixed it. I think a never ending loop may be a problem with this exception. A better solution might be to pop up a message after a certain number of retries.
Comment 3 Laurent Montel 2020-07-30 05:33:32 UTC
Git commit 888751282ed1aa6f9cfb29194fca8075c3d32290 by Laurent Montel.
Committed on 30/07/2020 at 05:33.
Pushed by mlaurent into branch 'release/20.08'.

Fix Bug 424776 - Kontact hangs when typing in recipient email addresses
FIXED-IN: 5.15.0

M  +6    -0    lib/contactcompleter.cpp

https://invent.kde.org/pim/akonadi-search/commit/888751282ed1aa6f9cfb29194fca8075c3d32290
Comment 4 Laurent Montel 2020-07-30 05:35:46 UTC
(In reply to Aaron Williams from comment #2)
> It looks like my emailContacts database was corrupted and xapian could not
> fix it. Deleting the database fixed it. I think a never ending loop may be a
> problem with this exception. A better solution might be to pop up a message
> after a certain number of retries.

We can't add a messagebox for the moment so I added a warning.