Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutOfMemoryError #82

Open
teralser opened this issue Mar 15, 2018 · 2 comments
Open

OutOfMemoryError #82

teralser opened this issue Mar 15, 2018 · 2 comments

Comments

@teralser
Copy link

--
0 | java.lang.OutOfMemoryError: Failed to allocate a 8294412 byte allocation with 7132184 free bytes and 6MB until OOM
1 | at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
2 | at android.graphics.Bitmap.nativeCreate(Native Method)
3 | at android.graphics.Bitmap.createBitmap(Bitmap.java:975)
4 | at android.graphics.Bitmap.createBitmap(Bitmap.java:946)
5 | at android.graphics.Bitmap.createBitmap(Bitmap.java:913)
6 | at co.mobiwise.materialintro.view.MaterialIntroView.onDraw(MaterialIntroView.java:341)
7 | at android.view.View.draw(View.java:17469)
8 | at android.view.View.updateDisplayListIfDirty(View.java:16464)
9 | at android.view.View.draw(View.java:17238)
10 | at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
11 | at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
12 | at android.view.View.draw(View.java:17472)
13 | at com.android.internal.policy.PhoneWindow$DecorView.draw(PhoneWindow.java:3205)
14 | at android.view.View.updateDisplayListIfDirty(View.java:16464)
15 | at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:325)
16 | at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:331)
17 | at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:366)
18 | at android.view.ViewRootImpl.draw(ViewRootImpl.java:3134)
19 | at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2933)
20 | at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2522)
21 | at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1437)
22 | at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7397)
23 | at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920)
24 | at android.view.Choreographer.doCallbacks(Choreographer.java:695)
25 | at android.view.Choreographer.doFrame(Choreographer.java:631)
26 | at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)
27 | at android.os.Handler.handleCallback(Handler.java:739)
28 | at android.os.Handler.dispatchMessage(Handler.java:95)
29 | at android.os.Looper.loop(Looper.java:158)
30 | at android.app.ActivityThread.main(ActivityThread.java:7224)
31 | at java.lang.reflect.Method.invoke(Native Method)
32 | at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
33 | at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

@SamGeek
Copy link

SamGeek commented Sep 14, 2018

Can anyone help with this error? im getting the same

@danielesegato
Copy link

danielesegato commented Nov 29, 2018

This:

        if (bitmap == null || canvas == null) {
            if (bitmap != null) bitmap.recycle();

            bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
            this.canvas = new Canvas(bitmap);
        }

inside onDraw() is madness....
alone is enough to make me think I shouldn't use this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants