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 440948 - GDM Startup Fails With Accessible login
GDM Startup Fails With Accessible login
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other All
: Normal critical
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2007-05-24 14:09 UTC by Rui
Modified: 2007-09-17 17:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Check num_classes (549 bytes, patch)
2007-09-10 23:07 UTC, Gerd Kohlberger
committed Details | Review
Free DeviceList (359 bytes, patch)
2007-09-10 23:08 UTC, Gerd Kohlberger
committed Details | Review
Remove window cast (933 bytes, patch)
2007-09-12 20:06 UTC, Gerd Kohlberger
committed Details | Review

Description Rui 2007-05-24 14:09:59 UTC
Please describe the problem:
As referred in:

https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/107383

Enabling "Accessible login" in GDM Setup, causes X/Ubuntu to freeze when loading GDM, a valid workaround is referred on the previous link

Steps to reproduce:
1. type in terminal gdmsetup
2. go to Accessibility tab and select, "Accessible login"
3. Restart X


Actual results:
GDM freezes at startup, in an infinite loop

Expected results:
Should load GDM, and ask for a valid login / password

Does this happen every time?
yes

Other information:
Comment 1 Brian Cameron 2007-06-04 04:41:15 UTC
This sounds bad.  I'd be happy to accept a patch to fix this problem.
Comment 2 Brian Cameron 2007-07-31 20:49:54 UTC
I believe the problem is that when you turn on accessibility that the gesture listeners are crashing.  I looked at a Ubuntu system and this seems to be the case.

Note you can run the gesture listeners with other programs for easier debugging, like so:

1) Get the value that GDM is using for setting GtkModulesList by either looking
   in the config file or by running this command:

   gdmflexiserver --command="GET_CONFIG daemon/GtkModulesList"

   If this command just returns "OK", then this means it isn't set in the config
   file (it is commented out), so look up the commented out value in the actual
   config file.

2) Then set the environment variable GTK_MODULES to this value.

3) Then run gnome-calculator or some other GTK+ based program.  You should see
   the same crash, and can debug with gdb or your favorite debugger.

Note that I don't see any crashing problems on Solaris, so the problem is 
likely a bit specific to how Ubuntu works.
Comment 3 Rui 2007-07-31 23:49:14 UTC
Hi Brian

I tried to replicate what you have said, and correct me if i have done something wrong, or i misunderstood you,  since i'm not a very experienced user.

1) tried that and it returned OK

2) i have set environment variable GTK_MODULES to what ubuntu fills when i enable accessible login, and previously referred on my bad gdm.conf-custom, that is on the link of the launchpad, that is:

GTK_MODULES="gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/"

3)when i have launched gnome-calculator i got the following error in the console

--------------------------------
Gtk-Message: Failed to load module "/usr/lib/gtk-2.0/modules/": /usr/lib/gtk-2.0/modules/.so: cannot open shared object file: No such file or directory
GTK Accessibility Module initialized

** (gcalctool:4784): WARNING **: AT_SPI_REGISTRY was not started at session startup.

** (gcalctool:4784): WARNING **: IOR not set.

** (gcalctool:4784): WARNING **: Could not locate registry

I noticed also that all the gnome session suddenly slowed down notably, the drop down menus, the launch of applications, since i have filled the GTK_MODULES those got slowed down.

I don't know how to use gdb or another debugger in linux. If you need further information from the debugger, i ask you patience to point me in the right direction. 
Comment 4 Brian Cameron 2007-08-01 00:03:31 UTC
I think you have an incomplete line there.  The line should probably be something like:

gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/libdwellmouselistener

Note in your line you are missing the libdwellmouselistener bit from the end of the line.

Setting this environment variable shouldn't affect other programs unless you run those programs with it set.  So if you put it in your $HOME/.profile or something then it would affect all programs and be quite slow.  If you set it in a terminal it should only affect programs you start with that program.  That said, it will slow down the system a bit because the dwellmouselistener is listening for mouse events to see if a gesture is being used.  This is really intended just for GDM where only one program is running, so I wouldn't worry too much about the slowness.  It's just for testing the problem.  It's easier than trying to debug directly with gdmlogin or gdmgreeter at login time.

