1
Je voulais lister tous mes articles "récemment utilisés". J'utilise ce code:Gtk.RecentManager: Way to list Articles
public static void Main(string[] args)
{
Application.Init();
RecentManager rm = RecentManager.Default;
GLib.List items = rm.Items;
Console.WriteLine(items.Count+" items.");
foreach(object item in items)
{
Console.WriteLine(item.ToString());
}
Console.WriteLine("Done.");
Console.ReadKey();
}
Si les éléments-liste est vide tous les travaux comme prévu. Toutefois, si le RecentManager a en fait contenir des éléments, je reçois:
3 items.
Stacktrace:
at (wrapper managed-to-native) GLib.Object.gtksharp_is_object (intptr) <0x00070>
at (wrapper managed-to-native) GLib.Object.gtksharp_is_object (intptr) <0xffffffff>
at GLib.Object.IsObject (intptr) <0x00013>
at GLib.ListBase.DataMarshal (intptr) <0x003ff>
at GLib.ListBase/ListEnumerator.get_Current() <0x0004b>
at ruCmd.MainClass.Main (string[]) [0x00038] in /home/nils/Projekte/RecentlyUsed/ruCmd/Main.cs:14
at (wrapper runtime-invoke) ruCmd.MainClass.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
/usr/bin/mono [0x480c90]
/usr/bin/mono [0x4b004d]
/lib/libpthread.so.0 [0x7fad5b7c85a0]
/usr/lib/libgobject-2.0.so.0(g_type_check_instance_is_a+0x53) [0x7fad55c642e3]
[0x41d48b00]
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Y at-il une erreur dans ma manipulation de Gtk #/GLib? J'ai déjà reconstruit mon mono-environnement.