Bug 489411

Summary: Plasmashell crashes, possibly after closing a window with children windows
Product: [Plasma] plasmashell Reporter: Jonah BrĂ¼chert <jbb>
Component: Window ListAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: davids.paskevics, nate, uhhadd
Priority: NOR    
Version: 6.1.1   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Backtrace

Description Jonah BrĂ¼chert 2024-06-28 23:54:23 UTC
Created attachment 171155 [details]
Backtrace

First of all, I didn't experience this bug myself, I just saw it on someone elses computer and debugged it somewhat.

SUMMARY
Plasmashell crashes

The backtrace is the same as this sentry report: https://crash-reports.kde.org/organizations/kde/issues/38215/?project=9&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=90d&stream_index=9

The backtrace is attached below for reference.


My current theory is this:
A window that still has children windows is being closed.

The function in which this crashes is the lambda connected to &PlasmaWindow::parentWindowChanged in waylandtasksmodel.cpp:635.

The lambda is only invoked, because QObject::destroyed is connected to &PlasmaWindow::parentWindowChanged in waylandtasksmodel:320

Qt does a direct connection here, so then parentWindowChanged is invoked as part of the destructor of PlasmaWindow, which is probably not what's wanted here. Possibly a QueuedConnection would fix this.

My theory is that the window that is being deleted is accessed by the code called in the result of the destructor.

I don't have a proper setup to test my theory right now.


STEPS TO REPRODUCE
Currently unknown


SOFTWARE/OS VERSIONS
KDE Plasma Version:  6.1.1
Comment 1 Nate Graham 2024-07-03 00:16:33 UTC

*** This bug has been marked as a duplicate of bug 488596 ***