gnome-shell/js/ui
Cosimo Cecchi 6359d6ef30 windowAttentionHandler: disconnect signals before destruction
The 'destroy' signal is emitted at the end of the destroy() method.
However the implementation of destroy() can end up emitting one of the
signals we connect to on the window, causing us to re-enter destroy
from its callback.
That will in turn lead to some objects getting disposed twice, which
produces a stack trace like the following one.

This commit fixes the issue by overriding the destroy() method instead
of connecting to the signal, which allows us to disconnect the signal
handlers from the window at an earlier time and avoid re-entrancy.

--

gnome-shell[1082]: Object Gio.Settings (0x7f0af8143f00), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
org.gnome.Shell.desktop[1082]: == Stack trace for context 0x5627f7d1e220 ==
org.gnome.Shell.desktop[1082]: #0   5627f9e801a8 i   resource:///org/gnome/shell/ui/messageTray.js:238 (7f0aefa9eca0 @ 22)
org.gnome.Shell.desktop[1082]: #1   5627f9e80108 i   resource:///org/gnome/shell/ui/messageTray.js:802 (7f0aefaa2ee0 @ 28)
org.gnome.Shell.desktop[1082]: #2   5627f9e80070 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:79 (7f0aef7b29d0 @ 62)
org.gnome.Shell.desktop[1082]: #3   7fffa69fbfc0 b   self-hosted:979 (7f0aefa515e0 @ 440)
org.gnome.Shell.desktop[1082]: #4   5627f9e7ffe0 i   resource:///org/gnome/shell/ui/messageTray.js:121 (7f0aefa9e1f0 @ 71)
org.gnome.Shell.desktop[1082]: #5   5627f9e7ff38 i   resource:///org/gnome/shell/ui/messageTray.js:1408 (7f0aefaa58b0 @ 22)
org.gnome.Shell.desktop[1082]: #6   5627f9e7fe80 i   resource:///org/gnome/shell/ui/messageTray.js:1237 (7f0aefaa51f0 @ 729)
org.gnome.Shell.desktop[1082]: #7   5627f9e7fde8 i   resource:///org/gnome/shell/ui/messageTray.js:1055 (7f0aefaa3d30 @ 124)
org.gnome.Shell.desktop[1082]: #8   7fffa69ff8e0 b   self-hosted:979 (7f0aefa515e0 @ 440)
org.gnome.Shell.desktop[1082]: #9   7fffa69ff9d0 b   resource:///org/gnome/gjs/modules/signals.js:142 (7f0aefccb670 @ 386)
org.gnome.Shell.desktop[1082]: #10   5627f9e7fd58 i   resource:///org/gnome/shell/ui/messageTray.js:479 (7f0aefaa0940 @ 50)
org.gnome.Shell.desktop[1082]: #11   5627f9e7fcb8 i   resource:///org/gnome/shell/ui/messageTray.js:808 (7f0aefaa2ee0 @ 99)
org.gnome.Shell.desktop[1082]: #12   5627f9e7fc28 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:69 (7f0aef7b28b0 @ 13)
org.gnome.Shell.desktop[1082]: #13   5627f9e7fb80 i   resource:///org/gnome/shell/ui/main.js:566 (7f0aefcd8820 @ 216)
org.gnome.Shell.desktop[1082]: #14   5627f9e7fad0 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:103 (7f0aef7b2c10 @ 27)
org.gnome.Shell.desktop[1082]: #15   5627f9e7fa58 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:43 (7f0aef7b2700 @ 17)
org.gnome.Shell.desktop[1082]: #16   7fffa6a03350 b   resource:///org/gnome/gjs/modules/signals.js:142 (7f0aefccb670 @ 386)
org.gnome.Shell.desktop[1082]: #17   5627f9e7f9d0 i   resource:///org/gnome/shell/ui/messageTray.js:471 (7f0aefaa08b0 @ 22)
org.gnome.Shell.desktop[1082]: #18   5627f9e7f950 i   resource:///org/gnome/shell/ui/calendar.js:752 (7f0aefaabdc0 @ 22)
org.gnome.Shell.desktop[1082]: #19   7fffa6a048f0 b   self-hosted:979 (7f0aefa515e0 @ 440)
org.gnome.Shell.desktop[1082]: == Stack trace for context 0x5627f7d1e220 ==
org.gnome.Shell.desktop[1082]: #0   5627f9e801a8 i   resource:///org/gnome/shell/ui/messageTray.js:239 (7f0aefa9eca0 @ 42)
org.gnome.Shell.desktop[1082]: #1   5627f9e80108 i   resource:///org/gnome/shell/ui/messageTray.js:802 (7f0aefaa2ee0 @ 28)
org.gnome.Shell.desktop[1082]: #2   5627f9e80070 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:79 (7f0aef7b29d0 @ 62)
org.gnome.Shell.desktop[1082]: #3   7fffa69fbfc0 b   self-hosted:979 (7f0aefa515e0 @ 440)
org.gnome.Shell.desktop[1082]: #4   5627f9e7ffe0 i   resource:///org/gnome/shell/ui/messageTray.js:121 (7f0aefa9e1f0 @ 71)
org.gnome.Shell.desktop[1082]: #5   5627f9e7ff38 i   resource:///org/gnome/shell/ui/messageTray.js:1408 (7f0aefaa58b0 @ 22)
org.gnome.Shell.desktop[1082]: #6   5627f9e7fe80 i   resource:///org/gnome/shell/ui/messageTray.js:1237 (7f0aefaa51f0 @ 729)
org.gnome.Shell.desktop[1082]: #7   5627f9e7fde8 i   resource:///org/gnome/shell/ui/messageTray.js:1055 (7f0aefaa3d30 @ 124)
org.gnome.Shell.desktop[1082]: #8   7fffa69ff8e0 b   self-hosted:979 (7f0aefa515e0 @ 440)
org.gnome.Shell.desktop[1082]: #9   7fffa69ff9d0 b   resource:///org/gnome/gjs/modules/signals.js:142 (7f0aefccb670 @ 386)
org.gnome.Shell.desktop[1082]: #10   5627f9e7fd58 i   resource:///org/gnome/shell/ui/messageTray.js:479 (7f0aefaa0940 @ 50)
org.gnome.Shell.desktop[1082]: #11   5627f9e7fcb8 i   resource:///org/gnome/shell/ui/messageTray.js:808 (7f0aefaa2ee0 @ 99)
org.gnome.Shell.desktop[1082]: #12   5627f9e7fc28 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:69 (7f0aef7b28b0 @ 13)
org.gnome.Shell.desktop[1082]: #13   5627f9e7fb80 i   resource:///org/gnome/shell/ui/main.js:566 (7f0aefcd8820 @ 216)
org.gnome.Shell.desktop[1082]: #14   5627f9e7fad0 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:103 (7f0aef7b2c10 @ 27)
org.gnome.Shell.desktop[1082]: #15   5627f9e7fa58 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:43 (7f0aef7b2700 @ 17)
org.gnome.Shell.desktop[1082]: #16   7fffa6a03350 b   resource:///org/gnome/gjs/modules/signals.js:142 (7f0aefccb670 @ 386)
org.gnome.Shell.desktop[1082]: #17   5627f9e7f9d0 i   resource:///org/gnome/shell/ui/messageTray.js:471 (7f0aefaa08b0 @ 22)
org.gnome.Shell.desktop[1082]: #18   5627f9e7f950 i   resource:///org/gnome/shell/ui/calendar.js:752 (7f0aefaabdc0 @ 22)
org.gnome.Shell.desktop[1082]: #19   7fffa6a048f0 b   self-hosted:979 (7f0aefa515e0 @ 440)
gnome-shell[1082]: g_object_run_dispose: assertion 'G_IS_OBJECT (object)' failed
gnome-shell[1082]: Object Gio.Settings (0x7f0af8161750), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
gnome-shell[1082]: g_object_run_dispose: assertion 'G_IS_OBJECT (object)' failed

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/555
2019-05-27 08:35:56 -07:00
..
components modalDialog: Inherit from St.Widget 2019-05-24 16:27:25 -05:00
status modalDialog: Inherit from St.Widget 2019-05-24 16:27:25 -05:00
accessDialog.js modalDialog: Inherit from St.Widget 2019-05-24 16:27:25 -05:00
altTab.js js: Use GTypeFlags to define abstract GObject classes 2019-05-15 17:09:30 +00:00
animation.js animation: Reload sliced texture on global scale change 2019-03-01 17:12:53 +00:00
appDisplay.js cleanup: Fix spelling errors 2019-05-15 19:32:29 +00:00
appFavorites.js appFavorites: Update RENAMED_DESKTOP_IDS 2019-04-11 23:28:49 +02:00
audioDeviceSelection.js modalDialog: Inherit from St.Widget 2019-05-24 16:27:25 -05:00
background.js background: Don't set background actor sizing and scaling 2019-03-01 17:12:53 +00:00
backgroundMenu.js popupMenu: Make MenuManager to take an actor as parameter 2019-04-17 21:32:18 +00:00
barLevel.js barLevel: Don't show border radius if the value is 0 2019-04-17 18:38:13 +00:00
boxpointer.js boxpointer: Don't use boxpointer actor, as it's now an actor itself 2019-04-17 21:32:18 +00:00
calendar.js calendar: Load interface description from resource 2019-02-13 17:58:36 +00:00
checkBox.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
closeDialog.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
ctrlAltTab.js st-texture-cache: use StImageContent for cairo bound surface 2019-03-01 17:12:53 +00:00
dash.js cleanup: Fix spelling errors 2019-05-15 19:32:29 +00:00
dateMenu.js worldClocks: Ignore locations with unknown timezone 2019-04-30 16:15:27 +00:00
dialog.js dialog: Use object's set to assign properties 2019-05-03 15:34:06 -05:00
dnd.js dnd: Multiply drag threshold by output scale 2019-03-13 17:22:35 +00:00
edgeDragAction.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
endSessionDialog.js modalDialog: Inherit from St.Widget 2019-05-24 16:27:25 -05:00
environment.js environment: Warn when trying to access a deprecated actor property 2019-04-17 21:32:18 +00:00
extensionDownloader.js modalDialog: Inherit from St.Widget 2019-05-24 16:27:25 -05:00
extensionSystem.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
focusCaretTracker.js cleanup: Port non-GObject classes to JS6 classes 2019-01-25 14:02:44 +00:00
grabHelper.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
ibusCandidatePopup.js boxpointer: Don't use boxpointer actor, as it's now an actor itself 2019-04-17 21:32:18 +00:00
iconGrid.js js: Throw GObject.NotImplementedError when requiring overriding 2019-05-21 15:43:21 -05:00
inhibitShortcutsDialog.js inhibitShortcuts: Save choice in permission store 2019-03-04 10:12:58 +01:00
kbdA11yDialog.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
keyboard.js keyboard: Remove unused _hideSubkeys function 2019-05-09 16:11:26 -05:00
layout.js shell: Do not set XFixes input region on wayland compositors 2019-05-24 12:24:06 +02:00
lightbox.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
lookingGlass.js lookingGlass: Use symbolic icon for close button 2019-02-28 16:21:38 +01:00
magnifier.js cleanup: Fix spelling errors 2019-05-15 19:32:29 +00:00
magnifierDBus.js cleanup: Port non-GObject classes to JS6 classes 2019-01-25 14:02:44 +00:00
main.js modalDialog: Inherit from St.Widget 2019-05-24 16:27:25 -05:00
messageList.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
messageTray.js messageTray: Remove this.actor definition to SourceActor 2019-04-17 21:32:18 +00:00
modalDialog.js modalDialog: Use a Gobject property to manage the state 2019-05-24 16:28:18 -05:00
mpris.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
notificationDaemon.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
osdMonitorLabeler.js shellDBus: Remove ShowMonitorLabels API 2019-04-11 17:49:40 +00:00
osdWindow.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
overview.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
overviewControls.js js: Throw GObject.NotImplementedError when requiring overriding 2019-05-21 15:43:21 -05:00
padOsd.js padOsd: Use non-deprecated librsvg API to create handle 2019-04-27 05:50:08 +00:00
pageIndicators.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
panel.js panel: Use menu items as actors 2019-05-15 17:27:08 +00:00
panelMenu.js panelMenu: Remove usage of this.actor from Button 2019-04-17 21:32:18 +00:00
pointerWatcher.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
popupMenu.js popupMenu: Implement Switch as actor 2019-05-15 17:27:08 +00:00
remoteSearch.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
runDialog.js modalDialog: Inherit from St.Widget 2019-05-24 16:27:25 -05:00
screencast.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
screenShield.js screenShield: Handle signal 'StatusChanged' when lockscreen is active 2019-03-18 08:32:54 +08:00
screenshot.js screenshot: Don't pick up rubberband style from GTK 2019-04-11 17:27:50 +00:00
scripting.js scripting: Don't use legacy API 2019-03-21 10:18:02 +00:00
search.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
sessionMode.js cleanup: Clean up unused imports 2019-02-09 05:05:07 +01:00
shellDBus.js shellDBus: Accept connector to restrict OSD to one monitor 2019-04-11 18:53:53 +00:00
shellEntry.js popupMenu: Make MenuManager to take an actor as parameter 2019-04-17 21:32:18 +00:00
shellMountOperation.js modalDialog: Inherit from St.Widget 2019-05-24 16:27:25 -05:00
slider.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
switcherPopup.js js: Throw GObject.NotImplementedError when requiring overriding 2019-05-21 15:43:21 -05:00
switchMonitor.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
tweener.js cleanup: Fix spelling errors 2019-05-15 19:32:29 +00:00
unlockDialog.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
userWidget.js userWidget: Fix avatar size 2019-03-12 00:34:04 +00:00
viewSelector.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
windowAttentionHandler.js windowAttentionHandler: disconnect signals before destruction 2019-05-27 08:35:56 -07:00
windowManager.js modalDialog: Inherit from St.Widget 2019-05-24 16:27:25 -05:00
windowMenu.js popupMenu: Make MenuManager to take an actor as parameter 2019-04-17 21:32:18 +00:00
workspace.js js: Throw GObject.NotImplementedError when requiring overriding 2019-05-21 15:43:21 -05:00
workspacesView.js workspacesView: remove unused variables 2019-05-19 16:06:39 +00:00
workspaceSwitcherPopup.js workspaceSwitcherPopup: Remove this.actor definition to self 2019-04-17 21:32:18 +00:00
workspaceThumbnail.js workspaceThumbnail: Remove this.actor definition to ThumbnailsBox 2019-04-17 21:32:18 +00:00
xdndHandler.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00