Bug 1412218

Summary: gnome-shell-extension-places-menu fails with JS ERROR after some time has passed
Product: Red Hat Enterprise Linux 7 Reporter: Jonathan Billings <jsbillin>
Component: gnome-shell-extensionsAssignee: Florian Müllner <fmuellner>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: erik, jkoten, mboisver, vbudikov
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 22:44:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jonathan Billings 2017-01-11 14:38:57 UTC
Description of problem:
After the system has been booted for a couple weeks, the entries in the Places menu stop responding to clicks.  In the journal, I see:

Jan 11 08:59:29 caen-vnc-vm05 gnome-shell[25418]: GNOME Shell started at Wed Jan 11 2017 08:59:19 GMT-0500 (EST)
Jan 11 08:59:34 caen-vnc-vm05 gnome-session[25186]: (gnome-shell:25418): Gjs-WARNING **: JS ERROR: Error: can't convert timestamp to an integer
Jan 11 08:59:34 caen-vnc-vm05 gnome-session[25186]: PlaceInfo<.launch@/usr/share/gnome-shell/extensions/places-menu.github.com/placeDisplay.js:46
Jan 11 08:59:34 caen-vnc-vm05 gnome-session[25186]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Jan 11 08:59:34 caen-vnc-vm05 gnome-session[25186]: PlaceMenuItem<.activate@/usr/share/gnome-shell/extensions/places-menu.github.com/extension.js:55
Jan 11 08:59:34 caen-vnc-vm05 gnome-session[25186]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Jan 11 08:59:34 caen-vnc-vm05 gnome-session[25186]: PopupBaseMenuItem<._onButtonReleaseEvent@resource:///org/gnome/shell/ui/popupMenu.js:118
Jan 11 08:59:34 caen-vnc-vm05 gnome-session[25186]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169

Issue is also reported here:  https://github.com/gcampax/gnome-shell-extensions/issues/7

The solution of changing 'timestamp' to -1 in the javascript file fixes this for me.

Version-Release number of selected component (if applicable):
gnome-shell-extension-places-menu-3.14.4-21.el7.noarch

How reproducible:
It doesn't appear to happen right after a reboot, I didn't see this happen until the system had been up 26 days, even though people were logging in to all our systems for several weeks leading up to that time.

Steps to Reproduce:
1. Install gnome-shell-extension-places-menu-3.14.4-21.el7.noarch
2. Log in after several weeks and test.

Actual results:
Places menu entries are unresponsive.  Logs indicate javascript error.

Expected results:
Places menu entries will open up Nautilus windows in appropriate directories

Additional info:
https://github.com/gcampax/gnome-shell-extensions/issues/7

Comment 1 Jonathan Billings 2017-01-11 18:06:40 UTC
With some simple debugging (i.e. putting "log(timestamp)" in the javascript) I can see that timestamp is currently 2359526273 on the systems affected.  Perhaps this is because 2359526273 is greater than 2^31 milliseconds (signed 32-bit int, 2147483648 milliseconds).

Comment 2 Jonathan Billings 2017-01-11 18:24:01 UTC
And I confirmed this in lookingglass (Alt-F2 'lg'):

>>> global.create_app_launch_context(2359526273, -1)
r(0) = <exception Error: can't convert 2359526273 to an integer>
>>> global.create_app_launch_context(2147483648, -1)
r(1) = <exception Error: can't convert 2147483648 to an integer>
>>> global.create_app_launch_context(2147483647, -1)
r(2) = [object instance proxy GType:GdkX11AppLaunchContext jsobj@0x7f85941...

You can see that 2359526273 (earlier today) and 2147483648 (2^31) both create an exception, but 2147483647 (2^31 - 1) is fine.

So, looks like its a bug using a signed 32-bit int.

Comment 4 Jonathan Billings 2017-02-14 17:19:37 UTC
It's been over 27 days since I filed this bug, can anyone confirm it?

Comment 5 Florian Müllner 2017-02-16 13:04:35 UTC
Fixed upstream in https://bugzilla.gnome.org/show_bug.cgi?id=769216, which will be pulled in by the desktop rebase in RHEL 7.4.

Comment 8 errata-xmlrpc 2017-08-01 22:44:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2098