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
Developer Community or GitHub 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 have a class that is just made up of properties.
@interface Field : NSObject
@property long IntValue;
// Other properties
When debugging on the simulator (iOS 6.1) everything is fine. When I run it on the device (iOS 6.1) the value in IntValue becomes a very large number. If I change IntValue to be of type int with the same value everything is fine.
After years of .NET it becomes confusing to think that `long` is 4 bytes. That's true in C and ObjC. The .NET long (8 bytes) is `long long`.
There's a few reason it might seems to work in some cases, e.g. memory alignment, having a 0 value neighbour.
Shameless plug: a good way to find such errors in bindings is to test them with unit tests. That's not as hard or complex as it sounds. Start reading http://blog.xamarin.com/producing-better-bindings-for-xamarin.ios-and-xamarin.mac/ for more details (more coming soon, including one specific to the binding signatures)