[Gtk-sharp-list] Fwd: Re: Gtk# instability nightmares

Aaron Oxford aaron at hardwarehookups.com.au
Fri Apr 6 02:28:15 EDT 2007


Hi Adam and list,

Thanks for the heads-up. From reading about those Init() functions in 
the docs it seems GLib(#?) and Gdk(#?) have some critical sections 
that are not handled properly by default.

Now to get on my high-horse for a bit, this is a major no-no even on 
single core systems, and the speed with which it broke my dual core 
system suggests that these are *serious* misimplementations from a 
threading point of view. Minor problems like this can take days or 
weeks to manifest; these problems take the app down within a matter of seconds.

Can I very strongly suggest that

if(!GLib.Thread.Supported)
          GLib.Thread.Init();
Gdk.Threads.Init();

be placed inside Application.Init()? Basically the whole API is 
broken on a dual core system unless these calls are made. It's either 
this or you need to update every doco and sample in circulation to 
include these lines - something I'm guessing would be impractical. :-)

I know not to expect too much when asking about 64-bit or Server2K3 
support, but dual cores are here to stay - at my shop anyone not 
buying the balls out cheapest rig they can will get a dual core 
system from me every day of the week. So I don't wanna sound like 
'get with the program' or anything, but *assuming* what I've 
discovered about Gtk# and AMD X2s so far is correct, this needs to 
happen pronto for the benefit of ourselves and all our users.

After a couple of days of tests with these modifications, I am now 
quite satisfied that Gtk# is at least as stable as my own code. I 
thank you all once again for providing and being part of the only 
viable option for C# cross-platform GUI development, and especially 
for dealing with chump Visual Studio users like me. :-)

Aaron.

At 07:05 PM 5/04/2007, you wrote:
>Hi Aaron,
>
>Thanks for your e-mail. Those changes certainly made a big difference. I hope
>they fix the underlying problem though.
>
>I had to replace:
>
>GLib.Thread.Init();
>
>with:
>if(!GLib.Thread.Supported)
>          GLib.Thread.Init();
>
>I just thought I'd warn you in case you start seeing errors about 
>GLib threads
>at startup.
>
>Adam


---------------------------------------------------------------------------------
Aaron Oxford   -   aaron+hardwarehookups .com .au
Director, Innovative Computer Solutions (Aust) Pty. Ltd.
49 Maitland Rd, Mayfield, NSW 2304 Australia
http://www.ic-solutions.com.au
Developer, SourceForge project VioLet Composer
http://sourceforge.net/projects/buzz-like



More information about the Gtk-sharp-list mailing list