When you get this working, just do this:

run gdb
set the environment variable in gdm just like you do in a normal terminal
then run

If it crashes, it should show a stacktrace.  That is useful to me.  If the problem is with a variable you can do things like "print variablename" to see the values.  Note you have to compile gdm with -g to be able to see symbol information with the print command.

Comment 5 Rui 2007-08-01 11:09:54 UTC
Hello again

This time i got a error and the debugger aborted.

here are the steps i have did

launched terminal and typed:

rui@ubuntu:~$ gdb gnome-calculator

#here is gdb output and my input

GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) set environment GTK_MODULES="gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/libdwellmouselistener"
(gdb) run

Starting program: /usr/bin/gnome-calculator 
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1225680704 (LWP 4880)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Gtk-Message: Failed to load module ""gail": lib"gail.so: cannot open shared object file: No such file or directory
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Gtk-Message: Failed to load module "/usr/lib/gtk-2.0/modules/libdwellmouselistener"": /usr/lib/gtk-2.0/modules/libdwellmouselistener".so: cannot open shared object file: No such file or directory
(no debugging symbols found)

** ERROR **: file accessible.c: line 551 (spi_accessible_construct): assertion failed: (o)
aborting...
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread -1225680704 (LWP 4880)]
0xb79d7d2b in g_logv () from /usr/lib/libglib-2.0.so.0

Comment 6 Rui 2007-08-01 11:22:48 UTC
guess i made a mistake on previous comment. This time it doesn't gave me any errors or aborted, just several warnings.

i used "" on the setenvironment, and those errors where because of gdb doesnt like "", i have done again the same steps without the quotes:

(gdb) GTK_MODULES="ail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/libdwellmouselistener

(gdb) run

---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
GTK Accessibility Module initialized

** (gcalctool:4922): WARNING **: AT_SPI_REGISTRY was not started at session startup.

** (gcalctool:4922): WARNING **: IOR not set.

** (gcalctool:4922): WARNING **: Could not locate registry
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'


(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4922): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'
(....)
Comment 7 Brian Cameron 2007-08-01 16:02:59 UTC
In the first case you use "set environment" in the second case you don't.  I wonder if the environment is actually set in the 2nd case.  

In the first case, it complains that it cannot find the shared object /usr/lib/gtk-2.0/modules/libdwellmouselistener".so.  Perhaps on Ubuntu this file is installed somewhere else?  You need to set the environment variable so the path points to the right location of the actual GTK_MODULE that implements the gesture listener.

On Ubuntu does the GDM configuration file point to the wrong location of the file?  This might make accessibility not work with GDM. 

It looks like you are getting this assertion:

 file accessible.c: line 551 (spi_accessible_construct): assertion
failed: (o)

If you can reproduce this problem consistantly, then this may be a problem with the at-spi module crashing, causing GDM to crash.  If you can reproduce this crash, then I'd file a bug about this issue in the at-spi module.
Comment 8 Rui 2007-08-01 22:20:26 UTC
Hi.

My correction (the second case is the correct one), so lets see...

i did an ls to /usr/lib/gtk-2.0/modules/, and the modules are correctly in place.

rui@ubuntu:~$ ls /usr/lib/gtk-2.0/modules/
libatk-bridge.la          libferret.so      libkeymouselistener.so
libatk-bridge.so          libgail-gnome.so
libdwellmouselistener.so  libgail.so

as i mentioned before the set environment inside gdb doesn't like quotes (" ").

so this is wrong:
 set environment GTK_MODULES="gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/libdwellmouselistener"

this is right:
 set environment GTK_MODULES=gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/libdwellmouselistener

it was the quote who where causing those errors in the first case, gdb was interpreting the quotes and looking for:

libdwellmouselistener".so.

