After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757556 - AppIconMenu not properly closed on source actor destroy
AppIconMenu not properly closed on source actor destroy
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: overview
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-11-04 01:41 UTC by Michele
Modified: 2021-07-05 14:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
AppIconMenu: properly destroy on source destroy. (1.05 KB, patch)
2015-11-04 01:41 UTC, Michele
none Details | Review
AppIconMenu: properly destroy on source destroy. (1.03 KB, patch)
2015-11-08 16:56 UTC, Michele
committed Details | Review
Close and cleanup PopupMenu on actor destroy (1.11 KB, patch)
2015-11-08 21:55 UTC, Michele
needs-work Details | Review

Description Michele 2015-11-04 01:41:35 UTC
Created attachment 314778 [details] [review]
AppIconMenu: properly destroy on source destroy.

If the appIcon is destroyed while the popupMenu is shown -- this
can happen if a non favorite application was closing or crashes -- the
menu actor is improperly destroyed, resulting  in the attemp to ungrab a now removed actor.

(gnome-shell:12855): St-CRITICAL **: st_widget_get_theme_node called on the widget [0x6bebbe0 StBin.popup-menu-boxpointer popup-menu app-well-menu] which is not in the stage.

(gnome-shell:12855): Gjs-WARNING **: JS ERROR: Exception in callback for signal: open-state-changed: Error: incorrect pop

The attached patch makes popupMenu properly close first, thus doing a clean ungrab.
Comment 1 Florian Müllner 2015-11-04 11:17:12 UTC
Review of attachment 314778 [details] [review]:

While we change it, it probably makes sense to move this bit into PopupMenu - it's most likely in the appIcon case, but destroying the menu when its source actor goes away generally looks like the right thing to do.

::: js/ui/appDisplay.js
@@ +1815,3 @@
                 this.close();
         }));
+        source.actor.connect('destroy', Lang.bind(this, function () { this.destroy(); }));

Better written as:
source.actor.connect('destroy', Lang.bind(this, this.destroy));
Comment 2 Michele 2015-11-08 16:56:01 UTC
Created attachment 315085 [details] [review]
AppIconMenu: properly destroy on source destroy.

I clean up the path as suggested.
Comment 3 Florian Müllner 2015-11-08 18:35:55 UTC
Review of attachment 315085 [details] [review]:

I still think this would make sense generically in PopupMenu, but OK.
Comment 4 Michele 2015-11-08 21:55:05 UTC
Created attachment 315097 [details] [review]
Close and cleanup PopupMenu on actor destroy

This tries to solve the issue at the popupMenu level, while still being compatible with the previously proposed patch.

While the _onDestroy method is defined in the PopupMenuBase class, the wiring to the signal has to be done on the derived classes. It seems to me that only the popupMenu class requires this.
Comment 5 Florian Müllner 2015-11-12 00:14:55 UTC
Review of attachment 315097 [details] [review]:

Not sure what the purpose of this patch is - what I was suggesting was to move the code that connects to sourceActor::destroy from AppIconMenu to PopupMenu (simply because it seems a reasonable behavior, not because I really expect it to be an issue for other menus).
Comment 6 Michele 2015-11-14 00:45:31 UTC
(In reply to Florian Müllner from comment #5)
> Review of attachment 315097 [details] [review] [review]:
> 
> Not sure what the purpose of this patch is

The idea was that there should not be a PopupMenu::destroy public method which if called when the menu is not closed results in a bug.
Comment 7 Florian Müllner 2016-05-26 23:04:11 UTC
Comment on attachment 315085 [details] [review]
AppIconMenu: properly destroy on source destroy.

Attachment 315085 [details] pushed as 1545596 - AppIconMenu: properly destroy on source destroy.

Pushing the a-c-n patch.
Comment 8 GNOME Infrastructure Team 2021-07-05 14:39:14 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/

Thank you for your understanding and your help.