I'm developing a GTK# application using a SOAP service to get the data. Errors are occurring on retrieving items and putting them in a Gtk.ComboBox.
Types of errors seen:
- gmem.c:170: failed to allocate x bytes, followed by SIGTRAP/SIGSEV/whatever
- glibc detected * /usr/bin/mono: double free or corruption (fasttop): 0x00007f27100e85a0 * Gdk:ERROR:gdkregion-generic.c:1110:miUnionNonO: assertion failed: (y1 < y2) followed by SIGIOT *just a SIGSEGV with a long stracktrace
I do also see these quite often:
- (KvkManager:11471): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
- (KvkManager:11506): Gtk-WARNING **: gtktreemodel.c:2114: bad row reference, proxy has no outstanding row references
This is the main part of my code:
using System;
using Gtk;
using KvkWsProxy;
public partial class MainWindow: Gtk.Window
{
private KvkSoapServerService kvkProxy;
private NodeStore productsStore;
protected Gdk.PixbufAnimation loadingTrobber;
public MainWindow (): base (Gtk.WindowType.Toplevel)
{
Build ();
this.tabs.CurrentPage = 0;
this.loadingTrobber = new Gdk.PixbufAnimation("ajax-loader.gif");
this.productsStore = new Gtk.NodeStore(typeof(KvkManager.SimpleProductTreeNode));
this.kvkProxy = new KvkSoapServerService();
this.kvkProxy.getSimpleProductsCompleted += this.putProducts;
this.kvkProxy.getCollectionsCompleted += this.putProductCollections;
this.kvkProxy.getTypesCompleted += this.putProductTypes;
this.productsList.NodeStore = productsStore;
this.productsList.AppendColumn("Nummer", new Gtk.CellRendererText(), "text", 0);
this.productsList.AppendColumn("Naam", new Gtk.CellRendererText(), "text", 1);
this.productsList.AppendColumn("Prijs", new Gtk.CellRendererText(), "text", 2);
this.productsList.ShowAll();
this.getProductCollections();
this.getProductTypes();
}
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
Application.Quit ();
a.RetVal = true;
}
protected void putProductCollections(object sender, getCollectionsCompletedEventArgs args)
{
this.productCollectionsComboBox.Clear();
CellRendererText cell = new CellRendererText();
this.productCollectionsComboBox.PackStart(cell, false);
this.productCollectionsComboBox.AddAttribute(cell, "markup", 1);
ListStore store = new ListStore(typeof(int), typeof(string));
this.productCollectionsComboBox.Model = store;
store.AppendValues(-1, "<span font-style=\"italic\">alle collecties</span>");
foreach(Product_ProductCollection collection in args.Result)
{
store.AppendValues(collection.id, collection.name);
}
this.productCollectionsComboBox.Active = 0;
this.productCollectionsComboBox.Sensitive = true;
this.getCollectionsAnimation.Visible = false;
}
protected void putProductTypes(object sender, getTypesCompletedEventArgs args)
{
... like putProductCollections() ...
}
protected void OnSearchButtonClicked (object sender, System.EventArgs e)
{
this.productSearchButton.Sensitive = false;
this.searchAnimation.PixbufAnimation = this.loadingTrobber;
this.searchAnimation.Visible = true;
productsStore.Clear();
this.kvkProxy.getSimpleProductsAsync();
}
protected void putProducts(object sender, getSimpleProductsCompletedEventArgs args)
{
foreach(Product_SimpleProduct product in args.Result)
{
productsStore.AddNode(new KvkManager.SimpleProductTreeNode(product));
}
this.productSearchButton.Sensitive = true;
this.searchAnimation.Visible = false;
}
protected void getProductCollections()
{
this.productCollectionsComboBox.Sensitive = false;
this.getCollectionsAnimation.PixbufAnimation = this.loadingTrobber;
this.getCollectionsAnimation.Visible = true;
this.kvkProxy.getCollectionsAsync();
}
protected void getProductTypes()
{
... like putProductCollections() ...
}
protected void getProductSizegroups()
{
... like putProductCollections() ...
}
protected void getProductBrands()
{
... like putProductCollections() ...
}
}
You can download the whole project on http://home.vdslikke.net:8090/~johan/KvkManager.zip.
Versions of my software:
- MonoDevelop 2.8.1
- Mono 2.10.5 (tarball Mon Sep 5 19:35:47 UTC 2011) (64-bit)
- GTK 2.24.8 (GTK# 2.12.0.0)
If there is any information you need to help me with this problem, please let me know.