deano2390 / MaterialShowcaseView

A Material Design themed ShowcaseView for Android
Apache License 2.0
2.72k stars 526 forks source link

App crash cause of width and height must be > 0 error #116

Open sachinsandbhor opened 7 years ago

sachinsandbhor commented 7 years ago

Fatal Exception: java.lang.IllegalArgumentException: width and height must be > 0 at android.graphics.Bitmap.createBitmap(Bitmap.java:810) at android.graphics.Bitmap.createBitmap(Bitmap.java:789) at android.graphics.Bitmap.createBitmap(Bitmap.java:756) at uk.co.deanwild.materialshowcaseview.MaterialShowcaseView.onDraw(MaterialShowcaseView.java:154) at android.view.View.draw(View.java:15249) at android.widget.FrameLayout.draw(FrameLayout.java:598) at android.view.View.updateDisplayListIfDirty(View.java:14185) at android.view.View.getDisplayList(View.java:14207) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3392) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3371) at android.view.View.updateDisplayListIfDirty(View.java:14145) at android.view.View.getDisplayList(View.java:14207) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:273) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:279) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:318) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2548) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2364) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1994) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1073) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5903) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:828) at android.view.Choreographer.doCallbacks(Choreographer.java:588) at android.view.Choreographer.doFrame(Choreographer.java:558) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:814) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5268) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)

rr0055256 commented 7 years ago

I have the same issue with Android multi window screen support

aershov24 commented 7 years ago

I've got that error for "Invisible" view.

tushar-nallan commented 7 years ago

Some of my users are crashing with the same error

michel-t-86 commented 6 years ago

Same for me too. Would showing the showcase view as a runnable through post on the parent view fix this?

Assumption is that the showcase tries to draw before the parent view gets a chance to fully draw first.