Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

ListView with Images crashes when "fast"-scrolling

$
0
0

Hi everyone,

I have a ListView with around 15-20 images and everything is working fine, but when I scroll really fast up and down after a few seconds the app crashes with a OutOfMemoryError Exception.

Does anyone know a solution to this?

[dalvikvm-heap] Clamp target GC heap from 50.876MB to 48.000MB
[dalvikvm-heap] Clamp target GC heap from 54.179MB to 48.000MB
[dalvikvm-heap] Forcing collection of SoftReferences for 691216-byte allocation
[dalvikvm-heap] Clamp target GC heap from 54.177MB to 48.000MB
[dalvikvm-heap] Out of memory on a 691216-byte allocation.
[skia] --- decoder->decode returned false
[MonoDroid] UNHANDLED EXCEPTION: Java.Lang.OutOfMemoryError: Exception of type 'Java.Lang.OutOfMemoryError' was thrown.
[MonoDroid]   at Android.Runtime.JNIEnv.CallStaticObjectMethod (IntPtr jclass, IntPtr jmethod, Android.Runtime.JValue[] parms) [0x00064] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1160 
[MonoDroid]   at Android.Graphics.BitmapFactory.DecodeStream (System.IO.Stream is) [0x00034] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Graphics.BitmapFactory.cs:631 
[MonoDroid]   at Android.Graphics.BitmapFactory+<DecodeStreamAsync>c__AnonStorey9.<>m__0 () [0x00000] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Graphics.BitmapFactory.cs:638 
[MonoDroid]   at System.Threading.Tasks.TaskActionInvoker+FuncInvoke`1[Android.Graphics.Bitmap].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0 
[MonoDroid]   at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0 
[MonoDroid]   at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0 
[MonoDroid] --- End of stack trace from previous location where exception was thrown ---
[MonoDroid]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
[MonoDroid]   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[Android.Graphics.Bitmap].GetResult () [0x00000] in <filename unknown>:0 
[MonoDroid]   at Xamarin.Forms.Platform.Android.ImageLoaderSourceHandler+<LoadImageAsync>d__0.MoveNext () [0x00000] in <filename unknown>:0 
[MonoDroid] --- End of stack trace from previous location where exception was thrown ---
[MonoDroid]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
[MonoDroid]   at System.Runtime.CompilerServices.TaskAwaiter`1[Android.Graphics.Bitmap].GetResult () [0x00000] in <filename unknown>:0 
[MonoDroid]   at Xamarin.Forms.Platform.Android.ImageRenderer+<UpdateBitmap>d__0.MoveNext () [0x00000] in <filename unknown>:0 
[MonoDroid]   --- End of managed exception stack trace ---
[MonoDroid] java.lang.OutOfMemoryError
[MonoDroid]     at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
[MonoDroid]     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:527)
[MonoDroid]     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:599)
[MonoDroid]     at dalvik.system.NativeStart.run(Native Method)
[mono-rt] Stacktrace:
[mono-rt] 
[mono-rt]   at <unknown> <0xffffffff>
[mono-rt]   at (wrapper managed-to-native) object.wrapper_native_0x4077312d (intptr,intptr,string,string) <IL 0x0004c, 0xffffffff>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_intptr__this___intptr_intptr_string_string (intptr,intptr,string,string) <IL 0x00063, 0xffffffff>
[mono-rt]   at Android.Runtime.JNIEnv.GetMethodID (intptr,string,string) [0x00042] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:157
[mono-rt]   at Java.Lang.Throwable.get_Message () [0x00014] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Java.Lang.Throwable.cs:231
[mono-rt]   at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this__ (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
[mono-rt]   at <unknown> <0xffffffff>
[mono-rt]   at (wrapper dynamic-method) object.73461f14-7b54-4c43-84be-e5b14b6ef252 (intptr,intptr) <IL 0x0002e, 0x000a0>
[mono-rt]   at (wrapper native-to-managed) object.73461f14-7b54-4c43-84be-e5b14b6ef252 (intptr,intptr) <IL 0x00022, 0xffffffff>
[mono-rt] 
[mono-rt] =================================================================
[mono-rt] Got a SIGSEGV while executing native code. This usually indicates
[mono-rt] a fatal error in the mono runtime or one of the native libraries 
[mono-rt] used by your application.
[mono-rt] =================================================================
[mono-rt]  

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>