TourGuide
TourGuide copied to clipboard
OutOfMemoryError
java.lang.OutOfMemoryError: Failed to allocate a 8294412 byte allocation with 16777216 free bytes and 130MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:939)
at android.graphics.Bitmap.createBitmap(Bitmap.java:912)
at android.graphics.Bitmap.createBitmap(Bitmap.java:879)
at tourguide.tourguide.FrameLayoutWithHole.init(FrameLayoutWithHole.java:122)
at tourguide.tourguide.FrameLayoutWithHole.
Of course I use android:largeHeap="true" but It doesn`t help. Samsung s4.
Hi there,
This is not normal at all! We've fixed a memory leak issue previously, and I've installed LeakCanary, it's not currently showing any leak. So I'm not sure where to troubleshoot.
Can you tell me how are you using it so that I can reproduce the same issue?
Thanks!
Thanks for your reply. Yes, I am able to reproduce this issue and I saw the same report with memory overflow like(https://github.com/worker8/TourGuide/issues/4) Our app dynamically update the text in the title of tabs. After code with tourguide show I update my view - after out of memory.
I guess the problem is in TourGuide.class -> setupView() -> ViewTreeObserver.
There is my test app with googles SlidingTabs.
it is doesn`t matter how much chars update.
I'm seeing the same thing, and it has to do with TourGuide.mHighlightedView's global layout listener getting called over and over, even though this listener is removed immediately. Somehow it's not getting removed.
Facing the similar issue in my code which is in production. Device model is SM-G900I running Android 5.0. Was anyone able to figure out a fix for this?
App trace:
java.lang.OutOfMemoryError: Failed to allocate a 8294412 byte allocation with 4807864 free bytes and 4MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:939)
at android.graphics.Bitmap.createBitmap(Bitmap.java:912)
at android.graphics.Bitmap.createBitmap(Bitmap.java:879)
at tourguide.tourguide.FrameLayoutWithHole.init(FrameLayoutWithHole.java:122)
at tourguide.tourguide.FrameLayoutWithHole.
I am getting the same error in lollipop with samsung devies like Samsung S5, S6, A3. Anyone with a fix yet?
Pending approval, this commit in my pull request is a bit hacky, but it solves the problem of the global layout listener being called repeatedly until the OOM. I also added both global layout listener removal methods in this commit.