phocean / TopIcons-plus

An gnome-shell extension to put the icons back to the tray.
674 stars 98 forks source link

object access error shown in gnome-shell log #152

Open arakan94 opened 4 years ago

arakan94 commented 4 years ago

Extension seems to be working OK, but I encountered this error message in log:

Object St.Button (0x564970d45900), has been already deallocated — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
== Stack trace for context 0x56496cf30790 ==
#0   56496d2fea98 i   /home/david/.local/share/gnome-shell/extensions/TopIcons@phocean.net/extension.js:111 (eabbca04c0 @ 11)
#1   7ffe95fb6ca0 b   self-hosted:1007 (1c35f0c9e6a0 @ 398)
saivert commented 3 years ago

Caused by this: (line 111)

GLib.timeout_add(GLib.PRIORITY_DEFAULT, delay, Lang.bind(this, function(){
        iconContainer.visible = true;
        iconsContainer.show();
        return GLib.SOURCE_REMOVE;
    }));

    iconsBoxLayout.insert_child_at_index(iconContainer, 0);

Since a reference to iconContainer isn't guaranteed when the timeout callback is run it seems to be garbage collected.