[Akonadi] [Bug 440831] New: Segmentation Fault on syncing MeContact

Andreas Merl bugzilla_noreply at kde.org
Tue Aug 10 12:36:12 BST 2021


https://bugs.kde.org/show_bug.cgi?id=440831

            Bug ID: 440831
           Summary: Segmentation Fault on syncing MeContact
           Product: Akonadi
           Version: 5.17.3
          Platform: Archlinux Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: EWS Resource
          Assignee: kdepim-bugs at kde.org
          Reporter: merl.andreas at outlook.com
                CC: krissn at op.pl
  Target Milestone: ---

Created attachment 140630
  --> https://bugs.kde.org/attachment.cgi?id=140630&action=edit
gdb backtrace of segfault

SUMMARY
At least some accounts of outlook.com do have one element in MeContact.
(tested with two separated accounts, same behavior).
On trying to sync this element a Segmentation Fault occurs.
This Segmentation Fault appears only if the element is not locally available
already.


STEPS TO REPRODUCE
1. Create an outlook.com account.
   Account must have one element in MeContact (element type EwsItemTypeItem or
0)
2. Add account to Akonadi.
3. Open akonadiconsole and synchronize all elements of the resource.

OBSERVED RESULT
As soon as the synchronizing process tries to sync MeContact a
Segmentation Fault occurs.

EXPECTED RESULT
No Segmentation Faults at all.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux Kernel 5.1.9-arch1-1
(available in About System)
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
I'm no expert at this (RF Engineer) but I was able to find this log message
org.kde.pim.ews: "Could not find handler for item type 0"
after which a nullptr is returned.
So I thought maybe someone tries to access this nullptr.
I managed to make a debug build and get gdb to work.
back trace is attached.
In ewsfetchitemsjob.cpp:300 we can find this:
QString mimeType = EwsItemHandler::itemHandler(type)->mimeType();
As I understand it EwsItemTypeItem does not have a itemHandler and therefor
creating it returns a nullptr and calling mimeType() gets me a Segmentation
Fault. To prevent it I tested an addition where I firstly check if there is a
nullptr and skip the element if itemHanlder(type) returns nullptr.
This removed the issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list