Bug 435352 - Crash in EventViews::AgendaItem::firstMultiItem (null agenda item)
Summary: Crash in EventViews::AgendaItem::firstMultiItem (null agenda item)
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: agendaview (weekview) (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-04 17:35 UTC by David Faure
Modified: 2021-04-22 08:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Faure 2021-04-04 17:35:44 UTC
SUMMARY

I moved a weekly-recurring event to half an hour later, korganizer asked if that was for this instance or for all, I clicked on All, and korganizer crashed.

If it matters, I had previously duplicated an event recurring on thursdays (by copy/pasting it), then modified that event to be on mondays rather than thursdays.
And then I moved its start time as described anove.

OBSERVED RESULT

#0  EventViews::AgendaItem::firstMultiItem() const (this=0x0) at /d/kde/src/5/kde/pim/eventviews/src/agenda/agendaitem.h:171
#1  EventViews::Agenda::endItemAction() (this=0x1111a40) at /d/kde/src/5/kde/pim/eventviews/src/agenda/agenda.cpp:1217
#2  0x00007fd9580c4804 in EventViews::Agenda::eventFilter_mouse(QObject*, QMouseEvent*) (this=0x1111a40, object=<optimized out>, me=0x7ffe802f14d0) at /d/kde/src/5/kde/pim/eventviews/src/agenda/agenda.cpp:703
#3  0x00007fd9552ccda9 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) (receiver=0x7fd948019120, event=0x7ffe802f14d0) at /d/qt/5/kde/qtbase/src/corelib/kernel/qcoreapplication.cpp:1190
#4  0x00007fd9560a981d in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=0xcb42d0, receiver=0x7fd948019120, e=0x7ffe802f14d0) at /d/qt/5/kde/qtbase/src/widgets/kernel/qapplication.cpp:3626
#5  0x00007fd9560a73d2 in QApplication::notify(QObject*, QEvent*) (this=0x7ffe802f2610, receiver=0x7fd948019120, e=0x7ffe802f14d0) at /d/qt/5/kde/qtbase/src/widgets/kernel/qapplication.cpp:3076
#6  0x00007fd9552cc984 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x7fd948019120, event=0x7ffe802f14d0) at /d/qt/5/kde/qtbase/src/corelib/kernel/qcoreapplication.cpp:1064
#7  0x00007fd9552cd356 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=0x7fd948019120, event=0x7ffe802f14d0) at /d/qt/5/kde/qtbase/src/corelib/kernel/qcoreapplication.cpp:1474
#8  0x00007fd9560a5fa3 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) (receiver=0x7fd948019120, event=0x7ffe802f14d0, alienWidget=0x7fd948019120, nativeWidget=0xe3e7a0, buttonDown=0x7fd956810a10 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at /d/qt/5/kde/qtbase/src/widgets/kernel/qapplication.cpp:2614

EXPECTED RESULT

No crash :)

SOFTWARE/OS VERSIONS
KDEPIM Version: git release/21.04 branch (eventviews commit 04450a2)
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 David Faure 2021-04-04 17:37:24 UTC
The line of code is

1217            AgendaItem::QPtr placeItem = d->mActionItem->firstMultiItem();

and clearly d->mActionItem is null.
Comment 2 gjditchfield 2021-04-07 19:20:22 UTC
(In reply to David Faure from comment #1)
> The line of code is
> 
> 1217            AgendaItem::QPtr placeItem = d->mActionItem->firstMultiItem();
> 
> and clearly d->mActionItem is null.

And yet mActionItem must have been non-null at line 1147, and I don't see where an assignment happens.

Any chance you can reproduce this?
Comment 3 David Faure 2021-04-08 10:29:37 UTC
Hmm, many things can happen while a modal dialog is up (the question in showMoveRecurDialog). Like the disappearing+reappearing of events that happens often after I just created them (with the DAV resource at least).
Comment 4 Bug Janitor Service 2021-04-22 00:33:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/eventviews/-/merge_requests/23
Comment 5 gjditchfield 2021-04-22 08:47:54 UTC
Git commit 57d3025b146bb9cd3bef2c6eaef77f4970361c1a by Glen Ditchfield.
Committed on 21/04/2021 at 23:26.
Pushed by dfaure into branch 'release/21.04'.

Don't crash if an agenda item is deleted while it is being moved

When a recurring event is moved, a dialog box asks which instances to
move.  Apparently `mActionItem` can be set to null by asynchronous
events while the dialog is up.

M  +7    -0    src/agenda/agenda.cpp

https://invent.kde.org/pim/eventviews/commit/57d3025b146bb9cd3bef2c6eaef77f4970361c1a