Bug 457787

Summary: Accessibility doesn't work with OpenSUSE 11.1 (gtk 2.14)
Product: [Mono] UI Automation Reporter: Andres Aragoneses <aaragoneses>
Component: Winforms - ATKAssignee: Andres Aragoneses <aaragoneses>
Status: VERIFIED FIXED QA Contact: E-mail List <mono-a11y-qa>
Severity: Minor    
Priority: P4 - Low CC: sshaw
Version: Unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: proposed patch
as promised, my latest patch
proposed patch for mono-winforms
patch for the branch
patch for trunk

Description Andres Aragoneses 2008-12-09 21:46:42 UTC
After research, I've opened this bug upstream: 

http://bugzilla.gnome.org/show_bug.cgi?id=563876

See also the bugs mentioned in that bug, and this bug: https://bugzilla.novell.com/show_bug.cgi?id=375987 (which was a workaround for a previous version of gtk).

I'm attaching a proposed patch here.
Comment 1 Andres Aragoneses 2008-12-09 22:03:54 UTC
Created attachment 259053 [details]
proposed patch

This should be tested on OpenSUSE 11.1.
Comment 2 Andres Aragoneses 2008-12-09 22:12:07 UTC
Hours and priority.
Comment 3 Brad Taylor 2008-12-10 14:56:23 UTC
Patch review inline:

     <Package file="gobject-2.0" name="gobject-2.0" IsProject="False" />
     <Package file="atk" name="atk" IsProject="False" />
+    <Package file="/usr/lib/pkgconfig/gtk+-2.0.pc" name="GTK+" IsProject="False" />
   </Packages>
   <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True" RelativeMakefileName="Make

I don't think you want this change in the project file.

+	
+	GtkSettings* settings =
+	  gtk_settings_get_for_screen (gdk_display_get_default_screen (display));
+	gchar* gtk_modules_setting = NULL;
+	g_object_get(settings, "gtk-modules", &gtk_modules_setting, NULL);
+	if (gtk_modules_setting != NULL) {
+		g_object_set(settings, "gtk-modules", "", NULL);
+		g_free (gtk_modules_setting);
+	}


Do we always want to nullify gtk-modules?  What if people have useful modules installed?  We might consider removing "atk-bridge" and "gail" and leave the rest intact.

Index: UiaAtkBridge/Monitor.cs
 			GLib.GType.Init();
+
 			
+			
 			Atk.Util.GetRootHandler = ReturnTopLevel;

Extra whitespace.


+		private void DropGtkModulesConf ()
+		{
+			string display_name = Environment.GetEnvironmentVariable ("DISPLAY");
+			if (String.IsNullOrEmpty (display_name))
+				throw new Exception ("The env var DISPLAY should be set");
+
+			drop_gtk_modules_conf (display_name);
+		}
 		
Should we ever exception like this?  Seems like a strongly worded WARNING would suffice.

