On Aug 22, 2011, at 1:56 PM, was wrote:
> I wonder if this relates to the problems I'm having using Resco's
> AdvancedList and DetailView (DV)components when scrolling records/items. My
> recent Resco forum message on this subject:
> 
> /'Further info: With 6 ComboBoxes containing nearly 1500 records in total in
> the DV, the app crashes after a few scrolls up and down. If the number of
> lookup records is much less, say 100 or so in total, the crashes do not
> occur. No crashes occur if there are no lookup records in any of the
> ComboBoxes' lists and the DV may be scrolled  indefinitely without problems.

The most important question: are your crashes on the emulator or on hardware?

Due to architectural decisions, each instances of a Java.Lang.Object subclass 
results in allocating a Global Reference (GREF) from Dalvik, and Dalvik only 
supports 2000 GREFs in the emulator (~52000 on device). If each of your 1500 
records is backed by a Java.Lang.Object subclass, and they're all "live" 
concurrently, you'll hit that 2000 limit fairly quickly, which will crash. See:

        
http://android.xamarin.com/Documentation/Troubleshoot#Unexpected_NullReferenceExceptions

If this is what you're hitting, there's unfortunately not much you can do 
(other than kill the emulator and test on actual hardware) that doesn't involve 
architectural changes to your code to either Dispose or reuse objet instances, 
to minimize the number of objects alive concurrently. (There is also a related 
GC issue here, but if you have a giant ComboBox with 1500 Buttons in it or 
something, the GC isn't going to help there, as they're all live.)

If you're seeing this on hardware, then you're probably hitting a GC bug, which 
should (hopefully) be fixed [0] in 1.0.3 (due soon).

 - Jon

[0] TouchTest works. Lots of other GC-related bugs now work. It's a _huge_ fix.

_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

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

Reply via email to