[Mono-bugs] [Bug 583901] GInterfaces no longer work, crash with invalid class pointer in gtype.c
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Oct 13 10:16:16 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=583901
https://bugzilla.novell.com/show_bug.cgi?id=583901#c12
--- Comment #12 from David Glick <dglick at dracorp.com> 2010-10-13 14:16:15 UTC ---
Sure, no problem. The results of running with Mono on the command line are
below. But first, given the question of if this is a Mono or Gtk bug, it's
probably worth noting that we get the same crash when using Gtk-sharp 2.12.10
with the Microsoft 3.5 CLR as we get with the Mono runtime. If I run the
example from Visual Studio directly using the MS CLR it crashes on line 64 (the
constructor for the MyTreeModel class) with an AccessViolationException and the
following stack trace:
at GLib.Object.gtksharp_object_newv(IntPtr gtype, Int32 n_params, IntPtr[]
names, Value[] vals)
at GLib.Object.CreateNativeObject(String[] names, Value[] vals)
at GLib.Object..ctor()
at GtkSamples.MyTreeModel..ctor() in C:\Documents and Settings\dglick\My
Documents\Visual Studio
2008\Projects\TreeModelDemo\TreeModelDemo\TreeModelDemo.cs:line 64
at GtkSamples.TreeModelDemo..ctor() in C:\Documents and Settings\dglick\My
Documents\Visual Studio
2008\Projects\TreeModelDemo\TreeModelDemo\TreeModelDemo.cs:line 35
at GtkSamples.TreeModelDemo.Main(String[] args) in C:\Documents and
Settings\dglick\My Documents\Visual Studio
2008\Projects\TreeModelDemo\TreeModelDemo\TreeModelDemo.cs:line 53
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Given that this was using the MS CLR and not the Mono runtime, it would seem to
suggest the problem is with recent versions of Gtk-sharp or Glib-sharp.
Here is the result of running without any args (launched from within the Mono
2.8 Command Prompt window):
C:\Documents and Settings\dglick\My Documents\Visual Studio
2008\Projects\TreeModelDemo\TreeModelDemo\bin\Debug>mono TreeModelDemo.exe
Stacktrace:
at (wrapper managed-to-native) GLib.Object.gtksharp_object_newv
(intptr,int,intptr[],GLib.Value[]) <0x00003>
at (wrapper managed-to-native) GLib.Object.gtksharp_object_newv
(intptr,int,intptr[],GLib.Value[]) <0x00003>
at GLib.Object.CreateNativeObject (string[],GLib.Value[]) <0x0009b>
at GLib.Object..ctor () <0x0004c>
at GtkSamples.MyTreeModel..ctor () <0x00036>
at GtkSamples.TreeModelDemo..ctor () <0x0009f>
at GtkSamples.TreeModelDemo.Main (string[]) <0x00026>
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object
(object,intptr,intptr,intptr) <0x00073>
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
And here's a more verbose run:
C:\Documents and Settings\dglick\My Documents\Visual Studio
2008\Projects\TreeModelDemo\TreeModelDemo\bin\Debug>mono --debug -v
TreeModelDemo.exe
..
converting method Gtk.TreeModelAdapter:.ctor ()
Method Gtk.TreeModelAdapter:.ctor () emitted at 0x1228660 to 0x12286af (code
length 79) [TreeModelDemo.exe]
converting method Gtk.TreeModelAdapter:.cctor ()
Method Gtk.TreeModelAdapter:.cctor () emitted at 0x1228758 to 0x1228a71 (code
length 793) [TreeModelDemo.exe]
converting method (wrapper managed-to-native)
Gtk.TreeModelAdapter:gtk_tree_model_get_type ()
Method (wrapper managed-to-native) Gtk.TreeModelAdapter:gtk_tree_model_get_type
() emitted at 0x1228a80 to 0x1228ac3 (code length 67) [TreeModelDemo.exe]
converting method GLib.GInterfaceAdapter:get_Info ()
Method GLib.GInterfaceAdapter:get_Info () emitted at 0x1228ac8 to 0x1228b85
(code length 189) [TreeModelDemo.exe]
converting method Gtk.TreeModelAdapter:get_GType ()
Method Gtk.TreeModelAdapter:get_GType () emitted at 0x1228b88 to 0x1228ba4
(code length 28) [TreeModelDemo.exe]
converting method (wrapper managed-to-native)
GLib.Object:g_type_add_interface_static (intptr,intptr,GLib.GInterfaceInfo&)
Method (wrapper managed-to-native) GLib.Object:g_type_add_interface_static
(intptr,intptr,GLib.GInterfaceInfo&) emitted at 0x1228bb0 to 0x1228d1b (code
length 363) [TreeModelDemo.exe]
converting method (wrapper native-to-managed) Gtk.TreeModelAdapter:Initialize
(intptr,intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:Initialize
(intptr,intptr) emitted at 0x1228d20 to 0x1228d8e (code length 110)
[TreeModelDemo.exe]
converting method (wrapper managed-to-native)
object:__icall_wrapper_mono_ftnptr_to_delegate (intptr,intptr)
Method (wrapper managed-to-native)
object:__icall_wrapper_mono_ftnptr_to_delegate (intptr,intptr) emitted at
0x1228da0 to 0x1228df2 (code length 82) [TreeModelDemo.exe]
converting method Gtk.TreeModelAdapter:Initialize (intptr,intptr)
Method Gtk.TreeModelAdapter:Initialize (intptr,intptr) emitted at 0x1228df8 to
0x1228f87 (code length 399) [TreeModelDemo.exe]
converting method (wrapper managed-to-native)
System.Runtime.InteropServices.Marshal:PtrToStructure (intptr,System.Type)
Method (wrapper managed-to-native)
System.Runtime.InteropServices.Marshal:PtrToStructure (intptr,System.Type)
emitted at 0x1228fa0 to 0x1228fef (code length 79) [TreeModelDemo.exe]
converting method (wrapper unknown)
Gtk.TreeModelAdapter/TreeModelIface:PtrToStructure (intptr,object)
Method (wrapper unknown) Gtk.TreeModelAdapter/TreeModelIface:PtrToStructure
(intptr,object) emitted at 0x1228ff0 to 0x12292d4 (code length 740)
[TreeModelDemo.exe]
converting method (wrapper runtime-invoke)
<Module>:runtime_invoke_void_intptr_object (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) <Module>:runtime_invoke_void_intptr_object
(object,intptr,intptr,intptr) emitted at 0x12292d8 to 0x122936d (code length
149) [TreeModelDemo.exe]
converting method (wrapper managed-to-native)
System.Runtime.InteropServices.Marshal:StructureToPtr (object,intptr,bool)
Method (wrapper managed-to-native)
System.Runtime.InteropServices.Marshal:StructureToPtr (object,intptr,bool)
emitted at 0x1229370 to 0x12293ba (code length 74) [TreeModelDemo.exe]
converting method (wrapper unknown)
Gtk.TreeModelAdapter/TreeModelIface:StructureToPtr (object,intptr,bool)
Method (wrapper unknown) Gtk.TreeModelAdapter/TreeModelIface:StructureToPtr
(object,intptr,bool) emitted at 0x12293c0 to 0x122962d (code length 621)
[TreeModelDemo.exe]
converting method (wrapper runtime-invoke)
<Module>:runtime_invoke_void_object_intptr_sbyte (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke)
<Module>:runtime_invoke_void_object_intptr_sbyte (object,intptr,intptr,intptr)
emitted at 0x1229630 to 0x12296d7 (code length 167) [TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:GetFlagsCallback (intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:GetFlagsCallback
(intptr) emitted at 0x12296d8 to 0x1229744 (code length 108)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:GetNColumnsCallback (intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:GetNColumnsCallback
(intptr) emitted at 0x1229750 to 0x12297bc (code length 108)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:GetColumnTypeCallback (intptr,int)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:GetColumnTypeCallback
(intptr,int) emitted at 0x12297c8 to 0x1229837 (code length 111)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:GetIterCallback (intptr,intptr,intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:GetIterCallback
(intptr,intptr,intptr) emitted at 0x1229848 to 0x12298bd (code length 117)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:GetPathCallback (intptr,intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:GetPathCallback
(intptr,intptr) emitted at 0x12298d0 to 0x122993f (code length 111)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:GetValueCallback (intptr,intptr,int,intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:GetValueCallback
(intptr,intptr,int,intptr) emitted at 0x1229950 to 0x12299bf (code length 111)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:IterNextCallback (intptr,intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:IterNextCallback
(intptr,intptr) emitted at 0x12299d0 to 0x1229a42 (code length 114)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:IterChildrenCallback (intptr,intptr,intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:IterChildrenCallback
(intptr,intptr,intptr) emitted at 0x1229a50 to 0x1229ac5 (code length 117)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:IterHasChildCallback (intptr,intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:IterHasChildCallback
(intptr,intptr) emitted at 0x1229ad8 to 0x1229b4a (code length 114)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:IterNChildrenCallback (intptr,intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:IterNChildrenCallback
(intptr,intptr) emitted at 0x1229b58 to 0x1229bc7 (code length 111)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:IterNthChildCallback (intptr,intptr,intptr,int)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:IterNthChildCallback
(intptr,intptr,intptr,int) emitted at 0x1229bd8 to 0x1229c4d (code length 117)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:IterParentCallback (intptr,intptr,intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:IterParentCallback
(intptr,intptr,intptr) emitted at 0x1229c60 to 0x1229cd5 (code length 117)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:RefNodeCallback (intptr,intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:RefNodeCallback
(intptr,intptr) emitted at 0x1229ce8 to 0x1229d54 (code length 108)
[TreeModelDemo.exe]
converting method (wrapper native-to-managed)
Gtk.TreeModelAdapter:UnrefNodeCallback (intptr,intptr)
Method (wrapper native-to-managed) Gtk.TreeModelAdapter:UnrefNodeCallback
(intptr,intptr) emitted at 0x1229d60 to 0x1229dcc (code length 108)
[TreeModelDemo.exe]
converting method System.Runtime.InteropServices.GCHandle:Free ()
Method System.Runtime.InteropServices.GCHandle:Free () emitted at 0x1229dd8 to
0x1229dfa (code length 34) [TreeModelDemo.exe]
converting method (wrapper managed-to-native)
System.Runtime.InteropServices.GCHandle:FreeHandle (int)
Method (wrapper managed-to-native)
System.Runtime.InteropServices.GCHandle:FreeHandle (int) emitted at 0x1229e08
to 0x1229e4a (code length 66) [TreeModelDemo.exe]
Stacktrace:
at (wrapper managed-to-native) GLib.Object.gtksharp_object_newv
(intptr,int,intptr[],GLib.Value[]) <0x00003>
at (wrapper managed-to-native) GLib.Object.gtksharp_object_newv
(intptr,int,intptr[],GLib.Value[]) <0x00003>
at GLib.Object.CreateNativeObject (string[],GLib.Value[]) <IL 0x0003f,
0x0009b>
at GLib.Object..ctor () <IL 0x0001a, 0x0004c>
at GtkSamples.MyTreeModel..ctor () [0x0000b] in
TreeModelDemo\TreeModelDemo.cs:64
at GtkSamples.TreeModelDemo..ctor () [0x00029] in
TreeModelDemo\TreeModelDemo.cs:35
at GtkSamples.TreeModelDemo.Main (string[]) [0x00007] in
TreeModelDemo\TreeModelDemo.cs:53
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object
(object,intptr,intptr,intptr) <IL 0x00049, 0x00073>
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
--
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