Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
I've had troubles in linux-x86_64, when I was marshaling an object like this. In C:
typedef struct X_point3d
/* array x, y, z */
In .NET c#, I described:
public struct X_point3d
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3,
ArraySubType = UnmanagedType.R4)]
public float p; /* In C, p */
public X_point3d(float x, float y, float z)
this.p = new float;
this.p = x;
this.p = y;
this.p = z;
static extern int suro_metric_to_amt(HandleRef met, int a, X_point3d centre,
X_point3d axis, int b);
When calling suro_metric_to_amt, I checked the stack, and there were not 32-bit floats packed as 32-bit. There weren't also 64-bit floats packed as 64-bit. There were wrong numbers in the X_point3d, and they were also bad packed because 'b' also got a bad value.
I don't know much C#... maybe I'm doing something wrong? In windows, with visual studio, that code works perfectly in 32-bit.
This is probably a compiler or runtime issue
Please attach a self contained test case.
If you can still reproduce with latest mono version, please feel free to reopen the bug. Thank you.