Check-in manager accesses accounts listbox after dialog has been closed
I saw this after waking up from suspend with Maps running:
(org.gnome.Maps:313791): Gjs-CRITICAL **: 07:38:34.520: Object .Gjs_AccountListBox (0x564eb476e410), 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.
== Stack trace for context 0x564eb3d9e1a0 ==
#0 7ffdc5571e00 b resource:///org/gnome/Maps/js/accountListBox.js:75 (7f1697d0970 @ 38)
#1 564eb3f61298 i self-hosted:225 (7f16979a150 @ 273)
#2 7ffdc5572960 b resource:///org/gnome/Maps/js/accountListBox.js:75 (7f1697d0a10 @ 71)
#3 564eb3f61210 i resource:///org/gnome/Maps/js/accountListBox.js:60 (7f1697d0ab0 @ 12)
#4 564eb3f61178 i resource:///org/gnome/Maps/js/checkIn.js:97 (7f1697cee20 @ 150)
#5 7ffdc55742b0 b self-hosted:850 (8006ec95970 @ 454)
#6 564eb3f610e0 i resource:///org/gnome/Maps/js/main.js:58 (7f1697a39c0 @ 95)
#7 564eb3f61040 i resource:///org/gnome/gjs/modules/script/package.js:222 (7f169784380 @ 45)
#8 564eb3f60fb0 i resource:///org/gnome/gjs/modules/script/package.js:206 (7f1697843d0 @ 37)
#9 564eb3f60f20 i /home/marcus/maps/bin/gnome-maps:2 (7f169784100 @ 22)
The issue seems to be the "accounts-refreshed" signal on the global CheckInManager instance is connected in the AccountsListBox and updates the account list in the callback, and this is called on an already disposed instance. The solution probably would be to disconnect this signal handler in the CheckInDialog's "delete-event" handler.
Edited by Marcus Lundblad