Bug 51663 - CarouselView 2.30.pre2 crashes with out of memory exception after multiple swipes
Summary: CarouselView 2.30.pre2 crashes with out of memory exception after multiple sw...
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: PC Windows
: Low normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-01-20 15:59 UTC by Matronix
Modified: 2017-06-19 19:13 UTC (History)
4 users (show)

Tags: carouselview android
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description Matronix 2017-01-20 15:59:50 UTC
I have an app with the CarouselView.  After swiping back and fort between pages the app will eventually crash when it runs out of memory.  Is there a memory leak happening? 

Java.Interop.JniEnvironmentFailed to allocate a 12538892 byte allocation with 6804128 free bytes and 6MB until OOM
Raw
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <776ea0debb0941ccafea6901481afc93>:0
at Java.Interop.JniEnvironment+StaticMethods.CallStaticObjectMethod (Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00082] in <d4630d6b92f0473b8cc768a8b81f521d>:0
at Java.Interop.JniPeerMembers+JniStaticMethods.InvokeObjectMethod (System.String encodedMember, Java.Interop.JniArgumentValue* parameters) [0x00019] in <d4630d6b92f0473b8cc768a8b81f521d>:0
at Android.Graphics.Bitmap.CreateBitmap (System.Int32 width, System.Int32 height, Android.Graphics.Bitmap+Config config) [0x0005e] in <c88dabba44cf44cbbb91d2b504ebe958>:0
at Xamarin.Forms.Platform.Android.FrameRenderer+FrameDrawable.CreateBitmap (System.Boolean pressed, System.Int32 width, System.Int32 height) [0x00006] in <eed8aa96500949579ca8d725b7c74dd0>:0
at Xamarin.Forms.Platform.Android.FrameRenderer+FrameDrawable.Draw (Android.Graphics.Canvas canvas) [0x00079] in <eed8aa96500949579ca8d725b7c74dd0>:0
at Android.Graphics.Drawables.Drawable.n_Draw_Landroid_graphics_Canvas_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_canvas) [0x00011] in <c88dabba44cf44cbbb91d2b504ebe958>:0
at (wrapper dynamic-method) System.Object:ff64432f-dc48-484f-ad27-6fd128097c19 (intptr,intptr,intptr)
--- End of managed Java.Lang.Error stack trace ---
java.lang.OutOfMemoryError: Failed to allocate a 12538892 byte allocation with 6804128 free bytes and 6MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:879)
at android.graphics.Bitmap.createBitmap(Bitmap.java:856)
at android.graphics.Bitmap.createBitmap(Bitmap.java:823)
at md5b60ffeb829f638581ab2bb9b1a7f4f3f.FrameRenderer_FrameDrawable.n_draw(Native Method)
at md5b60ffeb829f638581ab2bb9b1a7f4f3f.FrameRenderer_FrameDrawable.draw(FrameRenderer_FrameDrawable.java:50)
at android.view.View.getDrawableRenderNode(View.java:17428)
at android.view.View.drawBackground(View.java:17364)
at android.view.View.draw(View.java:17176)
at android.view.View.updateDisplayListIfDirty(View.java:16167)
at android.view.View.draw(View.java:16951)
at android.view.ViewGroup.drawChild(ViewGroup.java:3727)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3513)
at android.view.View.draw(View.java:17188)
at android.view.View.updateDisplayListIfDirty(View.java:16167)
at android.view.View.draw(View.java:16951)
at android.view.ViewGroup.drawChild(ViewGroup.java:3727)
at android.support.v7.widget.RecyclerView.drawChild(RecyclerView.java:3838)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3513)
at android.view.View.draw(View.java:17188)
at android.support.v7.widget.RecyclerView.draw(RecyclerView.java:3308)
at android.view.View.updateDisplayListIfDirty(View.java:16167)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3711)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3691)
at android.view.View.updateDisplayListIfDirty(View.java:16130)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3711)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3691)
at android.view.View.updateDisplayListIfDirty(View.java:16130)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3711)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3691)
at android.view.View.updateDisplayListIfDirty(View.java:16130)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3711)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3691)
at android.view.View.updateDisplayListIfDirty(View.java:16130)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3711)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3691)
at android.view.View.updateDisplayListIfDirty(View.java:16130)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3711)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3691)
at android.view.View.updateDisplayListIfDirty(View.java:16130)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3711)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3691)
at android.view.View.updateDisplayListIfDirty(View.java:16130)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3711)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3691)
at android.view.View.updateDisplayListIfDirty(View.java:16130)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3711)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3691)
at android.view.View.updateDisplayListIfDirty(View.java:16130)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3711)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3691)
at android.view.View.updateDisplayListIfDirty(View.java:16130)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:648)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:654)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:762)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2800)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2608)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2215)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
at android.view.Choreographer.doCallbacks(Choreographer.java:686)
at android.view.Choreographer.doFrame(Choreographer.java:621)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Comment 1 Paul DiPietro [MSFT] 2017-02-15 15:58:47 UTC
Could you possibly upload a minimized reproduction (context of its usage helps) and provide more information about the emulator or device you're using with the CarouselView? It would be much appreciated.
Comment 2 Paul DiPietro [MSFT] 2017-06-19 19:13:22 UTC
We will be moving to this implementation of CarouselView in the future:

http://github.com/xamarin/Xamarin.Forms/pull/853