[Mono-bugs] [Bug 75109][Nor] New - unmanaged delegate problems on ia32e

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jun 1 12:37:15 EDT 2005

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 james at ximian.com.


--- shadow/75109	2005-06-01 12:37:15.000000000 -0400
+++ shadow/75109.tmp.28541	2005-06-01 12:37:15.000000000 -0400
@@ -0,0 +1,52 @@
+Bug#: 75109
+Product: Mono: Runtime
+Version: 1.1
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: JIT
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: james at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: unmanaged delegate problems on ia32e
+I'm seeing a crash when unamanged code attempts to invoke a managed
+delagate, only on amd64/ia32e boxes (mono
+The C api where the delegate is passed is:
+rc_world_foreach_package_by_name (RCWorld *world,
+                                  const char *name,
+                                  RCChannel *channel,
+                                  RCPackageFn fn,
+                                  gpointer user_data)
+RCPackageFn is the callback, defined as:
+typedef gboolean (*RCPackageFn) (RCPackage *pkg, gpointer data);
+RCPackage is just a struct.
+The managed wrapper for the above call is defined as:
+static extern int rc_world_foreach_package_by_name(IntPtr raw, string name,
+IntPtr channel, RCSharp.PackageDelegateNative fn, IntPtr user_data);
+RCSharp.PackageDelegateNative is defined as:
+internal delegate bool PackageDelegateNative(IntPtr pkg, IntPtr data);
+At first I thought it was the usual "managed delegate got garbage
+collected" stuff, but the test case holds a ref to the delegate.  Also,
+running with MONO_DEBUG=1 did not indicate any delegate GC stuff was happening.
+I will attach the test case I'm using, which uses libredcarpet-sharp
+(libredcarpet module in gnome cvs).

More information about the mono-bugs mailing list