and not the real library named:

libdwellmouselistener.so.

After cheking this, i have done again the following steps:

#copy of my console steps 
###############################################################

rui@ubuntu:~$ gdb gnome-calculator

GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) set environment GTK_MODULES=gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/libdwellmouselistener

(gdb) run

Starting program: /usr/bin/gnome-calculator 
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1226368832 (LWP 4812)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---

(...)

#the GTK Accessibility is correctly loaded, but there are warnings...

GTK Accessibility Module initialized

** (gcalctool:4812): WARNING **: AT_SPI_REGISTRY was not started at session startup.

** (gcalctool:4812): WARNING **: IOR not set.

** (gcalctool:4812): WARNING **: Could not locate registry
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

#when i move the calculator from place  (drag and drop) i get the following errors


(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkButton' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:4812): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'


(...)

###############################################################

This is the right debug!

 
Comment 9 Brian Cameron 2007-08-01 22:28:47 UTC
I think those warnings are with gcalctool.  I bet you get them if you run gcalctool without the GTK_MODULES as well.  If so, we don't need to discuss them further here.

Try setting another environment variable GDM_DEBUG_GESTURES=1 and this should cause the modules to spit out a bunch of debug messages about when you hit keys and when you move the mouse around (in and out of the window).  Does this seem to work?

If so, then I'm confused.  On the Ubuntu system I was looking at it seemed that the modules were crashing and I'd expect that to cause the problem you are describing with the login program not ever showing up.  If it isn't crashing, I'm unsure why the gdmlogin program is failing to work with these modules.

One thing you could test is edit your /etc/X11/gdm/Init/Default script and tell it to start up a terminal by adding this line:

/usr/bin/xterm &

(or wherever xterm is on your system - I assume in /usr/bin).  Then when you restart GDM you should see a terminal window.  Try running the same steps (set the environment variables and run gnome-calculator) and see if it works.  Perhaps something is weird about trying to run GTK_MODULES as the gdm user at login time.

Comment 10 Rui 2007-08-04 23:32:00 UTC
Hi

Managed to get some time to tried what you have suggested and i have run the following without any environment variables:

#########################################
rui@ubuntu:~$ gdb gcalctool
(...)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) run
#########################################

Well i guess you have bet wrong ;), i have found no debug symbols or warnings from the gdb in the terminal. 

I also tried running gdb gedit (for proving that these warnings weren't exclusively caused by the calculator) with the environment variable GTK_MODULES, and it got the same warnings that gdb provided me, when running gcalctool. 

After that i tried setting the GTK_MODULES, and the GDM_DEBUG_GESTURES environment variables 

#########################################
rui@ubuntu:~$ gdb gcalctool
(...)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) set environment GTK_MODULES=gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/libdwellmouselistener
(gdb) set environment GDM_DEBUG_GESTURES=1
(gdb) run
##########################################


This gave me the exact same set of messages on my previous post without the GDM_DEBUG_GESTURES, which are:

#########################################
GTK Accessibility Module initialized

** (gcalctool:13696): WARNING **: AT_SPI_REGISTRY was not started at session startup.

** (gcalctool:13696): WARNING **: IOR not set.

** (gcalctool:13696): WARNING **: Could not locate registry
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

(gcalctool:13696): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'
(no debugging symbols found)

(gcalctool:13696): GLib-GObject-WARNING **: invalid cast from `GtkEventBox' to `GtkWindow'

(gcalctool:13696): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:13696): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:13696): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:13696): GLib-GObject-WARNING **: invalid cast from `GtkImageMenuItem' to `GtkWindow'

(gcalctool:13696): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(gcalctool:13696): GLib-GObject-WARNING **: invalid cast from `GtkMenuBar' to `GtkWindow'

(...)
#########################################


I have followed after this your final suggestion and edited /etc/X11/gdm/Init/Default
 and i have added /usr/bin/xterm & and did the exact same thing as described earlier with both the environment variables, and the same warning messages appeared.

