Remove the ShellManager
ClosedPublic

Authored by apol on Aug 1 2019, 2:46 PM.

Details

Summary

We had an overly complex and in practice unexploited system to detect
which shell to use,
This patch changes it to default to the desktop, still allowing to
modify which to use from --shell-plugin argument.

Test Plan

Starts up fine, --shell-plugin/-p still works, which is what
bhushan told me is important for plasma mobile.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Aug 1 2019, 2:46 PM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 1 2019, 2:46 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol requested review of this revision.Aug 1 2019, 2:46 PM
davidedmundson accepted this revision.Aug 1 2019, 3:33 PM
davidedmundson added a subscriber: davidedmundson.

The desktop loader has been broken since before 5.0, I think it's a classic example of building something too early.

We can always revert if we find a usage later. Go for it.

This revision is now accepted and ready to land.Aug 1 2019, 3:33 PM
bshah accepted this revision.Aug 1 2019, 4:14 PM
bshah added a subscriber: bshah.

Please also remove loader.qml from shell packages I guess.

This revision was automatically updated to reflect the committed changes.
ndavis added a subscriber: ndavis.EditedAug 5 2019, 9:36 AM

After this patch, when I run plasmashell --replace & 3 times in a row, the following happens:

1st time: Plasmashell runs

2nd time: Plasmashell segfaults with "No such object path '/org/kde/plasmashell'" at the start

3rd time: Plasmashell exits (code 1) with "No such object path '/org/kde/plasmashell'"

If I reset to the commit before this one, Plasmashell loads no matter how many times I run the command.

broulik added a subscriber: broulik.Aug 5 2019, 9:39 AM

I get the plasmashell --replace not working correctly occasionally. I don't think this is related to any of this.

ndavis added a comment.Aug 5 2019, 9:49 AM

I get the plasmashell --replace not working correctly occasionally. I don't think this is related to any of this.

I'm pretty sure it is. I can reliably reproduce tge bug with this commit, but I can't ever reproduce it with the previous one. Make sure you run killall plasmashell before you try to reproduce the bug because sometimes /usr/bin/plasmashell starts when ~/kde/usr/bin/plasmashell crashes otherwise.

I can repdroduce plasmashell crashing. The --replace option is fine but it just crashes on teardown.

Thread 1 "plasmashell" received signal SIGSEGV, Segmentation fault.
0x00007ffff1fafd66 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::operator-> (this=<optimized out>)
    at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:118
118     ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  0x00007ffff1fafd66 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::operator->() const (this=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:118
#1  0x00007ffff1fafd66 in qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > >(QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > const&) (ptr=...) at global/qglobal.h:1038
#2  0x00007ffff1fafd66 in QObject::d_func() (this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject.h:121
#3  0x00007ffff1fafd66 in QObjectPrivate::get(QObject*) (o=<optimized out>)
    at ../../include/QtCore/5.12.3/QtCore/private/../../../../../src/corelib/kernel/qobject_p.h:199
#4  0x00007ffff1fafd66 in QEventLoopLocker::QEventLoopLocker() (this=0x5555573984a0) at kernel/qeventloop.cpp:428
#5  0x00007ffff4054091 in KJobPrivate::KJobPrivate() () at /usr/lib/x86_64-linux-gnu/libKF5CoreAddons.so.5
#6  0x00007ffff4050869 in KCompositeJobPrivate::KCompositeJobPrivate() () at /usr/lib/x86_64-linux-gnu/libKF5CoreAddons.so.5
#7  0x00007ffff40508af in KCompositeJob::KCompositeJob(QObject*) () at /usr/lib/x86_64-linux-gnu/libKF5CoreAddons.so.5
#8  0x00007fffeacc65c3 in KIO::Job::Job(KIO::JobPrivate&) (this=0x555555e1b400, dd=...) at ./src/core/job.cpp:47
#9  0x00007fffeacdb7c9 in KIO::SimpleJob::SimpleJob(KIO::SimpleJobPrivate&) (this=0x555555e1b400, dd=...)
    at ./src/core/simplejob.cpp:33
#10 0x00007fffeacdf459 in KIO::StatJob::StatJob(KIO::StatJobPrivate&) (this=0x555555e1b400, dd=...) at ./src/core/statjob.cpp:69
#11 0x00007fffeace0123 in KIO::StatJobPrivate::newJob(QUrl const&, int, QByteArray const&, QFlags<KIO::JobFlag>) (flags=..., packedArgs=..., command=69, url=...) at ./src/core/statjob.cpp:58
#12 0x00007fffeace0123 in KIO::stat(QUrl const&, KIO::StatJob::StatSide, short, QFlags<KIO::JobFlag>) (url=..., side=KIO::StatJob::SourceSide, details=<optimized out>, flags=...) at ./src/core/statjob.cpp:210
#13 0x00007fff149415d3 in FolderModel::isDir(QModelIndex const&, KDirModel const*) const ()
    at /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/private/desktopcontainment/folder/libfolderplugin.so
#14 0x00007fff1494194e in FolderModel::lessThan(QModelIndex const&, QModelIndex const&) const ()
    at /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/private/desktopcontainment/folder/libfolderplugin.so
#15 0x00007ffff1f8997c in QSortFilterProxyModelLessThan::operator()(int, int) const (this=0x7fffffffc780, r1=<optimized out>, r2=1)
    at itemmodels/qsortfilterproxymodel.cpp:86
#16 0x00007ffff1f8c20f in __gnu_cxx::__ops::_Iter_comp_iter<QSortFilterProxyModelLessThan>::operator()<int*, int*>(int*, int*) (__it1=0x555558c09f10, __it2=0x555558c09f08, this=0x7fffffffc780) at /usr/include/c++/7/bits/predefined_ops.h:143
#17 0x00007ffff1f8c20f in std::__insertion_sort<int*, __gnu_cxx::__ops::_Iter_comp_iter<QSortFilterProxyModelLessThan> >(int*, int*, __gnu_cxx::__ops::_Iter_comp_iter<QSortFilterProxyModelLessThan>) (__first=__first@entry=0x555558c09f08, __last=__last@entry=0x555558c09f24, __comp=...) at /usr/include/c++/7/bits/stl_algo.h:1847