GNOME Bugzilla – Bug 746175
Attempts to use the main window after it has been destroyed
Last modified: 2021-07-05 11:31:21 UTC
In an ideal world, destroying the main window should cancel all pending operations. Particularly those that are meaningless without a UI. However, in reality, some thumbnailing operations may survive the destruction of the main window, leading to traces like this: (gnome-documents:7860): Gjs-WARNING **: JS ERROR: TypeError: this._mainWindow is null Application<.getScaleFactor@/opt/share/gnome-documents/js/application.js:778 wrapper@resource:///org/gnome/gjs/modules/lang.js:169 DocCommon<.updateIconFromType@/opt/share/gnome-documents/js/documents.js:334 wrapper@resource:///org/gnome/gjs/modules/lang.js:169 DocCommon<.refreshIcon@/opt/share/gnome-documents/js/documents.js:398 wrapper@resource:///org/gnome/gjs/modules/lang.js:169 DocCommon<.populateFromCursor@/opt/share/gnome-documents/js/documents.js:320 wrapper@resource:///org/gnome/gjs/modules/lang.js:169 DocCommon<._init@/opt/share/gnome-documents/js/documents.js:252 wrapper@resource:///org/gnome/gjs/modules/lang.js:169 _parent@resource:///org/gnome/gjs/modules/lang.js:131 OwncloudDocument<._init@/opt/share/gnome-documents/js/documents.js:943 wrapper@resource:///org/gnome/gjs/modules/lang.js:169 _Base.prototype._construct@resource:///org/gnome/gjs/modules/lang.js:110 Class.prototype._construct/newClass@resource:///org/gnome/gjs/modules/lang.js:204 DocumentManager<.createDocumentFromCursor@/opt/share/gnome-documents/js/documents.js:1178 wrapper@resource:///org/gnome/gjs/modules/lang.js:169 CollectionIconWatcher<._onCollectionIconFinished/</<@/opt/share/gnome-documents/js/documents.js:161 SingleItemJob<._emitCallback@/opt/share/gnome-documents/js/trackerUtils.js:91 wrapper@resource:///org/gnome/gjs/modules/lang.js:169 SingleItemJob<._onCursorNext@/opt/share/gnome-documents/js/trackerUtils.js:86 wrapper@resource:///org/gnome/gjs/modules/lang.js:169 start@/opt/share/gnome-documents/js/main.js:30 @<command line>:1 This is identical to bug 738527
Created attachment 299353 [details] [review] application: Thwart attempts to use the main window after its demise
Review of attachment 299353 [details] [review]: I'm fine with this as a stop-gap solution, but we should indeed cancel those asynchronous operations when the window is destroyed.
Comment on attachment 299353 [details] [review] application: Thwart attempts to use the main window after its demise Committed as a temporary solution. Keeping the bug open to fix it properly.
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-documents/-/issues/ Thank you for your understanding and your help.