[Mono-bugs] [Bug 375987] Segmentation fault with testcase project that uses Atk# and System.Windows .Forms

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Apr 1 19:51:31 EDT 2008


User sanfordarmstrong at gmail.com added comment

Sanford Armstrong <sanfordarmstrong at gmail.com> changed:

           What    |Removed                                         |Added
             Status|NEEDINFO                                        |NEW
      Info Provider|aaragoneses at novell.com                          |

--- Comment #5 from Sanford Armstrong <sanfordarmstrong at gmail.com>  2008-04-01 17:51:31 MST ---
Looks like the problem is related to how System.Windows.Forms inits GTK+ in
order to figure out theme colors.  This causes ATK to initialize with the
GAIL/GTK/whatver-it-is bridge when we will want to be initializing it with our
own UIA bridge.  Trimmed IRC conversation discussing possible solutions

<knocte> this is the line:      retval = klass->get_root ();
 and that line goes to the managed world
<knocte> why can it be that a SWF Form conflicts with that?
<kangaroo> knocte: You try dropping the gtk init in swf?
<knocte> mmm, wait, does SWF use GTK?
<kangaroo> X11DesktopColors.cs
<sandy> kangaroo: same problem... it's GLib.GType.Init(); by the way
<kangaroo> in the static ctor
 try commenting the entire Desktop.Gtk block
 or patch it in FindDesktopEnv
<knocte> but I don't understand why SWF uses Gtk
<kangaroo> knocte: To find some default colors
 to look a little better
<kangaroo> try removing that block and see if it fixes it
 kangaroo: if this is indeed the problem, what do you suggest to fix it? I
guess we cannot drop the dependency of SWF on GTK?
<sandy> knocte, kangaroo: totally worked with that commented out
<knocte> glad you found the problem :) but now concerned about the solution :(
<kangaroo> that should be easy
 figure out why they cannot interop
<kangaroo> and what api calls need to happen in what order for them to interop
 and patch appropriately :)
<knocte> gtk needs gtk_init to work
<kangaroo> I think we call gtk_init_check
 or something
<knocte> and gtk_init launches atkbridge, which then results in having the same
module called twice
<knocte> we cannot call gtk_init
<kangaroo> knocte: gtk should have some "gtk_is_inited_yet()" type call
<knocte> but kangaroo, gtk is not inited yet
<kangaroo> why can gtk not be init'd?
<knocte> what is inited is a gtk module: atkbridge
 because we need to use our own atk root object
 not the one that GTK stablishes
 we are a different toolkit than GTK, and then we need to manage accessibility
infrastructure ourselves
<kangaroo> eww
 well you'll need to either:
<knocte> maybe the way to go is to patch gtk_init in order to check if
atkbridge is inited yet or not
<kangaroo> a) figure out a way around that on your side
 b) figure out another way to get the colors we need from gtk+
 c) convince jpobst we dont need to probe gtk+
 but the problem is in our theming layer
 if someone makes a native gtk+ theme
<kangaroo> your code will break
 knocte: he's the person to convince to not do that in mwf; but thats not a
long term solution anyways
<knocte> yeah, that's why I think maybe the right way is fix this from the
root, modifying gtk_init
* spouliot suggest to copy-paste that to the bug report and reassign it
elsewhere :)
<knocte> yep, to gnome xD
 no, I want to fix it, it will be cool
<jpobst> i would love to not probe gtk+ in mwf, that's what causes the bugbuddy
issues for us
<jpobst> the only thing it is used for (i think) is to get theme colors, if
there's another way to do that, that'd be awesome

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list