Bug 503251 - Clutter picking is corrupted with Intel 965GM
Summary: Clutter picking is corrupted with Intel 965GM
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: mesa
Version: 11
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Dave Airlie
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-29 22:46 UTC by Marina Zhurakhinskaya
Modified: 2018-04-11 10:57 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-28 12:45:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Marina Zhurakhinskaya 2009-05-29 22:46:47 UTC
Clutter re-paints all of its actors in unique colors that have small values (and therefore end up being shades of blue) and then determines which actor is under the mouse pointer based on these colors. This process is called picking and the unique colors are referred to as pick colors. The pick colors are treated as actor ids.   

On my machine, which has an Intel 965GM chipset the pick colors are sometimes read back in incorrectly. They end up being the actual actor colors. This happens randomly, as in I'd mouse over a simple clutter actor such as a rectangle and some reads will come back correct and some won't. This problem only started occurring after the following Clutter commit that introduced clipping the pick area to a single pixel before repainting it in the pick color and reading the pick color value:
http://git.clutter-project.org/cgit.cgi?url=clutter/commit/&id=d1fa83039d12f8501075d3e9f7fd17a42cbdd7c8

I don't get this problem if I comment out the clipping. Owen who has a Radeon R300 chipset doesn't see this problem at all. This fact, the randomness of the corrupted read-outs, and a review of the relevant Clutter code makes me believe that this can be a driver problem.

The error that gets printed out when an incorrect pick color is read is the following:

(metacity:20914): Clutter-CRITICAL **: clutter_id_pool_lookup: assertion `id < id_pool->array->len' failed

The id is basically the pick color, and while it expects the small valued pick colors that are in the id arrays, it gets a large value which is the actual color on the screen and is outside of the array bounds. All sorts of random bad things happen if this error happens in GNOME Shell when I'm trying to drag or drop an actor.

This can be best tested by installing Clutter (standalone or as part of the GNOME Shell jhbuild) and running the test-events test in clutter/tests/interactive. You should be seeing the above error as you mouse over the rectangles. Only seeing valid values printed out with the debug comment suggested below means that you are not getting this error.

Clutter download instructions:
http://www.clutter-project.org/download.html

GNOME Shell download instructions:
http://live.gnome.org/GnomeShell#building

Reviewing the code in clutter-main.c:_clutter_do_pick() and adding the following g_debug line just before the return statement can be instructive when testing this problem:

g_debug("will get actor for id %x x: %d y: %d", id, x, y);

Comment 1 Bug Zapper 2009-06-09 16:49:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Matěj Cepl 2009-06-11 15:25:23 UTC
Marina, do we have that comment in Fedora packages, or do I have to rebuild from git?

Comment 3 Matěj Cepl 2009-06-11 15:50:34 UTC
I have tried to get tarball out of git repo, but it doesn't seem to work well.

bradford:clutter$ make dist
 (cd build && make  top_distdir=../clutter-0.9.3 distdir=../clutter-0.9.3/build \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
 (cd autotools && make  top_distdir=../../clutter-0.9.3 distdir=../../clutter-0.9.3/build/autotools \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
 (cd clutter && make  top_distdir=../clutter-0.9.3 distdir=../clutter-0.9.3/clutter \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[1]: *** No rule to make target `../clutter/clutter-enum-types.h', needed by `distdir'.  Stop.
make: *** [distdir] Error 1
bradford:clutter$

Comment 4 Matěj Cepl 2009-06-11 15:51:02 UTC
I will try just get tarball of the checkout.

Comment 5 Matěj Cepl 2009-06-11 16:15:36 UTC
managed to build on my computer with F11 (and it is available on http://mcepl.fedorapeople.org/rpms/), but failed with koji scratch build (https://koji.fedoraproject.org/koji/taskinfo?taskID=1405618). Will try local build

Comment 6 Matěj Cepl 2009-06-11 16:31:05 UTC
Hmm, not much testing unfortunately ... works perfectly (as expected) on my intel graphics. So at least somebody will have that build for testing on ATI.

Comment 7 Owen Taylor 2009-06-11 17:26:13 UTC
What are you trying to accomplish, Matej?

Comment 8 Marina Zhurakhinskaya 2009-06-11 17:50:12 UTC
Thanks for trying to reproduce that! For what it's worth, there were at least two other users on #gnome-shell IRC channel who ran into the same problem with Intel chipsets. I asked them to add a comment with their information to the bug, but I guess I wasn't persistent enough in encouraging them to do it.

Comment 9 Diego Escalante Urrelo 2009-06-22 00:32:31 UTC
I see this one too on 855GM:

00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02) (prog-if 00 [VGA controller])
	Subsystem: IBM ThinkPad R50e
	Flags: bus master, fast devsel, latency 0, IRQ 11
	Memory at e0000000 (32-bit, prefetchable) [size=128M]
	Memory at d0000000 (32-bit, non-prefetchable) [size=512K]
	I/O ports at 1800 [size=8]
	Expansion ROM at <unassigned> [disabled]
	Capabilities: <access denied>

I'm using DRI2, almost master head intel driver, kernel 2.6.30.

Comment 10 Diego Escalante Urrelo 2009-06-22 00:40:34 UTC
Just reverted the commit, rebuilt and tried the clutter test Marina mentioned, it still triggers the bug.

Comment 11 Diego Escalante Urrelo 2009-08-16 18:25:36 UTC
Still seeing this with clutter-1.0 branch from git. Sadly this makes gnome-shell impossible to use for me, since I can't click on anything at all.

Comment 12 Diego Escalante Urrelo 2009-09-27 18:26:38 UTC
Reported this upstream: https://bugs.freedesktop.org/show_bug.cgi?id=24140

Comment 13 Matěj Cepl 2009-11-05 18:30:16 UTC
Since this bugzilla report was filed, there have been several major updates in various components of the Xorg system, which may have resolved this issue. Users who have experienced this problem are encouraged to upgrade their system to the latest version of their packages. For packages from updates-testing repository you can use command

yum upgrade --enablerepo='*-updates-testing'

Alternatively, you can also try to test whether this bug is reproducible with the upcoming Fedora 12 distribution by downloading LiveMedia of F12 Beta available at http://alt.fedoraproject.org/pub/alt/nightly-composes/ . By using that you get all the latest packages without need to install anything on your computer. For more information on using LiveMedia take a look at https://fedoraproject.org/wiki/FedoraLiveCD .

Please, if you experience this problem on the up-to-date system, let us now in the comment for this bug, or whether the upgraded system works for you.

If you won't be able to reply in one month, I will have to close this bug as INSUFFICIENT_DATA. Thank you.

[This is a bulk message for all open Fedora Rawhide Xorg-related bugs. I'm adding myself to the CC list for each bug, so I'll see any comments you make after this and do my best to make sure every issue gets proper attention.]

Comment 14 Diego Escalante Urrelo 2009-11-23 15:11:27 UTC
This still happens in F12 for me.

Comment 15 Bug Zapper 2010-04-27 14:34:47 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 16 Diego Escalante Urrelo 2010-05-27 07:48:00 UTC
For the record this was fixed in a mesa release sometime between F12 and F13. I think some 7.7.x release. In F13 clutter picking works for me in Shell.

Comment 17 Bug Zapper 2010-06-28 12:45:27 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.