[Mono-bugs] [Bug 58731][Nor] New - Marshaling for delegate params of delegates is missing

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 19 May 2004 16:57:38 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by mkestner@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=58731

--- shadow/58731	2004-05-19 16:57:38.000000000 -0400
+++ shadow/58731.tmp.10850	2004-05-19 16:57:38.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 58731
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mkestner@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Marshaling for delegate params of delegates is missing
+
+<mkestner> . . . . . ENTER: (wrapper managed-to-native)
+Gtk.Container:gtksharp_container_override_forall
+(GLib.GType,Gtk.Container/ForallDelegate)([f8,54,1b,08,],
+[.ForallDelegate:0x80dccf8], )
+<mkestner> 
+<mkestner> ** ERROR **: file marshal.c: line 2195
+(mono_marshal_get_managed_wrapper): assertion failed: ((klass->flags &
+TYPE_ATTRIBUTE_LAYOUT_MASK) != TYPE_ATTRIBUTE_AUTO_LAYOUT)
+<mkestner> aborting...
+<mkestner> Aborted
+<mkestner> [DllImport("gtksharpglue")]
+<mkestner> static extern void gtksharp_container_override_forall
+(GLib.GType gtype, ForallDelegate cb);
+<mkestner> 
+<mkestner> delegate void ForallDelegate (IntPtr container, bool
+include_internals, GtkSharp.CallbackNative cb, IntPtr data);
+<mkestner> 
+<mkestner> I think it's crapping out on the marshaling a delegate parameter
+of a delegate part
+<mkestner> GtkSharp.CallbackNative is: internal delegate void
+CallbackNative(IntPtr widget, IntPtr data);
+<vargaz> could you print out klass->name at the place where the assertion
+happens ?
+<mkestner> (gdb) p klass->name
+<mkestner> $1 = 0x417154af "CallbackNative
+<vargaz> so you are trying to pass a delegate from unmanaged to managed code ?
+<vargaz> it looks like the current code can't handle this.
+<mkestner> I am passing a delegate to native code that calls back with a
+delegate as a parameter
+<vargaz> could you file a bug report about this ? I will try to fix it
+tomorrow.