Skip to content

KUiServerV2JobTracker: prevent a crash

Méven Car requested to merge work/meven/kuiserver-crash-fix into master

BUG: 471531 BUG: 483582

This is a very-common crash, happening when plasma crashes itself: https://crash-reports.kde.org/organizations/kde/issues/10390/activity/?project=4&query=is%3Aunresolved&referrer=issue-stream&stream_index=0

I think this is due to the line 204 indeed, dereferencing a jobViews key, which is nullptr, because the QTimer::timeout callback in KUiServerV2JobTracker::registerJob did implicitely insert a jobViews[nullptr] when the job was already removed. Guard with jobGuard. The first change is not necessary but I felt it makes the code implicit, otherwise we have a QPointer implicit conversion to *.

TBD, squash the merge requests and add proper commit message.

cc @broulik

Merge request reports