Bug 46026 - JNI ERROR (app bug) Accessed deleted global reference 0x$Address
Summary: JNI ERROR (app bug) Accessed deleted global reference 0x$Address
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
Depends on:
Reported: 2016-10-27 14:05 UTC by Mykola Shpotenko
Modified: 2017-06-15 16:26 UTC (History)
2 users (show)

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

Aplication log from start till exception (817.98 KB, text/plain)
2016-10-27 14:05 UTC, Mykola Shpotenko

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 Mykola Shpotenko 2016-10-27 14:05:48 UTC
Created attachment 18249 [details]
Aplication log from start till exception


When loading data from soap in list our application crashes.

  JNI ERROR (app bug): accessed deleted global reference 0x(memory address)

This crashes is easily reproducible , but sometimes in can be from first time , sometimes from second one or third.

When digging gref log found this lines of code

[monodroid-gref] +g+ grefc 562 gwrefc 0 obj-handle 0xf0800019/I -> new-handle 0x500c66/G from thread '(null)'(1)
[monodroid-gref] -g- grefc 562 gwrefc 0 handle 0x500c66/G from thread '(null)'(1)
[monodroid-gref] +g+ grefc 562 gwrefc 0 obj-handle 0x1e00001/I -> new-handle 0x200a52/G from thread 'Threadpool worker'(6)
[art] JNI ERROR (app bug): accessed deleted global reference 0x500c66

So for my understand it creating a new gref handle and delete then after . Like i'm used "using". But somehow my ACW have a refence on deleted Java Object or i'm wrong. Thanks for all advise.

Xamarin Studio Business
Version 6.1.1 (build 15)
Installation UUID: df37b678-828c-408a-989b-1089b0496e34
	Mono 4.6.1 (mono-4.6.0-branch-c8sr0/ef43c15) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406010005


Version: 0.33.2
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools
Xcode 8.0 (11246)
Build 8A218a

Version: (Xamarin Business)
Hash: ad1cd42
Branch: cycle8-sr0-xi
Build date: 2016-10-03 15:18:44-0400

Version: (Xamarin Business)
Android SDK: /Users/nickolasshpotenko/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)
		7.0    (API level 24)

SDK Tools Version: 25.2.2
SDK Platform Tools Version: 24.0.3
SDK Build Tools Version: 24.0.2

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:

Xamarin Android Player
Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

Not Installed

Xamarin Inspector
Hash: 4d868da
Branch: master
Build date: Mon Jun 13 19:14:13 UTC 2016

Build Information
Release ID: 601010015
Git revision: fa52f02641726146e2589ed86ec4097fbe101888
Build date: 2016-09-22 08:03:02-04
Xamarin addins: 75d65712af93d54dc39ae4c42b21dfa574859fd6
Build lane: monodevelop-lion-cycle8-sr0

Operating System
Mac OS X 10.11.6
Darwin MacBook-Nick.Dlink 15.6.0 Darwin Kernel Version 15.6.0
    Mon Aug 29 20:21:34 PDT 2016
    root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64

Enabled user installed addins
NuGet Package Management Extensions 0.11.1
Xamarin Inspector
Comment 1 Paul DiPietro [MSFT] 2017-03-03 17:21:15 UTC
Hi, can you upload a reproduction project to help investigate this?
Comment 2 Paul DiPietro [MSFT] 2017-06-15 16:26:24 UTC
Closing this due to no response so we will reasonably assume this is no longer an issue. Please reopen and attach a minimized reproduction project if the issue still exists as of the latest prerelease or nightly build.