I'll apply this patch on my 11.0 machine and add a comment with the results.
Comment 4 Andres Aragoneses 2008-12-10 15:03:08 UTC
(In reply to comment #3 from Brad Taylor)
> Patch review inline:
> 
>      <Package file="gobject-2.0" name="gobject-2.0" IsProject="False" />
>      <Package file="atk" name="atk" IsProject="False" />
> +    <Package file="/usr/lib/pkgconfig/gtk+-2.0.pc" name="GTK+"
> IsProject="False" />
>    </Packages>
>    <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True"
> RelativeMakefileName="Make
> 
> I don't think you want this change in the project file.

Yes, I won't commit it, it was added by MD.


> +       
> +       GtkSettings* settings =
> +         gtk_settings_get_for_screen (gdk_display_get_default_screen
> (display));
> +       gchar* gtk_modules_setting = NULL;
> +       g_object_get(settings, "gtk-modules", &gtk_modules_setting, NULL);
> +       if (gtk_modules_setting != NULL) {
> +               g_object_set(settings, "gtk-modules", "", NULL);
> +               g_free (gtk_modules_setting);
> +       }
> 
> 
> Do we always want to nullify gtk-modules?  What if people have useful modules
> installed?  We might consider removing "atk-bridge" and "gail" and leave the
> rest intact.

I've already thought about this and yes: we do want to nullify it always, because the fact that WinForms depends on GTK is a problem that even Miguel wants to fix, a dependency that has to be removed, so there's no point/use-case in which a user may need to load a GTK module for WinForms.


> Index: UiaAtkBridge/Monitor.cs
>                         GLib.GType.Init();
> +
> 
> +                       
>                         Atk.Util.GetRootHandler = ReturnTopLevel;
> 
> Extra whitespace.

Yep, noticed.


> 
> +               private void DropGtkModulesConf ()
> +               {
> +                       string display_name =
> Environment.GetEnvironmentVariable ("DISPLAY");
> +                       if (String.IsNullOrEmpty (display_name))
> +                               throw new Exception ("The env var DISPLAY
> should be set");
> +
> +                       drop_gtk_modules_conf (display_name);
> +               }
> 
> Should we ever exception like this?  Seems like a strongly worded WARNING would
> suffice.

Mmmm, if that env var is not found, the display cannot be found and the var cannot be nullified. I will change it to a warning in case I find another way of getting the display name (I think Firefox had another way, will research).


> 
> I'll apply this patch on my 11.0 machine and add a comment with the results.
> 

Thanks.
Comment 5 Andres Aragoneses 2008-12-10 17:56:51 UTC
Unfortunately this doesn't work on Mario's OpenSUSE64: http://paste2.org/p/113824

But the stacktrace smells to a mono bug, not caused by the patch. I'll test with mine (32bits).
Comment 6 Mario Carrion 2008-12-10 20:05:51 UTC
New stacktrace, this time I had to kill the app because was frozen:

Could not set X locale modifiers
PreRun fired
Form added!
AutomationBridge: Unhandled control: ControlType.Window
*** glibc detected *** mono: double free or corruption (out): 0x00007f1fb80c04e0 ***
Stacktrace:

  at (wrapper managed-to-native) GLib.MainLoop.g_main_loop_run (intptr) <0x00056>
  at (wrapper managed-to-native) GLib.MainLoop.g_main_loop_run (intptr) <0xffffffff>
  at GLib.MainLoop.Run () <0x00013>
  at UiaAtkBridge.Monitor.GLibMainLoopThread () <0x0003b>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

Killed
Comment 7 Andres Aragoneses 2008-12-10 21:24:17 UTC
After applying the patch I'm getting this unrelated exception in 32bits:

Stacktrace:

  at (wrapper managed-to-native) Atk.Object.atk_object_set_name (intptr,intptr) <0x00004>
  at (wrapper managed-to-native) Atk.Object.atk_object_set_name (intptr,intptr) <0xffffffff>
  at Atk.Object.set_Name (string) <0x0002a>
  at UiaAtkBridge.TextLabel..ctor (System.Windows.Automation.Provider.IRawElementProviderSimple) <0x0010d>
  at UiaAtkBridge.AutomationBridge.HandleNewLabelControlType (System.Windows.Automation.Provider.IRawElementProviderSimple,UiaAtkBridge.ParentAdapter) <0x000b0>
  at UiaAtkBridge.AutomationBridge.HandleElementAddition (System.Windows.Automation.Provider.IRawElementProviderSimple) <0x0017f>
  at UiaAtkBridge.AutomationBridge.RaiseStructureChangedEvent (object,System.Windows.Automation.StructureChangedEventArgs) <0x000f3>
  at System.Windows.Automation.Provider.AutomationInteropProvider.RaiseStructureChangedEvent (System.Windows.Automation.Provider.IRawElementProviderSimple,System.Windows.Automation.StructureChangedEventArgs) <0x00029>
  at UiaAtkBridge.ParentAdapter.RequestChildren () <0x00115>
  at UiaAtkBridge.AutomationBridge.HandlePossiblePreExistingProvider (System.Windows.Automation.Provider.IRawElementProviderSimple) <0x00178>
  at UiaAtkBridge.AutomationBridge.HandlePossiblePreExistingProvider (System.Windows.Automation.Provider.IRawElementProviderSimple) <0x000fb>
  at UiaAtkBridge.AutomationBridge.RaiseAutomationPropertyChangedEvent (object,System.Windows.Automation.AutomationPropertyChangedEventArgs) <0x000ef>
  at System.Windows.Automation.Provider.AutomationInteropProvider.RaiseAutomationPropertyChangedEvent (System.Windows.Automation.Provider.IRawElementProviderSimple,System.Windows.Automation.AutomationPropertyChangedEventArgs) <0x00029>
  at Mono.UIAutomation.Winforms.Events.BaseAutomationPropertyEvent.RaiseAutomationPropertyChangedEvent () <0x00083>
  at Mono.UIAutomation.Winforms.Events.AutomationHasKeyboardFocusPropertyEvent.OnFocus (object,System.EventArgs) <0x00010>
  at (wrapper delegate-invoke) System.EventHandler.invoke_void__this___object_EventArgs (object,System.EventArgs) <0x00072>
  at (wrapper delegate-invoke) System.EventHandler.invoke_void__this___object_EventArgs (object,System.EventArgs) <0x00072>
  at (wrapper delegate-invoke) System.EventHandler.invoke_void__this___object_EventArgs (object,System.EventArgs) <0x00072>
  at (wrapper delegate-invoke) System.EventHandler.invoke_void__this___object_EventArgs (object,System.EventArgs) <0x00072>
  at (wrapper delegate-invoke) System.EventHandler.invoke_void__this___object_EventArgs (object,System.EventArgs) <0xffffffff>
  at System.Windows.Forms.Control.OnGotFocus (System.EventArgs) <0x00052>
  at System.Windows.Forms.ComboBox.OnGotFocus (System.EventArgs) <0x00094>
  at System.Windows.Forms.Control.WmSetFocus (System.Windows.Forms.Message&) <0x0002c>
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&) <0x00332>
  at System.Windows.Forms.ComboBox.WndProc (System.Windows.Forms.Message&) <0x00193>
  at System.Windows.Forms.Control/ControlWindowTarget.OnMessage (System.Windows.Forms.Message&) <0x0001a>
  at System.Windows.Forms.Control/ControlNativeWindow.WndProc (System.Windows.Forms.Message&) <0x0002a>
  at System.Windows.Forms.NativeWindow.WndProc (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x001d4>
  at System.Windows.Forms.XplatUIX11.SendMessage (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x00296>
  at System.Windows.Forms.XplatUIX11.SetFocus (intptr) <0x000a2>
  at System.Windows.Forms.XplatUI.SetFocus (intptr) <0x0001a>
  at System.Windows.Forms.ContainerControl.SendControlFocus (System.Windows.Forms.Control) <0x0007c>
  at System.Windows.Forms.Form.SetVisibleCore (bool) <0x0056f>
  at IronPython.NewTypes.System.Windows.Forms.Form_1.SetVisibleCore (bool) <0x00058>
  at System.Windows.Forms.Control.set_Visible (bool) <0x00029>
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control.set_Visible (bool) <0xffffffff>
  at System.Windows.Forms.Application.RunLoop (bool,System.Windows.Forms.ApplicationContext) <0x001f9>
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext) <0x00075>
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00033>
  at (wrapper dynamic-method) object.Run##67 (object) <0xffffffff>
  at IronPython.Runtime.Calls.FastCallable1.Call (IronPython.Runtime.Calls.ICallerContext,object) <0x00015>
  at IronPython.Runtime.Calls.FastCallable1.Call (IronPython.Runtime.Calls.ICallerContext,object[]) <0x00032>
  at IronPython.Compiler.MethodBinder/MethodTarget.Call (IronPython.Runtime.Calls.ICallerContext,object[]) <0x0004e>
  at IronPython.Compiler.MethodBinder/TargetSet.Call (IronPython.Runtime.Calls.ICallerContext,IronPython.Compiler.CallType,object[]) <0x0016b>
  at IronPython.Compiler.MethodBinder/TargetSet.Call1 (IronPython.Runtime.Calls.ICallerContext,object) <0x00043>
  at IronPython.Runtime.Calls.FastCallableWithContextAny.Call (IronPython.Runtime.Calls.ICallerContext,object) <0x00022>
  at IronPython.Runtime.Calls.BuiltinFunction.Call (IronPython.Runtime.Calls.ICallerContext,object) <0x00022>
  at IronPython.Runtime.Operations.Ops.CallWithContext (IronPython.Runtime.Calls.ICallerContext,object,object) <0x00041>
  at __main__.Initialize () <0x004c5>
  at IronPython.Runtime.PythonModule.Initialize () <0x0001c>
  at IronPython.Hosting.OptimizedEngineModule.Execute () <0x0002e>
  at IronPythonConsole.PythonCommandLine.RunFile (IronPython.Hosting.PythonEngine,string) <0x0013f>
  at IronPythonConsole.PythonCommandLine.Run (IronPython.Hosting.PythonEngine,string) <0x00064>
  at IronPythonConsole.PythonCommandLine.Main (string[]) <0x00311>
  at (wrapper runtime-invoke) IronPythonConsole.PythonCommandLine.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	mono [0x80c7fe9]
	[0xffffe410]
	/lib/libc.so.6(abort+0x188) [0x4017f2c8]
	/lib/libc.so.6 [0x401b96c5]
	/lib/libc.so.6 [0x401bf654]
	/lib/libc.so.6(cfree+0x9c) [0x401c0f3c]
	/usr/lib/libglib-2.0.so.0(g_free+0x36) [0x4007d026]
	/usr/lib/libORBit-2.so.0(giop_recv_buffer_unuse+0x49) [0x42665249]
	/usr/lib/libORBit-2.so.0(giop_connection_handle_input+0xf6) [0x42665776]
	/usr/lib/libORBit-2.so.0 [0x42684e33]
	/usr/lib/libORBit-2.so.0 [0x42687716]
	/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1e8) [0x400749a8]
	/usr/lib/libglib-2.0.so.0 [0x40078063]
	/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x71) [0x40078221]
	/usr/lib/libORBit-2.so.0(link_main_iteration+0x27) [0x42682997]
	/usr/lib/libORBit-2.so.0(giop_recv_buffer_get+0x6e) [0x42664fbe]
	/usr/lib/libORBit-2.so.0(ORBit_small_invoke_stub+0x126) [0x4266a086]
	/usr/lib/libORBit-2.so.0(ORBit_small_invoke_stub_n+0x79) [0x4266a2b9]
	/usr/lib/libORBit-2.so.0(ORBit_c_stub_invoke+0x18a) [0x42676f3a]
	/usr/lib/libspi.so.0(Accessibility_EventListener_notifyEvent+0x74) [0x42587974]
	/usr/lib/gtk-2.0/modules/libatk-bridge.so [0x4249d16c]
	/usr/lib/gtk-2.0/modules/libatk-bridge.so [0x4249e387]
	/usr/lib/libgobject-2.0.so.0 [0x415bcb41]
	/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x7dc) [0x415be83c]
	/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x26) [0x415becb6]
	/usr/lib/libatk-1.0.so.0 [0x416006fd]
	/usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__PARAM+0x8c) [0x415b3b8c]
	/usr/lib/libgobject-2.0.so.0 [0x415a54d9]
	/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x1ab) [0x415a6d8b]
	/usr/lib/libgobject-2.0.so.0 [0x415bc986]
	/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x7dc) [0x415be83c]
	/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x26) [0x415becb6]
	/usr/lib/libgobject-2.0.so.0 [0x415ab341]
	/usr/lib/libgobject-2.0.so.0 [0x415a7aef]
	/usr/lib/libgobject-2.0.so.0(g_object_notify+0x1ed) [0x415adc2d]
	/usr/lib/libatk-1.0.so.0(atk_object_set_name+0xa6) [0x415ff0f6]
	[0x4296f96f]
	[0x4296f91b]
	[0x429ce8f6]
	[0x429ce799]
	[0x4296b2f0]
	[0x4296b024]
	[0x4296af2a]
	[0x429cc91e]
	[0x429caa99]
	[0x429caa1c]
	[0x42969bd8]
	[0x42969ae2]
	[0x42969464]
	[0x429ca919]
	[0x429c3643]
	[0x429c3643]
	[0x429c3643]
	[0x429c3643]
	[0x429c3643]
	[0x429ca8c3]
	[0x429c92e5]
	[0x429c9245]
	[0x41bce633]
	[0x42857b4c]
	[0x41bce2fb]
	[0x41bce2db]
	[0x41bcd6ad]
	[0x41bccb4f]
	[0x429c91e3]
	[0x429c913b]
	[0x429c9105]
	[0x42854708]
	[0x42854159]
	[0x4255726a]
	[0x4255720d]
	[0x42853322]
	[0x42850586]
	[0x428502dc]
	[0x41035e61]
	[0x410fcde6]
	[0x41132233]
	[0x41131eff]
	[0x41131aec]
	[0x411380f4]
	[0x41129583]
	[0x410fcdb3]
	[0x410fcd42]
	[0x4113c876]
	[0x410f635d]
	[0x4113c37f]
	[0x41044718]
	[0x4104452d]
	[0x407036da]
	[0x40703203]
	mono(mono_runtime_exec_main+0x16e) [0x810e2ee]
	mono(mono_runtime_run_main+0x16b) [0x810ea0b]
	mono(mono_main+0x18aa) [0x80b0e6a]
	mono [0x805ad01]
	/lib/libc.so.6(__libc_start_main+0xe5) [0x40169705]
	mono [0x805ac31]

