Public bug reported:

I am writing a Gnome Shell extension which uses gi.PackageKitGlib.

The following example code takes place inside a function and when
pkpackages goes out of scope, it would eventually cause Gnome Shell to
crash. The error in .xsession-errors says, "Window manager warning: Log
level 6: Finalizing proxy for an already freed object of type:
PackageKitGlib.Package".

If I keep the instance of the object persistent, then it does not crash.


Example code of extension.js:
/************************/
const Pk = imports.gi.PackageKitGlib;

function getupdatespk() {
let pkclient = new Pk.Client();
let pkresult = pkclient.get_updates(Pk.PK_FILTER_ENUM_INSTALLED, null, 
function(){});
let pkpackages = pkresult.get_package_array();
};

function init() {
};

function enable() {
      getupdatespk();
};

function disable() {
};
/************************/

Error in ~/.xsession-errors:
Window manager warning: Log level 6: Finalizing proxy for an already freed 
object of type: PackageKitGlib.Package

** Message: applet now removed from the notification area
gnome-session[18537]: WARNING: Application 'gnome-shell.desktop' killed by 
signal 5

** Affects: packagekit (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/995549

Title:
  Gnome Shell crashes when PackageKitGlib.Package object was
  unreferenced

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/packagekit/+bug/995549/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to