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 650317 - crash in Alt+Tab due to bad pick
crash in Alt+Tab due to bad pick
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: app-switcher
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-05-16 14:14 UTC by Dan Winship
Modified: 2013-08-18 12:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
altTab: remove erroneous pick that seems to cause errors/crashes (1.02 KB, patch)
2011-05-16 14:14 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2011-05-16 14:14:51 UTC
an attempt to fix https://bugzilla.redhat.com/show_bug.cgi?id=697964

I haven't yet verified that it does fix that bug, but the existing code
seems wrong anyway, since clutter_stage_get_actor_at_pos() does not
actually force a relayout like it claims.

I don't know why the pick fails.
Comment 1 Dan Winship 2011-05-16 14:14:53 UTC
Created attachment 187916 [details] [review]
altTab: remove erroneous pick that seems to cause errors/crashes
Comment 2 Colin Walters 2011-05-16 18:38:44 UTC
It's worth noting that the original workaround doesn't have any useful information:

commit 6461db9df6b628b0326db9ff016ae984660613da
Author: Adel Gadllah <adel.gadllah@gmail.com>
Date:   Fri Mar 26 18:12:01 2010 +0100

    AppSwitcher: Make sure we always get the correct icon position
    
    Call stage.get_actor_at_pos before calling icon.get_transformed_position.


Adel?  Do you remember why this was added?
Comment 3 Colin Walters 2011-05-16 18:52:54 UTC
From a quick look at the code I agree that _get_actor_at_pos() won't do a relayout.

So, while the erroneous pick may *provoke* a crash, this is clearly a reference counting problem somewhere.  Look at the stack in
https://bugzilla.redhat.com/attachment.cgi?id=493263

  • #14 _clutter_input_device_update
    at ./clutter-input-device.c line 733

The 0xdecafbad value is a sentinel that Clutter uses for finalized actors.
Comment 4 Colin Walters 2011-05-16 18:54:00 UTC
Review of attachment 187916 [details] [review]:

Given the above analysis, fine to remove this.  But let's clone this bug for the crash.
Comment 5 Dan Winship 2011-05-16 19:11:57 UTC
(In reply to comment #3)
> The 0xdecafbad value is a sentinel that Clutter uses for finalized actors.

oh, hm, I was thinking it was getting a bogus value from gl and thus looking up an invalid index in the array, but getting a legitimate value corresponding to a finalized actor seems more likely (and probably means clutter is reusing the pick buffer when it shouldn't).

(In reply to comment #4)
> let's clone this bug for the crash.

eh, we can just keep this one
Comment 6 drago01 2011-05-22 17:21:16 UTC
(In reply to comment #2)
> It's worth noting that the original workaround doesn't have any useful
> information:
> 
> commit 6461db9df6b628b0326db9ff016ae984660613da
> Author: Adel Gadllah <adel.gadllah@gmail.com>
> Date:   Fri Mar 26 18:12:01 2010 +0100
> 
>     AppSwitcher: Make sure we always get the correct icon position
> 
>     Call stage.get_actor_at_pos before calling icon.get_transformed_position.
> 
> 
> Adel?  Do you remember why this was added?

IIRC it fixed a bug where the icons ended up being scrolled out of sight due to the getting wrong coordinates from get_transformed_position, fe08edbe2bf88aa43b643a added a similar fix later so it should be fine now (cannot reproduce the original bug with it removed).
Comment 7 Allan Day 2013-08-18 11:29:52 UTC
Is this still valid?
Comment 8 drago01 2013-08-18 12:11:31 UTC
(In reply to comment #7)
> Is this still valid?

No we use a St.Scrollview now.