On Aug 11, 2012, at 1:14 PM, Matthieu Laban <m...@flyingdevstudio.com> wrote: > We're still working on porting our iOS/WP7 app to Android and we're hitting a > road block... > > Basically, the app crashes at random times when loading things, creating > shaders, parsing data, etc... > Most of it seems memory related since we're getting the errors mostly in > Array.Resize() or other methods that have to do with memory allocations. > > I added some code to invoke the Runtime GC > (Java.Lang.Runtime.GetRuntime().Gc()) and it tends to make things better, but > we always crash further down the line.
Invoke System.GC.Collect(). Collecting just the Dalvik VM won't help with Mono's VM, and System.GC.Collect() will invoke a Dalvik GC as well. > The GC messages in the log seem to say that we still have a lot of available > memory though, ~40% out of 13MB when it crashes usually. That's the Dalvik GC, not Mono's GC. You'll also want to enable Mono's GC logging: adb shell setprop debug.mono.log gc http://docs.xamarin.com/android/advanced_topics/diagnostics > There are 2 types of crash we get, they both have call stacks, but one says > that the process has been terminated by signal (11). If using System.GC doesn't change anything, and it's reproducible, please file a bug at bugzilla.xamarin.com with your repro and instructions so that we can investigate. Thanks, - Jon _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid