[Mono-bugs] [Bug 76635][Nor] New - Mono JIT on ARM p/invoke double trouble

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Nov 5 03:58:13 EST 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 alp at atoker.com.


--- shadow/76635	2005-11-05 03:58:13.000000000 -0500
+++ shadow/76635.tmp.11868	2005-11-05 03:58:13.000000000 -0500
@@ -0,0 +1,43 @@
+Bug#: 76635
+Product: Mono: Runtime
+Version: 1.1
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: alp at atoker.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Mono JIT on ARM p/invoke double trouble
+With this DllImport:
+static extern void poppler_page_render_to_pixbuf(IntPtr raw, int src_x, int
+src_y, int src_width, int src_height, double scale, int rotation, IntPtr
+pixbuf is passed to the unmanaged library as 0 instead of its actual value.
+So I wrote this unmanaged wrapper function:
+static extern void poppler_page_render_to_pixbuf_simple(IntPtr raw, int
+src_x, int src_y, int src_width, int src_height, int scale, int rotation,
+int pixbuf);
+When 'scale' is passed as an int to the new function, the value of pixbuf
+is passed to unmanaged code just fine. (The wrapper function converts the
+int scale to a double and calls the original function.)
+In other words, it seems that parameters after the double in a p/invoke are
+not passed to unmanaged code correctly.
+This is on the same device (Nokia 770) and software environment as reported
+in #76553.

More information about the mono-bugs mailing list