This is an automatically generated e-mail. To reply, visit:

Review request for KDE Frameworks and Plasma.

Repository: kpackage


A KPackage::Package object uses qexplicitlyshareddata, and it designed
to be kept on the stack and copied. However, PackageJob takes a pointer
to a package, which it later updates, which is expected to exist for the
lifecycle of the job.

This means

Package p = PackageLoader::self()->loadPackage(..);

will crash.

Given that, I don't think this is an application error, and but a
library bug.

Both plasmashell installation and uninstallation have this problem:

BUG: 370718
BUG: 369935

As Package is not a QObject we can't just use a QWeakPointer, and
we can't just copy the Package in the packagejob as we need to detatch
and update the *original* KPackage instance. Also to match behaviour we need to 
do this without changing any other
KPackage instances sharing the same shareddata.

Not a neat fix at all, but there aren't many options that work
without breaking API or behaviour.


  src/kpackage/package.cpp 207886e2d295773f5239c5804fc7c3a5f1120276 
  src/kpackage/private/package_p.h c97cbb68fa42b1335699e76e904cea5ebba75eba 
  src/kpackage/private/packagejob.cpp 84c20b2515ba3f0aba40bf6c1b69829a40bff9ed 

Diff: https://git.reviewboard.kde.org/r/129187/diff/


Crashing unit test
No longer crashes.


David Edmundson

Reply via email to