Bug 499470

Summary: Sudden KMail crush after attempt of opening meeting invitation.
Product: [Applications] kmail2 Reporter: gohandi+kde
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: VERIFIED FIXED    
Severity: crash CC: winter
Priority: NOR Keywords: drkonqi
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 6.12.0
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/127709/events/8a486ee3a51548919b3164804147cdf7/
Attachments: New crash information added by DrKonqi
Email that crush KMail
Kcrush report after attempt of opning saved invitation.

Description gohandi+kde 2025-02-03 17:07:44 UTC
Application: kmail (6.3.1 (24.12.1))

ApplicationNotResponding [ANR]: false
Qt Version: 6.8.1
Frameworks Version: 6.10.0
Operating System: Linux 6.12.11-200.fc41.x86_64 x86_64
Windowing System: Wayland
Distribution: "Fedora Linux 41 (KDE Plasma)"
DrKonqi: 6.2.5 [CoredumpBackend]

-- Information about the crash:
1. Open KMail. 
2. Click on affected Meeting invitation
3. Wait <2s, program crushes mail is not shown even for moment.
--
Invitation is send by Outlook client from windows machine. This dailyt meeting with multiple attendees and link to webex as location.
KMail barrely configured only: SMTP connection, IMAP Connection, LDAPv3 host.
KOrganizer is almost empty due to fact it is fresh install.
Other invitations open properly, also generated from outlook.

The crash can be reproduced every time.

-- Backtrace (Reduced):
#5  QHashPrivate::iterator<QHashPrivate::Node<QDateTime, KCalendarCore::Period> >::node (this=<synthetic pointer>) at /usr/include/qt6/QtCore/qhash.h:788
#6  QHash<QDateTime, KCalendarCore::Period>::iterator::operator-> (this=<synthetic pointer>) at /usr/include/qt6/QtCore/qhash.h:1140
#7  KCalendarCore::Recurrence::shiftTimes (this=0x55d110c6eae0, oldTz=..., newTz=...) at /usr/src/debug/kf6-kcalendarcore-6.10.0-1.fc41.x86_64/src/recurrence.cpp:516
#8  0x00007f3ddc8c763f in KCalendarCore::Incidence::shiftTimes (this=0x55d110c000f0, oldZone=..., newZone=...) at /usr/src/debug/kf6-kcalendarcore-6.10.0-1.fc41.x86_64/src/incidence.cpp:372
#9  0x00007f3ddc8a7c74 in KCalendarCore::Event::shiftTimes (this=0x55d110c000f0, oldZone=..., newZone=...) at /usr/src/debug/kf6-kcalendarcore-6.10.0-1.fc41.x86_64/src/event.cpp:226


Reported using DrKonqi
Comment 1 gohandi+kde 2025-02-03 17:07:45 UTC
Created attachment 177932 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Allen Winter 2025-02-03 17:46:30 UTC
any chance you can attach the offending invitation as an .ics file here?
or email it to me
Comment 3 gohandi+kde 2025-02-04 11:35:50 UTC
Created attachment 177946 [details]
Email that crush KMail

I have exported this message by round cube and perform some anonimization by hand.
After anonimization i check on thunderbird and program displays content of email. When try to display it in KMail it crushes.
Comment 4 gohandi+kde 2025-02-04 11:46:25 UTC
Created attachment 177951 [details]
Kcrush report after attempt of opning saved invitation.

Added Kcrush report after attempt of opening saved invitation.
Comment 5 Allen Winter 2025-02-10 13:12:03 UTC
I'm able to get a crash by emailing your attachment as an iCalendar to myself.

let's see if I can make a fix
Comment 6 Bug Janitor Service 2025-02-10 15:14:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kcalendarcore/-/merge_requests/188
Comment 7 Bug Janitor Service 2025-02-10 15:18:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kcalendarcore/-/merge_requests/189
Comment 8 Allen Winter 2025-02-10 16:20:40 UTC
Git commit c8dcc031afdd2b60ad56d752b31361331c12bb23 by Allen Winter.
Committed on 10/02/2025 at 15:10.
Pushed by cullmann into branch 'master'.

recurrence.cpp - shiftTimes() prevent crash on missing or invalid period

In shiftTimes(), don't crash if unable to locate an rDateTime in
the rDateTimePeriods hash (eg if that hash is empty).
FIXED-IN: 6.12.0

M  +7    -5    src/recurrence.cpp

https://invent.kde.org/frameworks/kcalendarcore/-/commit/c8dcc031afdd2b60ad56d752b31361331c12bb23
Comment 9 gohandi+kde 2025-03-15 18:48:53 UTC
After update KDE framework to 6.12 i can confirm that affected invitation opens properly without crushing kmail.
Thanks for support!