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 723661 - JS ERROR: Exception in callback for signal: updated: Error: can't convert 1.1643481557558656e+26 to an integer
JS ERROR: Exception in callback for signal: updated: Error: can't convert 1.1...
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-02-05 10:54 UTC by Giovanni Campagna
Modified: 2021-07-05 14:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
LayoutManager: untrack actors that are destroyed (1.56 KB, patch)
2014-02-08 20:58 UTC, Giovanni Campagna
committed Details | Review
LayoutManager: don't crash if an actor has no allocation (1.38 KB, patch)
2014-02-08 20:59 UTC, Giovanni Campagna
reviewed Details | Review

Description Giovanni Campagna 2014-02-05 10:54:29 UTC
LayoutManager<.findIndexForActor@resource:///org/gnome/shell/ui/layout.js:892
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
LayoutManager<.findMonitorForActor@resource:///org/gnome/shell/ui/layout.js:897
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
LayoutManager<._updateVisibility@resource:///org/gnome/shell/ui/layout.js:872
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
LayoutManager<._sessionUpdated@resource:///org/gnome/shell/ui/layout.js:271
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
_emit@resource:///org/gnome/gjs/modules/signals.js:124
SessionMode<._sync@resource:///org/gnome/shell/ui/sessionMode.js:199
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
SessionMode<.popMode@resource:///org/gnome/shell/ui/sessionMode.js:168
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
ScreenShield<._continueDeactivate@resource:///org/gnome/shell/ui/screenShield.js:1214
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
ScreenShield<.deactivate/<@resource:///org/gnome/shell/ui/screenShield.js:1199
AuthPrompt<.finish@resource:///org/gnome/shell/gdm/authPrompt.js:490
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
UnlockDialog<.finish@resource:///org/gnome/shell/ui/unlockDialog.js:147
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
ScreenShield<.deactivate@resource:///org/gnome/shell/ui/screenShield.js:1198
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
ScreenShield<._init/</<@resource:///org/gnome/shell/ui/screenShield.js:570
_emit@resource:///org/gnome/gjs/modules/signals.js:124
_convertToNativeSignal@resource:///org/gnome/gjs/modules/overrides/Gio.js:129

Don't ask me how that is possible!
Comment 1 Giovanni Campagna 2014-02-05 10:55:10 UTC
Followed by

(gnome-shell:2062): Gjs-WARNING **: JS ERROR: Error: can't convert 1.168745859543038e+26 to an integer
LayoutManager<.findIndexForActor@resource:///org/gnome/shell/ui/layout.js:892
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
LayoutManager<.findMonitorForActor@resource:///org/gnome/shell/ui/layout.js:897
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
LayoutManager<._updateVisibility@resource:///org/gnome/shell/ui/layout.js:872
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
LayoutManager<._windowsRestacked@resource:///org/gnome/shell/ui/layout.js:931
wrapper@resource:///org/gnome/gjs/modules/lang.js:169

At each windows-restacked emission.
Comment 2 Giovanni Campagna 2014-02-08 20:58:54 UTC
Created attachment 268524 [details] [review]
LayoutManager: untrack actors that are destroyed

If an actor is destroyed, calling get_transformed_size()/position()
can return bogus values and trigger JS exceptions.
This can happen if a tracked actor comes from an extension
(such as classic mode's window-list) and that extension is
deactivated.
Comment 3 Giovanni Campagna 2014-02-08 20:59:06 UTC
Created attachment 268525 [details] [review]
LayoutManager: don't crash if an actor has no allocation

Inside _sessionUpdated()/_updateVisibility(), we might call
findIndexForActor() for actors that were just created (for
example because they come from extensions that were just
enabled due to the session-mode change). For them,
get_transformed_position() and get_transformed_size() return
bogus values, that later cause a JS exception when we pass
them to MetaRectangle, because they can't be converted to
int.
Comment 4 Jasper St. Pierre (not reading bugmail) 2014-02-08 21:52:57 UTC
Review of attachment 268524 [details] [review]:

OK.
Comment 5 Giovanni Campagna 2014-02-09 18:30:07 UTC
Comment on attachment 268524 [details] [review]
LayoutManager: untrack actors that are destroyed

Attachment 268524 [details] pushed as 477f28a - LayoutManager: untrack actors that are destroyed
Comment 6 Jasper St. Pierre (not reading bugmail) 2014-02-20 21:54:53 UTC
Review of attachment 268525 [details] [review]:

I'm quite sure if !has_allocation(), get_transformed_position() / get_transformed_size() should return -1.
Comment 7 GNOME Infrastructure Team 2021-07-05 14:14:59 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/

Thank you for your understanding and your help.