After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763068 - gnome-shell spams journal with gjs messages
gnome-shell spams journal with gjs messages
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2016-03-03 23:14 UTC by Armin K.
Modified: 2016-04-21 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Journal output (1.30 MB, text/plain)
2016-03-03 23:24 UTC, Armin K.
  Details
Journal output 2 (38.13 KB, text/plain)
2016-04-02 15:23 UTC, Armin K.
  Details
workspaceThumbnail: Fix size request signatures (1.19 KB, patch)
2016-04-21 11:34 UTC, Florian Müllner
committed Details | Review

Description Armin K. 2016-03-03 23:14:30 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.
Comment 1 Giovanni Campagna 2016-03-03 23:22:23 UTC
Are these actually gjs debug messages, or more likely uncaught exceptions that get logged?
Comment 2 Armin K. 2016-03-03 23:24:52 UTC
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.
Comment 3 Florian Müllner 2016-03-04 00:30:18 UTC
(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.
Comment 4 Armin K. 2016-03-04 06:43:13 UTC
I'm only using extensions from gnome-shell-extensions and default theme from gnome-themes-standard/gtk+
Comment 5 Armin K. 2016-04-02 10:33:46 UTC
This is still an issue. Is there an option to turn all gjs output?
Comment 6 Rui Matos 2016-04-02 15:08:57 UTC
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.
Comment 7 Armin K. 2016-04-02 15:23:48 UTC
Created attachment 325222 [details]
Journal output 2

Here you go
Comment 8 Armin K. 2016-04-14 16:35:40 UTC
Ping?
Comment 9 Rui Matos 2016-04-14 18:20:10 UTC
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
Comment 10 Armin K. 2016-04-14 18:46:00 UTC
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.
Comment 11 Florian Müllner 2016-04-21 11:34:34 UTC
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) ...
Comment 12 Rui Matos 2016-04-21 13:55:17 UTC
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
Comment 13 Florian Müllner 2016-04-21 14:07:29 UTC
Attachment 326480 [details] pushed as 8fd6e93 - workspaceThumbnail: Fix size request signatures

Yeah, that could be it.
Comment 14 Armin K. 2016-04-21 16:24:34 UTC
I'm using mozjs 24.2.0 here, source tarball is from mozilla.org and the source is not patched or anything like that.