[frameworks-kpackage] [Bug 369935] Crash when trying to install plasmoid file by dropping it onto a panel

2016-10-16 Thread David Edmundson via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369935

David Edmundson  changed:

   What|Removed |Added

  Latest Commit||http://commits.kde.org/kpac
   ||kage/cfb69e21fb0aad92f40348
   ||7b4c8a75b2b0bc8041
 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #2 from David Edmundson  ---
Git commit cfb69e21fb0aad92f403487b4c8a75b2b0bc8041 by David Edmundson.
Committed on 16/10/2016 at 12:13.
Pushed by davidedmundson into branch 'master'.

Fix dangling pointer in KPackageJob

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(..);
p.install();

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:
Related: bug 370718

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.

REVIEW: 129187

M  +31   -1autotests/plasmoidpackagetest.cpp
M  +1-0autotests/plasmoidpackagetest.h
M  +9-0src/kpackage/package.cpp
M  +20   -0src/kpackage/private/package_p.h
M  +12   -1src/kpackage/private/packagejob.cpp

http://commits.kde.org/kpackage/cfb69e21fb0aad92f403487b4c8a75b2b0bc8041

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-kpackage] [Bug 369935] Crash when trying to install plasmoid file by dropping it onto a panel

2016-10-04 Thread Kai Uwe Broulik via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369935

--- Comment #1 from Kai Uwe Broulik  ---
The same exact thing also happens when I use the "Get new widgets" button in
Widget Explorer and choose "install from file". It crashes right when I click
on the file, I don't even need to finish the dialog.

-- 
You are receiving this mail because:
You are watching all bug changes.