Bug 55286 - Java.Interop.JniRuntime.CurrentRuntime.WeakGlobalReferenceCount always returns -1.
Summary: Java.Interop.JniRuntime.CurrentRuntime.WeakGlobalReferenceCount always return...
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 7.2 (15.1)
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2017-04-17 15:09 UTC by Jon Douglas [MSFT]
Modified: 2017-06-23 17:32 UTC (History)
2 users (show)

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

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 for Bug 55286 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Jon Douglas [MSFT] 2017-04-17 15:09:44 UTC

The following API seems to always return -1:



*Expected Result:

Should return the current Weak Reference Count

*Actual Result:

Returns -1

*Version Information:

Microsoft Visual Studio Enterprise 2017 
Version 15.1 (26403.0) Release
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Xamarin (3f99c5a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK (b16fb82)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK (7656cc6)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Comment 1 Mark McLemore 2017-06-23 17:32:34 UTC
Confirmed by examining the AndroidRuntime.cs source (above) and via corroboration on SO: https://stackoverflow.com/questions/43403968/how-do-i-diagnose-the-cause-of-a-xamarin-android-weak-reference-table-overflow