Bug 8779 - Double Value is not returning consistant values
Summary: Double Value is not returning consistant values
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 4.2.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
: 8511 ()
Depends on:
Reported: 2012-12-05 13:44 UTC by hani
Modified: 2013-12-05 18:36 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

screen shot showing incorrect double values (7.44 KB, image/png)
2012-12-05 13:44 UTC, hani

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description hani 2012-12-05 13:44:55 UTC
Created attachment 3061 [details]
screen shot showing incorrect double values

Here is a issue with incorrect double valuyes and seems to be related to certain phone models, DroidX2, Samsung Galaxy S3

I have the following class

public class Coordinate {
	private double mLatitude;
	private double mLongitude;

	public double HorizontalAccuracy;
	public double VerticalAccuracy;

	public Coordinate() {

	public Coordinate(double pLatitude, double pLongitude) {
		Latitude = pLatitude;
		Longitude = pLongitude;

	/// <summary>
	/// Latitude in degrees. -90 to 90
	/// </summary>
	public Double Latitude {
		get { return mLatitude; }
		set {
			if (value > 90) {
				throw new ArgumentOutOfRangeException("value", "Latitude value cannot be greater than 90.");
			if (value < -90) {
				throw new ArgumentOutOfRangeException("value", "Latitude value cannot be less than -90.");
			mLatitude = value;

	/// <summary>
	/// Longitude in degree. -180 to 180
	/// </summary>
	public Double Longitude {
		get { return mLongitude; }
		set {
			if (value > 180) {
				throw new ArgumentOutOfRangeException("value", "Longitude value cannot be greater than 180.");
			if (value < -180) {
				throw new ArgumentOutOfRangeException("value", "Longitude value cannot be less than -180.");
			mLongitude = value;

See attached screen shot, the return values are not the same as what was entered.  I am seeing this with Location class and other classes that deal with double values.

The values also change on every invocation of Latitude or Longitude
Comment 1 Zoltan Varga 2012-12-06 08:46:15 UTC
jonp: This was probably fixed by c91fc1d6b68994c0c179c4ad99f1a656b14c61ec, I don't know whenever that commit is part of the version used by the reporter.
Comment 2 Jonathan Pryor 2012-12-06 10:58:44 UTC
Commit c91fc1d6 is not in Mono for Android 4.2.7. It is included in 4.4.

@hani: Please try debugging your app on the latest Mono for Android 4.4.x beta. It should be fixed there.
Comment 3 hani 2012-12-06 17:07:39 UTC
I was about to install the beta version but it tells me that my license is expired and the product would revert to trial 

I checked the site and my license doesn't expire until Apr 2013
Comment 4 hani 2012-12-06 17:11:43 UTC
I went back into VS2010 and was going to debug my app and now Monodroid is telling me the license is expired.  I will install the beta and recycle the license
Comment 5 Jonathan Pryor 2012-12-06 17:22:52 UTC
@hani: If your license is supposed to expire in 2013, you shouldn't be getting that message. Could you please privately send me a copy of your monoandroid.licx file?

> http://docs.xamarin.com/android/guides/getting_started/installation/offline_activation

 - Jon
Comment 6 hani 2012-12-07 12:19:45 UTC
Sorry I didn't back up the license file, even though I cancelled the installer it ended up putting my existing version in Trial Mode.  I had to recycle the license and enter in the activation code to get back to normal.

I've had this happen several times, next time I will back up and send you the license file
Comment 7 Jonathan Pryor 2012-12-08 00:27:40 UTC
*** Bug 8511 has been marked as a duplicate of this bug. ***
Comment 8 PJ 2013-11-19 17:05:58 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 9 PJ 2013-12-05 18:36:25 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.