Version is 2.2.

Ah, right you are.


W/dalvikvm( 1461): Memory held directly by tracked refs is 92024 bytes
E/dalvikvm( 1461): Excessive JNI global references (2001)
E/dalvikvm( 1461): VM aborting
I/mono    ( 1461): Stacktrace:


Now... How do I actually clean up? If I deterministically call
GC.Collect(), the GREF count is stable. If I don't, it just grows and
grows (on the emulator only). On the device, I don't see any GREFs in the
log and (although I do see regular GC_FOR_MALLOC calls).

public void UpdateSuggestions (IList<string> suggestions)
                {                       
        var lvSuggestions = FindViewById<ListView>
(Resource.Id.suggestion_listview);

        GC.Collect (); //GROWS AND GROWS TO EXCEED 2000 on emulator without
this.   var adapter = new CustomisedTypefaceArrayAdapter<String>
(_registry.CustomTypeface, this, Resource.Layout.list_item,             
suggestions);
        lvSuggestions.Adapter = adapter;
                        

}







On 3/01/12 2:27 PM, "Jonathan Pryor" <j...@xamarin.com> wrote:

>On Dec 30, 2011, at 10:46 PM, Steven Pack wrote:
>> I regularly get an unhandled exception in the emulator when I
>>instantiate a custom ArrayAdaptor. The top level of the call stack
>>shows: "Mono_UnhandledException":
>...
>> The stacktrace is:
>> 
>> I/mono    ( 8244): Stacktrace:
>> I/mono    ( 8244):
>> I/mono    ( 8244):   at Android.Runtime.JNIEnv.NewGlobalRef (intptr)
>>[0x00000] in 
>>/Users/jon/Development/xamarin/monodroid/Mono.Android/src/Runtime/JNIEnv.
>>cs:336
>
>Which Android version? Is there any other output?
>
>I suspect it's due to GREF overflow, in which case there should be
>additional output:
>
>       
> http://docs.xamarin.com/android/troubleshooting?highlight=GREF#Unexpected
>_NullReferenceExceptions
>
>       D/dalvikvm(  602): GREF has increased to 2001
>       W/dalvikvm(  602): Last 10 entries in JNI global reference table:
>       ...
>
>- Jon
>


_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to