GNOME Bugzilla – Bug 763068
gnome-shell spams journal with gjs messages
Last modified: 2016-04-21 16:24:34 UTC
I haven't noticed this before, but now gnome-shell-3.19.91 spams journal with gjs debug messages which are useless to an end user. Please disable them by default, developers can turn them on when they need them. Example: Mar 04 00:06:20 krejzi org.gnome.Shell.desktop[654]: wrapper@resource:///org/gnome/gjs/modules/lang.js:178 Mar 04 00:06:20 krejzi org.gnome.Shell.desktop[654]: ThumbnailsBox<._allocate@resource:///org/gnome/shell/ui/workspaceThumbnail.js:1273 Mar 04 00:06:20 krejzi org.gnome.Shell.desktop[654]: wrapper@resource:///org/gnome/gjs/modules/lang.js:178 Mar 04 00:06:20 krejzi org.gnome.Shell.desktop[654]: SlideLayout<.vfunc_allocate@resource:///org/gnome/shell/ui/overviewControls.js:76 For 4 hours of system uptime, I get: $ journalctl -b | grep gnome.Shell | wc -l 8358 With all these useless lines it's hard to find some information that's actually useful and needed for some debugging.
Are these actually gjs debug messages, or more likely uncaught exceptions that get logged?
Created attachment 323039 [details] Journal output I am not really sure, I don't see many "Exception" words around. You can see for yourself tho.
(In reply to Armin K. from comment #2) > I am not really sure, I don't see many "Exception" words around. The messages you are seeing do indeed belong to exceptions, for example (gnome-shell:654): Gjs-WARNING **: JS ERROR: Error: value is out of range for Argument 'for_height' (type gfloat) (there are others for get_preferred_height() and allocate() as well) Unless this is caused by an extension or custom theme, it's an error that needs to be tracked down and fixed.
I'm only using extensions from gnome-shell-extensions and default theme from gnome-themes-standard/gtk+
This is still an issue. Is there an option to turn all gjs output?
Can you recompile gnome-shell locally? I'm curious what's the value that's causing these exceptions: Mar 03 20:41:43 krejzi org.gnome.Shell.desktop[654]: (gnome-shell:654): Gjs-WARNING **: JS ERROR: Error: value is out of range for Argument 'for_width' (type gfloat) Mar 03 20:41:43 krejzi org.gnome.Shell.desktop[654]: PrimaryActorLayout<.vfunc_get_preferred_height@resource:///org/gnome/shell/ui/workspaceThumbnail.js:53 in workspaceThumbnail.js around line 53 add log(forWidth); before the vfunc returns.
Created attachment 325222 [details] Journal output 2 Here you go
Ping?
Apr 02 17:21:27 krejzi org.gnome.Shell.desktop[688]: Gjs-Message: JS LOG: [0x5e38d50 ClutterActor] Apr 02 17:21:27 krejzi org.gnome.Shell.desktop[688]: (gnome-shell:688): Gjs-WARNING **: JS ERROR: Error: value is out of range for Argument 'for_width' (type gfloat) for_width is a ClutterActor. I have no idea how this can ever happen
From what I've noticed, the messages appear when I hit the "Mod" button to bring the overview. There happens to be a set of similar messages for every window that's currently open. Running diff on journal output before and after opening the overview, the following appears for *one* window: Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: (gnome-shell:681): Gjs-WARNING **: JS ERROR: Error: value is out of range for Argument 'for_height' (type gfloat) Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: PrimaryActorLayout<.vfunc_get_preferred_width@resource:///org/gnome/shell/ui/workspaceThumbnail.js:49 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: wrapper@resource:///org/gnome/gjs/modules/lang.js:178 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: ThumbnailsBox<._allocate@resource:///org/gnome/shell/ui/workspaceThumbnail.js:1273 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: wrapper@resource:///org/gnome/gjs/modules/lang.js:178 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: SlideLayout<.vfunc_allocate@resource:///org/gnome/shell/ui/overviewControls.js:76 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: wrapper@resource:///org/gnome/gjs/modules/lang.js:178 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: _parent@resource:///org/gnome/gjs/modules/lang.js:131 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: ControlsLayout<.vfunc_allocate@resource:///org/gnome/shell/ui/overviewControls.js:400 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: wrapper@resource:///org/gnome/gjs/modules/lang.js:178 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: LayoutManager<._init/<@resource:///org/gnome/shell/ui/layout.js:204 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: (gnome-shell:681): Gjs-WARNING **: JS ERROR: Error: value is out of range for Argument 'for_width' (type gfloat) Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: PrimaryActorLayout<.vfunc_get_preferred_height@resource:///org/gnome/shell/ui/workspaceThumbnail.js:53 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: wrapper@resource:///org/gnome/gjs/modules/lang.js:178 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: ThumbnailsBox<._allocate@resource:///org/gnome/shell/ui/workspaceThumbnail.js:1273 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: wrapper@resource:///org/gnome/gjs/modules/lang.js:178 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: SlideLayout<.vfunc_allocate@resource:///org/gnome/shell/ui/overviewControls.js:76 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: wrapper@resource:///org/gnome/gjs/modules/lang.js:178 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: _parent@resource:///org/gnome/gjs/modules/lang.js:131 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: ControlsLayout<.vfunc_allocate@resource:///org/gnome/shell/ui/overviewControls.js:400 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: wrapper@resource:///org/gnome/gjs/modules/lang.js:178 Apr 14 20:41:53 krejzi org.gnome.Shell.desktop[681]: LayoutManager<._init/<@resource:///org/gnome/shell/ui/layout.js:204 All of the above is repeated N times, where N is number of windows displayed in the overview (no of windows currently open). Now, I don't know how mutter/gnome-shell interprets windows thumbnails in overview. Maybe they are clutter widgets, which could explain why there's a ClutterActor being mentioned. One could guess that the function tries to access the Actor itself, not its width/height.
Created attachment 326480 [details] [review] workspaceThumbnail: Fix size request signatures ClutterLayoutManager's size request methods have an additional container argument before the for-width/height parameters compared to ClutterActor. (In reply to Rui Matos from comment #9) > for_width is a ClutterActor. I have no idea how this can ever happen After figuring it out, I'm buffled why I never saw those warnings (and presumably you didn't either) ...
Review of attachment 326480 [details] [review]: Well, damn. This just went unnoticed for 3.5 years... I suppose Armin might be using a newer mozjs version and that's why we don't see the errors? I have mozjs 24 fwiw
Attachment 326480 [details] pushed as 8fd6e93 - workspaceThumbnail: Fix size request signatures Yeah, that could be it.
I'm using mozjs 24.2.0 here, source tarball is from mozilla.org and the source is not patched or anything like that.