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 (show other bugs)
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)

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


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

Note You need to log in before you can comment on or make changes to this bug.