Looks like the problem is indeed listed on those warnings. 
Comment 11 Brian Cameron 2007-08-05 05:43:24 UTC
That's really odd.  Did you see extra debug messages when setting GDM_DEBUG_GESTURES?  It should generate output when the mouse moves in/out of windows and when you hit keys.  Also, when you complete gestures, the AT programs specified in the module configuration files should get launched.  Refer to /etc/X11/gdm/modules for information about the gestures.  The ascii files there have comments showing what is expected.

If you are not seing debug messages and gestures don't launch AT programs, then I'm guessing we might be doing something wrong with launching the program with the modules.  Instead of setting GTK_MODULES environment variable, you can also run programs with --gtk-modules=list option, where list is the list of modules to load.

If programs aside from the greeters work with the gesture listeners okay, then I'm at a loss to understand why the greeters don't work with "accessibility enabled" since all this does is launch gdmgreeter/gdmlogin with the modules flag turned on as you are testing.
Comment 12 Rui 2007-08-05 17:41:05 UTC
Hi

well the computer i was using (my personal desktop computer), for debugging the error turned out, that the error's gone, and now it is working with the accessible login enabled (lets me login with accessible login enabled). That is why we weren't catching any relevant error. It was on this PC that i found originally the error, i don't know what i did , or if it was an update from a third party software application / repository, that resolved the issue, but it is now working. Sorry if i made you loose time on that.

However i have a recent installation of ubuntu 7.04 on my laptop, without any tweak, and only with ubuntu official repositories, and i found that the original accessible login error is still present. So i tried to do the steps you have recommended me earlier and this time gcalctool aborted abnormally in the debugging process, here are the logs / steps:

rui@ubuntu:~$ gdb gnome-calculator
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) set environment GTK_MODULES=gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/libdwellmouselistener
(gdb) set environment GDM_DEBUG_GESTURES=1
(gdb) run
Starting program: /usr/bin/gnome-calculator 
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(...)
GTK Accessibility Module initialized

** (gcalctool:5805): WARNING **: AT_SPI_REGISTRY was not started at session startup.

** (gcalctool:5805): WARNING **: IOR not set.