Debug info from gdb:

Cannot access memory at address 0xb06
[?1034h[Thread debugging using libthread_db enabled]
[New Thread 0x42959b90 (LWP 2828)]
[New Thread 0x40bd0b90 (LWP 2826)]
[New Thread 0x40aafb90 (LWP 2825)]
0xffffe430 in __kernel_vsyscall ()
  4 Thread 0x40aafb90 (LWP 2825)  0xffffe430 in __kernel_vsyscall ()
  3 Thread 0x40bd0b90 (LWP 2826)  0xffffe430 in __kernel_vsyscall ()
  2 Thread 0x42959b90 (LWP 2828)  0xffffe430 in __kernel_vsyscall ()
* 1 Thread 0x402e2ba0 (LWP 2822)  0xffffe430 in __kernel_vsyscall ()

Thread 4 (Thread 0x40aafb90 (LWP 2825)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0x4011c3f6 in nanosleep () from /lib/libpthread.so.0
#2  0x081a06e8 in collection_thread (unused=0x0) at collection.c:34
#3  0x401151b5 in start_thread () from /lib/libpthread.so.0
#4  0x4022438e in clone () from /lib/libc.so.6

Thread 3 (Thread 0x40bd0b90 (LWP 2826)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0x4011aef5 in sem_wait@@GLIBC_2.1 () from /lib/libpthread.so.0
#2  0x08128aa9 in finalizer_thread (unused=0x0) at gc.c:928
#3  0x0814c368 in start_wrapper (data=0x82e1b90) at threads.c:620
#4  0x081bc4a6 in thread_start_routine (args=0x82d6f7c) at threads.c:279
#5  0x081dce8a in GC_start_routine (arg=0x26f20) at pthread_support.c:1382
#6  0x401151b5 in start_thread () from /lib/libpthread.so.0
#7  0x4022438e in clone () from /lib/libc.so.6

Thread 2 (Thread 0x42959b90 (LWP 2828)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0x40230e63 in ?? () from /lib/libc.so.6
#2  0x401c44e1 in ?? () from /lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x402e2ba0 (LWP 2822)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0x4011bbbb in read () from /lib/libpthread.so.0
#2  0x080c8163 in mono_handle_native_sigsegv (signal=6, ctx=0xbfc3dbdc)
    at mini-exceptions.c:1439
#3  <signal handler called>
#4  0xffffe430 in __kernel_vsyscall ()
#5  0x4017d990 in raise () from /lib/libc.so.6
#6  0x4017f2c8 in abort () from /lib/libc.so.6
#7  0x401b96c5 in ?? () from /lib/libc.so.6
#8  0x401bf654 in ?? () from /lib/libc.so.6
#9  0x401c0f3c in free () from /lib/libc.so.6
#10 0x4007d026 in g_free () from /usr/lib/libglib-2.0.so.0
#11 0x42665249 in giop_recv_buffer_unuse () from /usr/lib/libORBit-2.so.0
#12 0x42665776 in giop_connection_handle_input () from /usr/lib/libORBit-2.so.0
#13 0x42684e33 in ?? () from /usr/lib/libORBit-2.so.0
#14 0x42687716 in ?? () from /usr/lib/libORBit-2.so.0
#15 0x400749a8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#16 0x40078063 in ?? () from /usr/lib/libglib-2.0.so.0
#17 0x40078221 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#18 0x42682997 in link_main_iteration () from /usr/lib/libORBit-2.so.0
#19 0x42664fbe in giop_recv_buffer_get () from /usr/lib/libORBit-2.so.0
#20 0x4266a086 in ORBit_small_invoke_stub () from /usr/lib/libORBit-2.so.0
#21 0x4266a2b9 in ORBit_small_invoke_stub_n () from /usr/lib/libORBit-2.so.0
#22 0x42676f3a in ORBit_c_stub_invoke () from /usr/lib/libORBit-2.so.0
#23 0x42587974 in Accessibility_EventListener_notifyEvent ()
   from /usr/lib/libspi.so.0
#24 0x4249d16c in ?? () from /usr/lib/gtk-2.0/modules/libatk-bridge.so
#25 0x4249e387 in ?? () from /usr/lib/gtk-2.0/modules/libatk-bridge.so
#26 0x415bcb41 in ?? () from /usr/lib/libgobject-2.0.so.0
#27 0x415be83c in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#28 0x415becb6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#29 0x416006fd in ?? () from /usr/lib/libatk-1.0.so.0
#30 0x415b3b8c in g_cclosure_marshal_VOID__PARAM ()
   from /usr/lib/libgobject-2.0.so.0
#31 0x415a54d9 in ?? () from /usr/lib/libgobject-2.0.so.0
#32 0x415a6d8b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#33 0x415bc986 in ?? () from /usr/lib/libgobject-2.0.so.0
#34 0x415be83c in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#35 0x415becb6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#36 0x415ab341 in ?? () from /usr/lib/libgobject-2.0.so.0
#37 0x415a7aef in ?? () from /usr/lib/libgobject-2.0.so.0
#38 0x415adc2d in g_object_notify () from /usr/lib/libgobject-2.0.so.0
#39 0x415ff0f6 in atk_object_set_name () from /usr/lib/libatk-1.0.so.0
#40 0x4296f96f in ?? ()
#41 0x4296f91b in ?? ()
#42 0x429ce8f6 in ?? ()
#43 0x429ce799 in ?? ()
#44 0x4296b2f0 in ?? ()
#45 0x4296b024 in ?? ()
#46 0x4296af2a in ?? ()
#47 0x429cc91e in ?? ()
#48 0x429caa99 in ?? ()
#49 0x429caa1c in ?? ()
#50 0x42969bd8 in ?? ()
#51 0x42969ae2 in ?? ()
#52 0x42969464 in ?? ()
#53 0x429ca919 in ?? ()
#54 0x429c3643 in ?? ()
#55 0x429c3643 in ?? ()
#56 0x429c3643 in ?? ()
#57 0x429c3643 in ?? ()
#58 0x429c3643 in ?? ()
#59 0x429ca8c3 in ?? ()
#60 0x429c92e5 in ?? ()
#61 0x429c9245 in ?? ()
#62 0x41bce633 in ?? ()
#63 0x42857b4c in ?? ()
#64 0x41bce2fb in ?? ()
#65 0x41bce2db in ?? ()
#66 0x41bcd6ad in ?? ()
#67 0x41bccb4f in ?? ()
#68 0x429c91e3 in ?? ()
#69 0x429c913b in ?? ()
#70 0x429c9105 in ?? ()
#71 0x42854708 in ?? ()
#72 0x42854159 in ?? ()
#73 0x4255726a in ?? ()
#74 0x4255720d in ?? ()
#75 0x42853322 in ?? ()
#76 0x42850586 in ?? ()
#77 0x428502dc in ?? ()
#78 0x41035e61 in ?? ()
#79 0x410fcde6 in ?? ()
#80 0x41132233 in ?? ()
#81 0x41131eff in ?? ()
#82 0x41131aec in ?? ()
#83 0x411380f4 in ?? ()
#84 0x41129583 in ?? ()
#85 0x410fcdb3 in ?? ()
#86 0x410fcd42 in ?? ()
#87 0x4113c876 in ?? ()
#88 0x410f635d in ?? ()
#89 0x4113c37f in ?? ()
#90 0x41044718 in ?? ()
#91 0x4104452d in ?? ()
#92 0x407036da in ?? ()
#93 0x40703203 in ?? ()
#94 0x0810e2ee in mono_runtime_exec_main (method=0x4c37a8, args=0x29f48, 
    exc=0x0) at object.c:3296
#95 0x0810ea0b in mono_runtime_run_main (method=0x82b2f6c, argc=1, 
    argv=0xbfc402c8, exc=0x0) at object.c:3084
#96 0x080b0e6a in mono_main (argc=3, argv=0xbfc402c4) at driver.c:969
#97 0x0805ad01 in main (argc=) at main.c:34

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================


The application was terminated by a signal: SIGABRT


Comment 8 Andres Aragoneses 2008-12-10 21:27:38 UTC
And another one:

Stacktrace:

  at (wrapper managed-to-native) GLib.Signal.g_signal_emitv (intptr,uint,uint,intptr) <0x00004>
  at (wrapper managed-to-native) GLib.Signal.g_signal_emitv (intptr,uint,uint,intptr) <0xffffffff>
  at GLib.Signal.Emit (GLib.Object,string,object[]) <0x0038c>
  at Atk.Object.EmitChildrenChanged (Atk.Object/ChildrenChangedDetail,uint,Atk.Object) <0x000e3>
  at UiaAtkBridge.ParentAdapter.AddOneChild (Atk.Object) <0x0007f>
  at UiaAtkBridge.TopLevelRootItem.AddOneChild (Atk.Object) <0x00013>
  at UiaAtkBridge.AutomationBridge.IncludeNewAdapter (UiaAtkBridge.Adapter,UiaAtkBridge.ParentAdapter) <0x00047>
  at UiaAtkBridge.AutomationBridge.HandleNewWindowControlType (System.Windows.Automation.Provider.IRawElementProviderSimple) <0x00046>
  at UiaAtkBridge.AutomationBridge.HandleElementAddition (System.Windows.Automation.Provider.IRawElementProviderSimple) <0x00100>
  at UiaAtkBridge.AutomationBridge.RaiseStructureChangedEvent (object,System.Windows.Automation.StructureChangedEventArgs) <0x000f3>
  at System.Windows.Automation.Provider.AutomationInteropProvider.RaiseStructureChangedEvent (System.Windows.Automation.Provider.IRawElementProviderSimple,System.Windows.Automation.StructureChangedEventArgs) <0x00029>
  at Mono.UIAutomation.Winforms.Helper.RaiseStructureChangedEvent (System.Windows.Automation.StructureChangeType,System.Windows.Automation.Provider.IRawElementProviderFragment) <0x000e4>
  at Mono.UIAutomation.Winforms.FormListener.OnFormAdded (object,System.EventArgs) <0x001c7>
  at System.Windows.Forms.Application.AddForm (System.Windows.Forms.Form) <0x00068>
  at System.Windows.Forms.Form.OnLoad (System.EventArgs) <0x00012>
  at IronPython.NewTypes.System.Windows.Forms.Form_1.OnLoad (System.EventArgs) <0x00056>
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs) <0x0007b>
  at System.Windows.Forms.Form.OnCreateControl () <0x00053>
  at IronPython.NewTypes.System.Windows.Forms.Form_1.OnCreateControl () <0x00053>
  at System.Windows.Forms.Control.CreateControl () <0x0012b>
  at System.Windows.Forms.Control.WmShowWindow (System.Windows.Forms.Message&) <0x0010e>
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&) <0x00290>
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message&) <0x00013>
  at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message&) <0x00051>
  at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message&) <0x0021e>
  at IronPython.NewTypes.System.Windows.Forms.Form_1.WndProc (System.Windows.Forms.Message&) <0x00056>
  at System.Windows.Forms.Control/ControlWindowTarget.OnMessage (System.Windows.Forms.Message&) <0x0001a>
  at System.Windows.Forms.Control/ControlNativeWindow.WndProc (System.Windows.Forms.Message&) <0x0002a>
  at System.Windows.Forms.NativeWindow.WndProc (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x001d4>
  at System.Windows.Forms.XplatUIX11.SendMessage (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x00296>
  at System.Windows.Forms.XplatUIX11.MapWindow (System.Windows.Forms.Hwnd,System.Windows.Forms.WindowType) <0x00197>
  at System.Windows.Forms.XplatUIX11.CreateWindow (System.Windows.Forms.CreateParams) <0x00b99>
  at System.Windows.Forms.XplatUI.CreateWindow (System.Windows.Forms.CreateParams) <0x0001a>
  at System.Windows.Forms.NativeWindow.CreateHandle (System.Windows.Forms.CreateParams) <0x00030>
  at System.Windows.Forms.Control.CreateHandle () <0x00079>
  at System.Windows.Forms.Form.CreateHandle () <0x00014>
  at IronPython.NewTypes.System.Windows.Forms.Form_1.CreateHandle () <0x00053>
  at System.Windows.Forms.Control.CreateControl () <0x00087>
  at System.Windows.Forms.Control.SetVisibleCore (bool) <0x00079>
  at System.Windows.Forms.Form.SetVisibleCore (bool) <0x0021a>
  at IronPython.NewTypes.System.Windows.Forms.Form_1.SetVisibleCore (bool) <0x00058>
  at System.Windows.Forms.Control.set_Visible (bool) <0x00029>
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control.set_Visible (bool) <0xffffffff>
  at System.Windows.Forms.Application.RunLoop (bool,System.Windows.Forms.ApplicationContext) <0x001f9>
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext) <0x00075>
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00033>
  at (wrapper dynamic-method) object.Run##67 (object) <0xffffffff>
  at IronPython.Runtime.Calls.FastCallable1.Call (IronPython.Runtime.Calls.ICallerContext,object) <0x00015>
  at IronPython.Runtime.Calls.FastCallable1.Call (IronPython.Runtime.Calls.ICallerContext,object[]) <0x00032>
  at IronPython.Compiler.MethodBinder/MethodTarget.Call (IronPython.Runtime.Calls.ICallerContext,object[]) <0x0004e>
  at IronPython.Compiler.MethodBinder/TargetSet.Call (IronPython.Runtime.Calls.ICallerContext,IronPython.Compiler.CallType,object[]) <0x0016b>
  at IronPython.Compiler.MethodBinder/TargetSet.Call1 (IronPython.Runtime.Calls.ICallerContext,object) <0x00043>
  at IronPython.Runtime.Calls.FastCallableWithContextAny.Call (IronPython.Runtime.Calls.ICallerContext,object) <0x00022>
  at IronPython.Runtime.Calls.BuiltinFunction.Call (IronPython.Runtime.Calls.ICallerContext,object) <0x00022>
  at IronPython.Runtime.Operations.Ops.CallWithContext (IronPython.Runtime.Calls.ICallerContext,object,object) <0x00041>
  at __main__.Initialize () <0x004c5>
  at IronPython.Runtime.PythonModule.Initialize () <0x0001c>
  at IronPython.Hosting.OptimizedEngineModule.Execute () <0x0002e>
  at IronPythonConsole.PythonCommandLine.RunFile (IronPython.Hosting.PythonEngine,string) <0x0013f>
  at IronPythonConsole.PythonCommandLine.Run (IronPython.Hosting.PythonEngine,string) <0x00064>
  at IronPythonConsole.PythonCommandLine.Main (string[]) <0x00311>
  at (wrapper runtime-invoke) IronPythonConsole.PythonCommandLine.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	mono [0x80c7fe9]
	[0xffffe410]
	/lib/libc.so.6(abort+0x188) [0x4017f2c8]
	/lib/libc.so.6 [0x401b96c5]
	/lib/libc.so.6 [0x401bf654]
	/lib/libc.so.6(cfree+0x9c) [0x401c0f3c]
	/usr/lib/libglib-2.0.so.0(g_free+0x36) [0x4007d026]
	/usr/lib/libORBit-2.so.0(giop_recv_buffer_unuse+0x49) [0x42665249]
	/usr/lib/libORBit-2.so.0(giop_connection_handle_input+0xf6) [0x42665776]
	/usr/lib/libORBit-2.so.0 [0x42684e33]
	/usr/lib/libORBit-2.so.0 [0x42687716]
	/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1e8) [0x400749a8]
	/usr/lib/libglib-2.0.so.0 [0x40078063]
	/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x71) [0x40078221]
	/usr/lib/libORBit-2.so.0(link_main_iteration+0x27) [0x42682997]
	/usr/lib/libORBit-2.so.0(giop_recv_buffer_get+0x6e) [0x42664fbe]
	/usr/lib/libORBit-2.so.0(ORBit_small_invoke_stub+0x126) [0x4266a086]
	/usr/lib/libORBit-2.so.0(ORBit_small_invoke_stub_n+0x79) [0x4266a2b9]
	/usr/lib/libORBit-2.so.0(ORBit_c_stub_invoke+0x18a) [0x42676f3a]
	/usr/lib/libspi.so.0(Accessibility_EventListener_notifyEvent+0x74) [0x42587974]
	/usr/lib/gtk-2.0/modules/libatk-bridge.so [0x4249d16c]
	/usr/lib/gtk-2.0/modules/libatk-bridge.so [0x4249db79]
	/usr/lib/libgobject-2.0.so.0 [0x415bcb41]
	[0x4287176a]
	[0x4286fa05]
	[0x4286f584]
	[0x4286f110]
	[0x4286f07c]
	[0x4286ef00]
	[0x4286a8b7]
	[0x4286a271]
	[0x4286a024]
	[0x42869f2a]
	[0x42869bed]
	[0x4285b9c8]
	[0x4285b7b1]
	[0x4285b6e3]
	[0x4285b6a7]
	[0x4285b12c]
	[0x4285a854]
	[0x4285a7d4]
	[0x41bc7e94]
	[0x41bcf13f]
	[0x41bce591]
	[0x42856404]
	[0x428563ca]
	[0x42856227]
	[0x42855f37]
	[0x41bce2fb]
	[0x41bce2db]
	[0x41bcd6ad]
	[0x41bccb4f]
	[0x41bcee38]
	[0x41bc8f1a]
	[0x41bc837b]
	[0x41bc8301]
	[0x41bc8092]
	[0x42854845]
	[0x42854804]
	[0x41bc7df0]
	[0x4255731a]
	[0x428543b3]
	[0x42854159]
	[0x4255726a]
	[0x4255720d]
	[0x42853322]
	[0x42850586]
	[0x428502dc]
	[0x41035e61]
	[0x410fcde6]
	[0x41132233]
	[0x41131eff]
	[0x41131aec]
	[0x411380f4]
	[0x41129583]
	[0x410fcdb3]
	[0x410fcd42]
	[0x4113c876]
	[0x410f635d]
	[0x4113c37f]
	[0x41044718]
	[0x4104452d]
	[0x407036da]
	[0x40703203]
	mono(mono_runtime_exec_main+0x16e) [0x810e2ee]
	mono(mono_runtime_run_main+0x16b) [0x810ea0b]
	mono(mono_main+0x18aa) [0x80b0e6a]
	mono [0x805ad01]
	/lib/libc.so.6(__libc_start_main+0xe5) [0x40169705]
	mono [0x805ac31]
