https://bugzilla.novell.com/show_bug.cgi?id=638716
https://bugzilla.novell.com/show_bug.cgi?id=638716#c0 Summary: DeleteLocalRef warning for CharSequence Classification: Mono Product: MonoDroid Version: SVN Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Class Libraries AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Change the Button sample's OnCreate method to: --------- protected override void OnCreate (Bundle bundle) { #if MONODROID_TIMING Logger.Log(LogLevel.Info, "MonoDroid-Timing", "ButtonActivity.OnCreate: time: " + (DateTime.Now - new DateTime (1970, 1, 1)).TotalMilliseconds); #endif base.OnCreate (bundle); // Create your application here Android.Widget.Button button = new Android.Widget.Button (this); button.Text = string.Format ("{0} clicks!!", count); button.Click += delegate { button.Text = string.Format ("{0} clicks!!", ++count); }; j_timer = new Java.Util.Timer (); j_timer.Schedule (new FooTimerTask (s => RunOnUiThread (() => button.Text = string.Format ("{0} clicks!!", ++count))), 100, 1); SetContentView (button); } ---------- And add this class: ---------- class FooTimerTask : TimerTask { Action<string> action; public FooTimerTask (Action<string> action) { this.action = action; } public override void Run () { action ("ignore"); } } ----------- When this is run, log shows lots of : W/dalvikvm( 5352): JNI WARNING: DeleteLocalRef(0x481eea78) failed to find entry (valid=1) W/dalvikvm( 5352): JNI WARNING: DeleteLocalRef(0x481dd0e8) failed to find entry (valid=1) W/dalvikvm( 5352): JNI WARNING: DeleteLocalRef(0x481f8c20) failed to find entry (valid=1) W/dalvikvm( 5352): JNI WARNING: DeleteLocalRef(0x481dd138) failed to find entry (valid=1) W/dalvikvm( 5352): JNI WARNING: DeleteLocalRef(0x481eead8) failed to find entry (valid=1) I printed Environment.StackTrace in JNIEnv.DeleteLocalRef and got: W/dalvikvm( 5352): JNI WARNING: DeleteLocalRef(0x4812b588) failed to find entry (valid=1) I/DeleteLocalRef( 5352): at System.Environment.get_StackTrace() I/DeleteLocalRef( 5352): at Android.Runtime.JNIEnv.DeleteLocalRef(IntPtr jobject) I/DeleteLocalRef( 5352): at Java.Lang.CharSequence.Finalize() And this at the end (app crashes): W/dalvikvm( 5352): ReferenceTable overflow (max=51200) W/dalvikvm( 5352): Last 10 entries in JNI global reference table: W/dalvikvm( 5352): 51190: 0x4817df00 cls=Lmono/java/lang/IRunnableAdapter; (12 bytes) W/dalvikvm( 5352): 51191: 0x4817de00 cls=Lmono/java/lang/IRunnableAdapter; (12 bytes) W/dalvikvm( 5352): 51192: 0x4817de10 cls=Lmono/java/lang/IRunnableAdapter; (12 bytes) W/dalvikvm( 5352): 51193: 0x4817de20 cls=Lmono/java/lang/IRunnableAdapter; (12 bytes) W/dalvikvm( 5352): 51194: 0x4817de30 cls=Lmono/java/lang/IRunnableAdapter; (12 bytes) W/dalvikvm( 5352): 51195: 0x4817de40 cls=Lmono/java/lang/IRunnableAdapter; (12 bytes) W/dalvikvm( 5352): 51196: 0x4817db20 cls=Lmono/java/lang/IRunnableAdapter; (12 bytes) W/dalvikvm( 5352): 51197: 0x4817db30 cls=Lmono/java/lang/IRunnableAdapter; (12 bytes) W/dalvikvm( 5352): 51198: 0x4817db40 cls=Lmono/java/lang/IRunnableAdapter; (12 bytes) W/dalvikvm( 5352): 51199: 0x4817db50 cls=Lmono/java/lang/IRunnableAdapter; (12 bytes) W/dalvikvm( 5352): JNI global reference table summary (51200 entries): W/dalvikvm( 5352): 107 of Ljava/lang/Class; 172B (68 unique) W/dalvikvm( 5352): 2 of Ldalvik/system/VMRuntime; 12B (1 unique) W/dalvikvm( 5352): 1 of Ljava/lang/String; 28B W/dalvikvm( 5352): 10 of Ljava/lang/ref/WeakReference; 28B (10 unique) W/dalvikvm( 5352): 1 of Landroid/app/ActivityThread$ApplicationThread; 28B W/dalvikvm( 5352): 1 of Landroid/app/ActivityThread$PackageInfo$ServiceDispatcher$InnerConnection; 28B W/dalvikvm( 5352): 1 of Landroid/widget/Button; 548B W/dalvikvm( 5352): 2 of Landroid/view/ViewRoot$W; 28B (2 unique) W/dalvikvm( 5352): 1 of Landroid/view/accessibility/AccessibilityManager$1; 28B W/dalvikvm( 5352): 1 of Landroid/view/inputmethod/InputMethodManager$1; 28B W/dalvikvm( 5352): 1 of Landroid/view/inputmethod/InputMethodManager$ControlledInputConnectionWrapper; 36B W/dalvikvm( 5352): 1 of Lmono/samples/button/ButtonActivity; 180B W/dalvikvm( 5352): 1 of Lmono/android/view/view/OnClickListenerAdapter; 12B W/dalvikvm( 5352): 1 of Ljava/util/Timer; 20B W/dalvikvm( 5352): 1 of Lmono/samples/button/FooTimerTask; 44B W/dalvikvm( 5352): 48614 of Lmono/java/lang/IRunnableAdapter; 12B (48614 unique) W/dalvikvm( 5352): 2454 of Lmono/java/lang/IRunnableAdapter; 20B (2454 unique) W/dalvikvm( 5352): Memory held directly by native code is 645472 bytes E/dalvikvm( 5352): Failed adding to JNI global ref table (51200 entries) E/dalvikvm( 5352): VM aborting D/Zygote ( 2182): Process 5352 terminated by signal (7) ------ Filed bug #638714 for the IRunnableAdapter issue. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