** (gcalctool:5805): WARNING **: Could not locate registry
The program 'gcalctool' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDevice, invalid or uninitialized input device'.
  (Details: serial 92 error_code 169 request_code 145 minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Program exited with code 01.

I tried the same steps but debugging with gedit, and the error is the same. I think that we finally got here something.
Comment 13 Rui 2007-08-05 18:09:04 UTC
Well, i thought a little about this and i think i know where the conflict is, i remember tweaking my xorg.conf of my  desktop pc, and removing the wacom devices configuration that ubuntu bundles with (since i have no wacom devices),  i removed that extra configuration of the laptop and now he is working with accessible login, no longer loops forever when launching the GDM, i show you here the xorg.conf lines i have commented to get this working:

(...)

#Section "InputDevice"
#        Driver          "wacom"
#        Identifier      "stylus"
#        Option          "Device"        "/dev/input/wacom"
#        Option          "Type"          "stylus"
#        Option          "ForceDevice"   "ISDV4"         # Tablet PC ONLY
#EndSection

#Section "InputDevice"
#        Driver          "wacom"
#        Identifier      "eraser"
#        Option          "Device"        "/dev/input/wacom"
#        Option          "Type"          "eraser"
#        Option          "ForceDevice"   "ISDV4"         # Tablet PC ONLY
#EndSection

#Section "InputDevice"
#        Driver          "wacom"
#        Identifier      "cursor"
#        Option          "Device"        "/dev/input/wacom"
#        Option          "Type"          "cursor"
#        Option          "ForceDevice"   "ISDV4"         # Tablet PC ONLY
#EndSection

(...)

Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Default Screen"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
#        InputDevice     "stylus"        "SendCoreEvents"
#        InputDevice     "cursor"        "SendCoreEvents"
#        InputDevice     "eraser"        "SendCoreEvents"
        InputDevice     "Synaptics Touchpad"
EndSection


I don't know if this helps, but this workaround resolves the issue, and isolates the problem.
Comment 14 Brian Cameron 2007-08-05 18:20:14 UTC
Yes, it now looks like you are seeing the errors I was expecting you to see.

Based on what you've shared, I think the problem is with the XInput device logic.  The BadDevice X error seems to also be related to XInput.  Though we need to confirm.

Try modifying the GTK_MODULES as follows:

test #1 - only set it to gail:atk-bridge:/full/path/to/libdwellmouselistener
test #2 - only set it to gail:atk-bridge:/full/path/to/libkeymouselistener

Do both fail?  I'm guessing that likely only the libkeymouselistener is having failure problems since it is the one that tries to work with XInput devices.

So, now what we need to do is track down which X call is causing the problem.   Try running with the --sync option so that X interactions are done syncrhonously, then you should get a stacktrace that shows which X call is causing the problem.
Perhaps we need to add some extra logic to handle failure better.  Perhaps because it was in your xorg.conf, GDM was just assuming the devices really exist when they don't?  So perhaps we can detect this case and fail without generating an error if we code the logic right.

At any rate, I'm glad you have a workaround to your problem.
Comment 15 Rui 2007-08-05 19:38:25 UTC
Well actually, both tests:

(gdb) set environment GTK_MODULES=gail:atk-bridge:/usr/lib/gtk-2.0/modules/libdwellmouselistener
(gdb) run

and

(gdb) set environment GTK_MODULES=gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener
(gdb) run

generate the same debug error:

GTK Accessibility Module initialized

** (gcalctool:5770): WARNING **: AT_SPI_REGISTRY was not started at session startup.

** (gcalctool:5770): WARNING **: IOR not set.

** (gcalctool:5770): WARNING **: Could not locate registry
The program 'gcalctool' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDevice, invalid or uninitialized input device'.
  (Details: serial 89 error_code 169 request_code 145 minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)


i also set tried the --sync parameter like the following:

(gdb) set environment GTK_MODULES=gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/libdwellmouselistener
(gdb) run --sync

but it  gives me the same error... Will i need to introduce a breaking point? I have tried introducing as suggested on the previous error:

################################################
(gdb) break 'gdk_x_error'Function "gdk_x_error" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 ('gdk_x_error') pending.
################################################

and run it again, but it doesn't give me any further information, than the above. Can you provide me with further instructions on how to use the --sync switch?
Comment 16 Brian Cameron 2007-08-06 05:00:42 UTC
If you set a breakpoint in gdk_x_error, then when it generates the error message and gets to that function it should stop and present you with a "(gdb)" prompt again.  Then you can type "where" to get a stacktrace of where the process is at the point of the error.  This should identify which X call is causing the problem.
Comment 17 Rui 2007-08-15 21:23:28 UTC
Hi

Sorry, i went on small vacation away from my home without a PC.

I recently tried insistingly what you suggested, here are the steps:

rui@ubuntu:~$ gdb gnome-calculator

(gdb) set environment GTK_MODULES=gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/libdwellmouselistener
(gdb) break gdk_x_error
Function "gdk_x_error" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (gdk_x_error) pending.
(gdb) run --sync

#################################################################
GTK Accessibility Module initialized

** (gnome-terminal:5857): WARNING **: AT_SPI_REGISTRY was not started at session startup.

** (gnome-terminal:5857): WARNING **: IOR not set.

** (gnome-terminal:5857): WARNING **: Could not locate registry
The program 'gnome-terminal' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDevice, invalid or uninitialized input device'.
  (Details: serial 114 error_code 169 request_code 145 minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
##################################################################
Program exited with code 01.
(gdb) where
No stack.

I always get no stack, my guess is he is not stopping at the breakpoint defined in gdk_x_error function. I have searched the net if i was defining wrong the breakpoint but found similar usages that got a stack. Don't know what else to do next. Please provide me more information in order to catch a meaningful backtrace

Comment 18 Brian Cameron 2007-08-15 21:59:06 UTC
Based on the message telling you to "run it with the --sync" option, I don't think the --sync option is being honored.  Looking at gcalctool -?, this program doesn't seem to accept --sync.  I see gedit does when I run "gedit --help-all" have a --sync option.  Does trying with gedit work better?
Comment 19 Rui 2007-08-15 22:46:54 UTC
Not really, no.

The same output, and no stack.
Comment 20 Brian Cameron 2007-08-16 01:48:54 UTC
I'm running out of suggestions regarding how to get the stack trace.  You might seek help elsewhere (such as on gnome irc) - figuring out how to get a stacktrace from an X program should be a common question, but it can be somewhat platform dependant, so perhaps best to check with people who use the same OS as you.

You might also be able to track down which X call is ccausing the problem by commenting the X calls (identified by the fact they start with X such as XOpenConnection) one-at-a-time, and see if we can figure out which call is the problematic one.

Also, I think we've pretty well documented the bug by now, so perhaps others who can also replicate this problem might also take a look?  The fact that a11y in GDM is so broken on Ubuntu is probably something they would want fixed.
Comment 21 Ray Strode [halfline] 2007-08-16 13:50:11 UTC
gdb says the program exited, so you can try 

break _exit

and then do bt full to get a stack trace.  Even if gcalctool doesn't say it supports --sync, it probably does.  that option is supported automatically by calling gtk_init()
Comment 22 Rui 2007-08-19 20:43:35 UTC
Hello

Got some progress thanks to what Ray suggested, here are the steps i have done

(gdb) break _exit
Function "_exit" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (_exit) pending.
(gdb) set environment GTK_MODULES=gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/libdwellmouselistener
(gdb) run --sync
Starting program: /usr/bin/gnome-calculator --sync
(...)
GTK Accessibility Module initialized

** (gcalctool:6767): WARNING **: AT_SPI_REGISTRY was not started at session startup.

** (gcalctool:6767): WARNING **: IOR not set.

** (gcalctool:6767): WARNING **: Could not locate registry
The program 'gcalctool' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDevice, invalid or uninitialized input device'.
  (Details: serial 114 error_code 169 request_code 145 minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Thread NaN (LWP 6767)

  • #0 _exit
    from /lib/tls/i686/cmov/libc.so.6
  • #1 exit
    from /lib/tls/i686/cmov/libc.so.6
  • #2 ??
    from /usr/lib/libgdk-x11-2.0.so.0
  • #3 ??
  • #4 ??
    from /usr/lib/libgdk-x11-2.0.so.0
  • #5 ??
  • #6 ??
  • #7 ??
  • #8 ??
  • #9 ??
  • #10 ??
  • #11 ??
  • #12 ??
  • #13 ??
  • #14 ??
  • #15 ??
  • #16 ??
  • #17 ??
  • #18 ??
  • #19 ??
  • #20 ??
  • #21 ??
  • #22 ??
  • #23 ??
  • #24 ??
  • #25 ??
  • #26 ??
  • #27 ??
  • #28 ??
  • #29 ??

Comment 23 Brian Cameron 2007-08-20 20:58:28 UTC
Unfortunately that stack trace doesn't really give much information.  Did you build the source code with the -g option (set CFLAGS="-g" before running configure to turn this on).  When compiled with -g, it should give you information about the functions rather than just saying "No symbol table info available".  It might be useful to build the gtk library with debug since it seems the problem is happening in those functions.

It looks like the problem is happening in a gdk-x11 function.  Looking at the code, it seems that the only gdk functions that are called when the module initializes are in create_event_watcher, and parse_line.  Might be useful to comment out various functionality in the code and see if the problem goes away
when one is commented out.  This might help track down the call that is causing the problem also.
Comment 24 Gerd Kohlberger 2007-09-10 23:05:04 UTC
I can confirm this problem with the latest ubuntu updates and gdm trunk. My xorg.conf has the same input devices as Rui. Here is my gdb session:

(gdb) set env GTK_MODULES=gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener
(gdb) break init_xinput
(gdb) run
Starting program: /usr/bin/gcalctool 

Breakpoint 2 at 0xb73448d1: file keymouselistener.c, line 161.
Pending breakpoint "init_xinput" resolved
[Switching to Thread -1219459408 (LWP 3016)]

Breakpoint 2, init_xinput (display=0x80a3020, root=0x80a9c00) at keymouselistener.c:161
161             int          i, j, number = 0, num_devices; 
(gdb) step
162             XDeviceInfo  *devices = NULL;
(gdb) 
163             XDevice      *device = NULL;
(gdb) 
165             devices = XListInputDevices (GDK_DISPLAY_XDISPLAY (display),
(gdb) 
168             if (debug_gestures)
(gdb) 
169                 syslog (LOG_WARNING, "checking %d input devices...", num_devices);
(gdb) 
171             for (i=0; i < num_devices; i++) {
(gdb) 
172                     if (devices[i].use == IsXExtensionDevice)
(gdb) 
171             for (i=0; i < num_devices; i++) {
(gdb) 
172                     if (devices[i].use == IsXExtensionDevice)
(gdb) 
171             for (i=0; i < num_devices; i++) {
(gdb) 
172                     if (devices[i].use == IsXExtensionDevice)
(gdb) print i
$1 = 2
(gdb) print devices[i].name
$2 = 0x80d5d72 "stylus"
(gdb) print devices[i].id
$3 = 2
(gdb) print devices[i].use
$4 = 2
(gdb) print devices[i].num_classes
$5 = 0
(gdb) print devices[i].inputclassinfo
$6 = (XAnyClassPtr) 0x80d5d50
(gdb) print devices[i].inputclassinfo[0]
$7 = {class = 1718513475, length = 1920296809}
(gdb) print devices[i].type
$8 = 110
(gdb) step
174                             device = XOpenDevice (GDK_DISPLAY_XDISPLAY (display),
(gdb) 

Gdk-ERROR **: The program 'gcalctool' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDevice, invalid or uninitialized input device'.
  (Details: serial 99 error_code 171 request_code 149 minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
aborting...

I don't know why XOpenDevice fails, but I suspect it has something to do with num_classes being 0. The proposed patch checks if num_classes > 0 before trying to open the device. I also noticed that XDeviceInfo and the possible XDevice structures aren't freed. Patch 2 frees XDeviceInfo, I wasn't sure how to best deal with the XDevices.

I can also confirm the casting errors in dwellmouselistener. They are not caused by gcalctool or gedit. It seems dwellmouselistener receives enter/leave notifies for all widgets (eg. the buttons of the calculator) and not just the toplevel window.
Comment 25 Gerd Kohlberger 2007-09-10 23:07:05 UTC
Created attachment 95314 [details] [review]
Check num_classes
Comment 26 Gerd Kohlberger 2007-09-10 23:08:25 UTC
Created attachment 95315 [details] [review]
Free DeviceList
Comment 27 Brian Cameron 2007-09-12 18:27:45 UTC
Thanks.  I committed these patches upstream.  Thanks for verifying that the warnings are coming from the dwellmouselistener.  It would be great if we could fix the code to no longer generate these warnings.  Any ideas?
Comment 28 Gerd Kohlberger 2007-09-12 20:06:05 UTC
Created attachment 95477 [details] [review]
Remove window cast

The cast to GTK_WINDOW in the emission hook is done before the actual window tests. This patch should fix it. Cheers.
Comment 29 Brian Cameron 2007-09-17 17:08:04 UTC
Thanks, Gerd.  This patch is now upstream.  So hopefully now a11y will work much better with GDM.  Closing this bug report.  If there are additional a11y problems, lets open a new bug since this one is a bit lengthy and has gotten a bit off-the-original-topic a bit.