[Gtk-sharp-list] Gtk# instability nightmares
Aaron Oxford
aaron at hardwarehookups.com.au
Mon Apr 2 19:22:43 EDT 2007
Hi everyone,
As you may remember I've been having a hell of a time porting my GUI
to Gtk#. After a series of tests I ran with Brad from Medsphere, all
I can basically say is that Gtk# is unstable on my system. The
attached program crashes on my system within a few minutes of operation.
I'm running a dual core Athlon 3800 with a gig of RAM under Server2k3
and .NET2.0. We've verified that the Gtk#, OS or .NET versions don't
matter, and certainly the amount of RAM shouldn't matter with this
test. BTW my RAM has been thoroughly tested with Memtest86 (the DOS
one) during this ordeal.
Really my question comes down to whether or not Gtk# is stable on
other people's dual core AMD/Windows setups, and has anyone else
observed crashes like those listed below or noticed that they go away
when running inside a VMWare machine?
Thanks again,
Aaron.
Exception Type 1:
GLib-GObject-CRITICAL (recursed) **:g_object_unref: assertion
'G_IS_OBJECT (object)' failed
aborting...
Exception Type 2:
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object.
at GLib.Signal.OnNativeDestroy(IntPtr data, IntPtr obj)
at Gtk.Application.gtk_main()
at Gtk.Application.Run()
at Test.Main()
Exception Type 3:
Unhandled Exception: System.AccessViolationException: Attempted to
read or write
protected memory. This is often an indication that other memory is corrupt.
at Gtk.Application.gtk_main()
at Gtk.Application.Run()
at Test.Main()
-------------- next part --------------
using System;
using Gtk;
public class Test
{
private Label label = null;
private Dialog dialog = null;
private int counter = 0;
public static void Main ()
{
Application.Init ();
new Test ();
Application.Run ();
}
public Test ()
{
Window wnd = new Window ("Test");
label = new Label(counter.ToString());
wnd.Add(label);
wnd.ShowAll ();
GLib.Timeout.Add (500, new GLib.TimeoutHandler (CreateDialog));
}
private bool CreateDialog ()
{
ListStore store = new ListStore (typeof (string));
for (int i = 0; i < 50; i++)
store.AppendValues (i.ToString ());
TreeView tv = new TreeView ();
tv.Model = store;
tv.AppendColumn ("column", new CellRendererText (), new TreeCellDataFunc (RendererFunc));
ScrolledWindow scroll = new ScrolledWindow ();
scroll.Add (tv);
Dialog d = new Dialog ();
d.VBox.Add (scroll);
d.ShowAll ();
dialog = d;
counter++;
label.Text = counter.ToString();
GLib.Timeout.Add (500, new GLib.TimeoutHandler (DestroyDialog));
return false;
}
private bool DestroyDialog ()
{
dialog.Destroy();
dialog = null;
GLib.Timeout.Add (500, new GLib.TimeoutHandler (CreateDialog));
return false;
}
private void RendererFunc (TreeViewColumn col, CellRenderer renderer, TreeModel model, TreeIter iter)
{
CellRendererText text = renderer as CellRendererText;
text.Text = (string)model.GetValue (iter, 0);
}
}
-------------- next part --------------
---------------------------------------------------------------------------------
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