Cannot access memory at address 0xc1b

Debug info from gdb:

[?1034h[Thread debugging using libthread_db enabled]
[New Thread 0x42b00b90 (LWP 3105)]
[New Thread 0x40bd0b90 (LWP 3103)]
[New Thread 0x40aafb90 (LWP 3102)]
0xffffe430 in __kernel_vsyscall ()
  4 Thread 0x40aafb90 (LWP 3102)  0xffffe430 in __kernel_vsyscall ()
  3 Thread 0x40bd0b90 (LWP 3103)  0xffffe430 in __kernel_vsyscall ()
  2 Thread 0x42b00b90 (LWP 3105)  0xffffe430 in __kernel_vsyscall ()
* 1 Thread 0x402e2ba0 (LWP 3099)  0xffffe430 in __kernel_vsyscall ()

Thread 4 (Thread 0x40aafb90 (LWP 3102)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0x4011c3f6 in nanosleep () from /lib/libpthread.so.0
#2  0x081a06e8 in collection_thread (unused=0x0) at collection.c:34
#3  0x401151b5 in start_thread () from /lib/libpthread.so.0
#4  0x4022438e in clone () from /lib/libc.so.6

Thread 3 (Thread 0x40bd0b90 (LWP 3103)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0x4011aef5 in sem_wait@@GLIBC_2.1 () from /lib/libpthread.so.0
#2  0x08128aa9 in finalizer_thread (unused=0x0) at gc.c:928
#3  0x0814c368 in start_wrapper (data=0x82e1b90) at threads.c:620
#4  0x081bc4a6 in thread_start_routine (args=0x82d6f7c) at threads.c:279
#5  0x081dce8a in GC_start_routine (arg=0x26f20) at pthread_support.c:1382
#6  0x401151b5 in start_thread () from /lib/libpthread.so.0
#7  0x4022438e in clone () from /lib/libc.so.6

Thread 2 (Thread 0x42b00b90 (LWP 3105)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0x40230e63 in ?? () from /lib/libc.so.6
#2  0x401c44e1 in ?? () from /lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x402e2ba0 (LWP 3099)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0x40220d27 in syscall () from /lib/libc.so.6
#2  0x080c80f0 in mono_handle_native_sigsegv (signal=6, ctx=0xbff2ffac)
    at mini-exceptions.c:1406
#3  <signal handler called>
#4  0xffffe430 in __kernel_vsyscall ()
#5  0x4017d990 in raise () from /lib/libc.so.6
#6  0x4017f2c8 in abort () from /lib/libc.so.6
#7  0x401b96c5 in ?? () from /lib/libc.so.6
#8  0x401bf654 in ?? () from /lib/libc.so.6
#9  0x401c0f3c in free () from /lib/libc.so.6
#10 0x4007d026 in g_free () from /usr/lib/libglib-2.0.so.0
#11 0x42665249 in giop_recv_buffer_unuse () from /usr/lib/libORBit-2.so.0
#12 0x42665776 in giop_connection_handle_input () from /usr/lib/libORBit-2.so.0
#13 0x42684e33 in ?? () from /usr/lib/libORBit-2.so.0
#14 0x42687716 in ?? () from /usr/lib/libORBit-2.so.0
#15 0x400749a8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#16 0x40078063 in ?? () from /usr/lib/libglib-2.0.so.0
#17 0x40078221 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#18 0x42682997 in link_main_iteration () from /usr/lib/libORBit-2.so.0
#19 0x42664fbe in giop_recv_buffer_get () from /usr/lib/libORBit-2.so.0
#20 0x4266a086 in ORBit_small_invoke_stub () from /usr/lib/libORBit-2.so.0
#21 0x4266a2b9 in ORBit_small_invoke_stub_n () from /usr/lib/libORBit-2.so.0
#22 0x42676f3a in ORBit_c_stub_invoke () from /usr/lib/libORBit-2.so.0
#23 0x42587974 in Accessibility_EventListener_notifyEvent ()
   from /usr/lib/libspi.so.0
#24 0x4249d16c in ?? () from /usr/lib/gtk-2.0/modules/libatk-bridge.so
#25 0x4249db79 in ?? () from /usr/lib/gtk-2.0/modules/libatk-bridge.so
#26 0x415bcb41 in ?? () from /usr/lib/libgobject-2.0.so.0
#27 0x4287176a in ?? ()
#28 0x4286fa05 in ?? ()
#29 0x4286f584 in ?? ()
#30 0x4286f110 in ?? ()
#31 0x4286f07c in ?? ()
#32 0x4286ef00 in ?? ()
#33 0x4286a8b7 in ?? ()
#34 0x4286a271 in ?? ()
#35 0x4286a024 in ?? ()
#36 0x42869f2a in ?? ()
#37 0x42869bed in ?? ()
#38 0x4285b9c8 in ?? ()
#39 0x4285b7b1 in ?? ()
#40 0x4285b6e3 in ?? ()
#41 0x4285b6a7 in ?? ()
#42 0x4285b12c in ?? ()
#43 0x4285a854 in ?? ()
#44 0x4285a7d4 in ?? ()
#45 0x41bc7e94 in ?? ()
#46 0x41bcf13f in ?? ()
#47 0x41bce591 in ?? ()
#48 0x42856404 in ?? ()
#49 0x428563ca in ?? ()
#50 0x42856227 in ?? ()
#51 0x42855f37 in ?? ()
#52 0x41bce2fb in ?? ()
#53 0x41bce2db in ?? ()
#54 0x41bcd6ad in ?? ()
#55 0x41bccb4f in ?? ()
#56 0x41bcee38 in ?? ()
#57 0x41bc8f1a in ?? ()
#58 0x41bc837b in ?? ()
#59 0x41bc8301 in ?? ()
#60 0x41bc8092 in ?? ()
#61 0x42854845 in ?? ()
#62 0x42854804 in ?? ()
#63 0x41bc7df0 in ?? ()
#64 0x4255731a in ?? ()
#65 0x428543b3 in ?? ()
#66 0x42854159 in ?? ()
#67 0x4255726a in ?? ()
#68 0x4255720d in ?? ()
#69 0x42853322 in ?? ()
#70 0x42850586 in ?? ()
#71 0x428502dc in ?? ()
#72 0x41035e61 in ?? ()
#73 0x410fcde6 in ?? ()
#74 0x41132233 in ?? ()
#75 0x41131eff in ?? ()
#76 0x41131aec in ?? ()
#77 0x411380f4 in ?? ()
#78 0x41129583 in ?? ()
#79 0x410fcdb3 in ?? ()
#80 0x410fcd42 in ?? ()
#81 0x4113c876 in ?? ()
#82 0x410f635d in ?? ()
#83 0x4113c37f in ?? ()
#84 0x41044718 in ?? ()
#85 0x4104452d in ?? ()
#86 0x407036da in ?? ()
#87 0x40703203 in ?? ()
#88 0x0810e2ee in mono_runtime_exec_main (method=0x322e18, args=0x29f48, 
    exc=0x0) at object.c:3296
#89 0x0810ea0b in mono_runtime_run_main (method=0x82b2f6c, argc=1, 
    argv=0xbff325b8, exc=0x0) at object.c:3084
#90 0x080b0e6a in mono_main (argc=3, argv=0xbff325b4) at driver.c:969
#91 0x0805ad01 in main (argc=) at main.c:34

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================


The application was terminated by a signal: SIGABRT


Comment 9 Andres Aragoneses 2008-12-11 00:37:50 UTC
I'll tell my progress:

The first patch wasn't working because it lacked the call to DropGtkModulesConf in the proper place. When correcting this, I got:

undefined symbol: gdk_display_open

Brad helped me to see that (with ldd) bridge-glue wasn't being linked to Gdk. We tried to borrow autofoo stuff from gdk-sharp but didn't get very far.

I then tried to use managed code instead:

Gdk.Display display = Gdk.Display.Open (Environment.GetEnvironmentVariable ("DISPLAY"));
Gtk.Settings settings = Gtk.Settings.GetForScreen (display.DefaultScreen);
Gtk.SettingsValue newVal = new Gtk.SettingsValue ();
newVal.Value = new GLib.Value (String.Empty);
settings.SetPropertyValue ("gtk-modules", newVal);
newVal.Value.Dispose ();


However, am getting a crash:

Stacktrace:

  at (wrapper managed-to-native) Gtk.Settings.gtk_settings_get_for_screen (intptr) <0x00004>
  at (wrapper managed-to-native) Gtk.Settings.gtk_settings_get_for_screen (intptr) <0xffffffff>
  at Gtk.Settings.GetForScreen (Gdk.Screen) <0x0002a>


I then tried to debug it with GDB (downloading the packages gtk2-debuginfo,  gtk2-debugsource, glibc-profile):

Program received signal SIGSEGV, Segmentation fault.
0xb59814d5 in IA__gtk_rc_reparse_all_for_settings (settings=0x8ce7000, 
    force_load=1) at gtkrc.c:840
840	  for (i = 0; gtk_rc_default_files[i] != NULL; i++)
(gdb) bt
#0  0xb59814d5 in IA__gtk_rc_reparse_all_for_settings (settings=0x8ce7000, 
    force_load=1) at gtkrc.c:840
#1  0xb599e662 in IA__gtk_settings_get_for_screen (screen=0x8cc20f8)
    at gtksettings.c:1006


It seems that gtk_rc_default_files is empty... So I'm gonna try to set it via Gtk.Rc. managed interface...
Comment 10 Andres Aragoneses 2008-12-11 04:13:24 UTC
Ok, got a workaround for that crash. Call this just after g_type_init():

gtk_rc_get_default_files ();

Or, if in managed, just after GLib.GType.Init ():

Console.WriteLine ("number:" + Gtk.Rc.DefaultFiles.Length);

Comment 11 Andres Aragoneses 2008-12-11 05:17:26 UTC
(In reply to comment #10 from Andrés G. Aragoneses)
> Ok, got a workaround for that crash. Call this just after g_type_init():
> 
> gtk_rc_get_default_files ();
> 
> Or, if in managed, just after GLib.GType.Init ():
> 
> Console.WriteLine ("number:" + Gtk.Rc.DefaultFiles.Length);
> 

This has been reported as http://bugzilla.gnome.org/show_bug.cgi?id=564066
Comment 12 Andres Aragoneses 2008-12-11 16:03:27 UTC
Brad: posting my latest patch is not very useful because even this gtk simple testcase doesn't work (it loads gail!):

on_destroy (GtkWidget * widget, gpointer data)
{
  gtk_main_quit ();
}

int main (int argc, char *argv[])
{
	g_type_init ();
    //if (!gtk_parse_args(&argc, &argv))
    // return 1;
    gtk_rc_get_default_files ();


    // display_name is owned by gdk.
    //const char *display_name = ":0.0";//gdk_get_display_arg_name();
	
	GdkDisplay* display = NULL;

	display = gdk_display_open(":0.0");
	if (!display) {
		g_warning ("Error: cannot open display: %s\n", ":0.0");
		return;
	}
	
	GtkSettings* settings =
	  gtk_settings_get_for_screen (gdk_display_get_default_screen (display));
	gchar* gtk_modules_setting = NULL;
	g_object_get(settings, "gtk-modules", &gtk_modules_setting, NULL);
	if (gtk_modules_setting != NULL) {
		g_warning ("1:the setting was not null!!!!!!!!!!%s", gtk_modules_setting);
		gtk_modules_setting = g_strdup("");
		g_object_set(settings, "gtk-modules", "gnomebreakpad:canberra-gtk-module", NULL);
		g_free (gtk_modules_setting);
	}
	else {g_warning ("2:the setting WAS null!!!!!!!!!!");}
	
	gtk_modules_setting = NULL;
	g_object_get(settings, "gtk-modules", &gtk_modules_setting, NULL);
	if (gtk_modules_setting != NULL) {
		g_warning ("2:the setting was not null!!!!!!!!!!%s", gtk_modules_setting);
		gtk_modules_setting = g_strdup("");
		g_object_set(settings, "gtk-modules", "gnomebreakpad:canberra-gtk-module", NULL);
		g_free (gtk_modules_setting);
	}
	else {g_warning ("2:the setting WAS null!!!!!!!!!!");}
	
     GtkWidget *window;
     GtkWidget *label;

     gtk_init (&argc, &argv);

     /* create the main, top level, window */
     window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

     /* give the window a 20px wide border */
     gtk_container_set_border_width (GTK_CONTAINER (window), 20);

     /* give it the title */
     gtk_window_set_title (GTK_WINDOW (window), "dio cane");

     /* open it a bit wider so that both the label and title show up */
     gtk_window_set_default_size (GTK_WINDOW (window), 200, 50);

     /* Connect the destroy event of the window with our on_destroy function
      * When the window is about to be destroyed we get a notificaiton and
      * stop the main GTK loop
      */
     g_signal_connect (G_OBJECT (window), "destroy",
                       G_CALLBACK (on_destroy), NULL);

     /* Create the "Hello, World" label  */
     label = gtk_label_new ("Hello, World");

     /* and insert it into the main window  */
     gtk_container_add (GTK_CONTAINER (window), label);

     /* make sure that everything, window and label, are visible */
     gtk_widget_show_all (window);

     /* start the main loop */
     gtk_main ();

	return 0;
}

So it seems that Firefox's workaround doesn't work. Well, actually, I just checked and Firefox indeed is not accessible on oS11.1!! which should be reported as shipstopper IMO.

Anyway, I'll post the patch right now.

I'm investigating on wether this has anything to do with the kind of GtkSettings I'm getting (the ones for a screen as opposed to the default ones??). Will report more soon.
Comment 13 Andres Aragoneses 2008-12-11 16:05:50 UTC
(In reply to comment #12 from Andrés G. Aragoneses)
> [...]
> So it seems that Firefox's workaround doesn't work. Well, actually, I just
> checked and Firefox indeed is not accessible on oS11.1!! which should be
> reported as shipstopper IMO.

Aha!! bug 457728.
Comment 14 Andres Aragoneses 2008-12-11 16:33:25 UTC
Created attachment 259476 [details]
as promised, my latest patch
Comment 15 Brad Taylor 2008-12-15 21:25:26 UTC
This issue blocks the 0.9.1 release.
Comment 16 Andres Aragoneses 2008-12-18 17:28:22 UTC
Created attachment 260947 [details]
proposed patch for mono-winforms

Note: this depends on at-spi trunk.
Comment 17 Sanford Armstrong 2008-12-18 17:44:35 UTC
Andres, I'd recommend putting your new logic directly in the GtkInit method.  *We* created that method to house all the init logic, so there's no need to worry about making it messy.  And then you don't have to have a method with two modes, which is kind of awkward.
Comment 18 Andres Aragoneses 2008-12-18 17:53:50 UTC
(In reply to comment #17 from Sanford Armstrong)
> Andres, I'd recommend putting your new logic directly in the GtkInit method. 
> *We* created that method to house all the init logic, 

Oh true!

> so there's no need to
> worry about making it messy.  And then you don't have to have a method with two
> modes, which is kind of awkward.

Well, it's to avoid repeating the #if block :)

But anyway, these are just cosmetic changes that may be worthless, because I'm thinking we could always have done it in the bridge, instead of in MonoWinforms. I'd say, let's try to push this into trunk and the branch, and later we'll revisit it to maybe drop it completely and rather add the hack in the bridge :)
Comment 19 Andres Aragoneses 2008-12-19 17:55:02 UTC
Created attachment 261428 [details]
patch for the branch
Comment 20 Andres Aragoneses 2008-12-19 17:57:09 UTC
Created attachment 261430 [details]
patch for trunk
Comment 21 Andres Aragoneses 2008-12-19 18:04:58 UTC
Both of these depend on patch of bug 460890. Testing trunk...
Comment 22 Brad Taylor 2008-12-29 19:14:17 UTC
+		string gtk_modules_envvar_name = "GTK_MODULES";
+		string atk_bridge_envvar_name = "NO_AT_BRIDGE";
+		string gail_envvar_name = "NO_GAIL";

Since they don't change, why don't you make these const?
Comment 23 Andres Aragoneses 2009-01-07 00:23:59 UTC
(In reply to comment #22 from Brad Taylor)
> +               string gtk_modules_envvar_name = "GTK_MODULES";
> +               string atk_bridge_envvar_name = "NO_AT_BRIDGE";
> +               string gail_envvar_name = "NO_GAIL";
> 
> Since they don't change, why don't you make these const?

You're right. I'll commit with this change.
Comment 24 Andres Aragoneses 2009-01-07 17:12:35 UTC
(In reply to comment #23 from Andrés G. Aragoneses)
> You're right. I'll commit with this change.

Patches committed in r122670 and r122676.

I wonder if we shouldn't close this bug until we have the correct autofoo for detecting the correct required versions of Gail & Atk-Bridge.
Comment 25 Brad Taylor 2009-02-06 16:02:02 UTC
On OpenSUSE 11.1, we couldn't version bump gail or atk-bridge, so there's really no way we could tell that the fixes were installed without invoking rpm directly, and I really want to avoid this.

This really should be closed, but I can't remove the dependency that is no longer correct (the bug doesn't track the at-spi issue, but a FireFox issue that doesn't impact us).  Ugh, dependencies are so worthless.
Comment 26 Brad Taylor 2009-02-06 16:02:57 UTC
It appears I have to do it in two parts (remove dependency, commit, and then close).
Comment 27 Stephen Shaw 2009-02-24 19:46:11 UTC
With the gtk+ and at-spi patches are install accessibility works