Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript stack trace with latest gjs from meter.js:35 #46

Open
genodeftest opened this issue Feb 11, 2018 · 3 comments
Open

Javascript stack trace with latest gjs from meter.js:35 #46

genodeftest opened this issue Feb 11, 2018 · 3 comments
Labels

Comments

@genodeftest
Copy link
Contributor

Steps to reproduce:
unclear.

What happens:
When running gnome-shell, the org.gnome.Shell.desktop ID logs these stack traces to syslog quite often:

Object Meta.BackgroundActor (0x5575699637a0), has been already finalized. Impossible to get any property from it.
== Stack trace for context 0x55d4af8c2000 ==
#0 0x7ffc203c1910 I   resource:///org/gnome/gjs/modules/_legacy.js:81 (0x7f5ab80c2bc0 @ 45)
#1 0x55d4afb3ee18 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/meter.js:35 (0x7f5a85d30918 @ 99)
#2 0x55d4afb3ed90 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/meter.js:69 (0x7f5a85d30b38 @ 25)
#3 0x7ffc203c32e0 b   /home/username/.local/share/gnome-shell/extensions/[email protected]/helpers/promise.js:48 (0x7f5a85d43a28 @ 215)

and some longer versions:

Object Meta.BackgroundActor (0x5575699637a0), has been already finalized. Impossible to get any property from it.
== Stack trace for context 0x55d4af8c2000 ==
#0 0x7ffc203c0990 I   resource:///org/gnome/gjs/modules/_legacy.js:80 (0x7f5ab80c2bc0 @ 26)
#1 0x55d4afb3eeb0 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/widget.js:350 (0x7f5a85d535e8 @ 41)
#2 0x7ffc203c1910 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f5ab80c2bc0 @ 71)
#3 0x55d4afb3ee18 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/meter.js:35 (0x7f5a85d30918 @ 99)
#4 0x55d4afb3ed90 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/meter.js:69 (0x7f5a85d30b38 @ 25)
#5 0x7ffc203c32e0 b   /home/username/.local/share/gnome-shell/extensions/[email protected]/helpers/promise.js:48 (0x7f5a85d43a28 @ 215)
Object Meta.BackgroundActor (0x5575699637a0), has been already finalized. Impossible to get any property from it.
== Stack trace for context 0x55d4af8c2000 ==
#0 0x55d4afb3ef50 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/widget.js:309 (0x7f5a85d53450 @ 10)
#1 0x7ffc203c0990 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f5ab80c2bc0 @ 71)
#2 0x55d4afb3eeb0 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/widget.js:328 (0x7f5a85d53560 @ 35)
#3 0x7ffc203c1910 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f5ab80c2bc0 @ 71)
#4 0x55d4afb3ee18 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/meter.js:35 (0x7f5a85d30918 @ 99)
#5 0x55d4afb3ed90 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/meter.js:69 (0x7f5a85d30b38 @ 25)
#6 0x7ffc203c32e0 b   /home/username/.local/share/gnome-shell/extensions/[email protected]/helpers/promise.js:48 (0x7f5a85d43a28 @ 215)
Object Meta.BackgroundActor (0x5575699637a0), has been already finalized. Impossible to get any property from it.
== Stack trace for context 0x55d4af8c2000 ==
#0 0x55d4afb3efe8 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/widget.js:102 (0x7f5a85d51670 @ 18)
#1 0x7ffc203bfd90 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f5ab80c2bc0 @ 71)
#2 0x55d4afb3ef50 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/widget.js:309 (0x7f5a85d53450 @ 51)
#3 0x7ffc203c0990 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f5ab80c2bc0 @ 71)
#4 0x55d4afb3eeb0 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/widget.js:328 (0x7f5a85d53560 @ 35)
#5 0x7ffc203c1910 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f5ab80c2bc0 @ 71)
#6 0x55d4afb3ee18 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/meter.js:35 (0x7f5a85d30918 @ 99)
#7 0x55d4afb3ed90 i   /home/username/.local/share/gnome-shell/extensions/[email protected]/meter.js:69 (0x7f5a85d30b38 @ 25)
#8 0x7ffc203c32e0 b   /home/username/.local/share/gnome-shell/extensions/[email protected]/helpers/promise.js:48

These stack traces come in mixed bursts, usually about 50 at once (same second according to syslog).

What should happen:
No stacktrace.

Additional info:
Printing these stacktraces is a feature introduced in or after 3.26.0 release, afaik. See also: sustmi/gnome-shell-extension-windowoverlay-icons#4 and https://gitlab.gnome.org/GNOME/gnome-shell/issues/11.

It is unclear to me why those stacktraces are thrown. They might be indicating that the object has already been destroyed somewhere else or that it cannot be destroyed because it is still being referenced by from somewhere else.

Please note that I did not disable this extension at all and I don't know why this function gets called. I guess that it is being called on screen lock or suspend.

Installed software versions:
gnome-shell-3.26.2-4.fc27.x86_64
gjs-1.50.4-1.fc27.x86_64
mutter-3.26.2-2.fc27.x86_64

@elvetemedve
Copy link
Owner

Hi @genodeftest,

Thanks for reporting this bug.
Updating the GUI happens asynchronously. When you lock your screen the extension will be disabled by Gnome and re-enabled after unocking the screen. The problem is the the UI widgets got destroyed, but the code wants to update it and it fails.
As far as I can tell the asynchron operations need to be cancelled when the extension is disabled.

@garymoon
Copy link

I have been experiencing this during the beta, and can confirm that it's still happening after the release of Ubuntu Bionic. I'm happy to help out with any fixes.

@elvetemedve
Copy link
Owner

I'm afraid this still going to happen randomly. There is a technical difficulty as Javascript does not allow cancelling Promise chains (https://stackoverflow.com/questions/29478751/cancel-a-vanilla-ecmascript-6-promise-chain#29479435).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants