amlcurran / ShowcaseView

[Archived] Highlight the best bits of your app to users quickly, simply, and cool...ly
5.6k stars 1.29k forks source link

NullPointerException at c.setBitmap() in dispatchDraw() #6

Closed ghost closed 11 years ago

ghost commented 11 years ago

FATAL EXCEPTION: main java.lang.NullPointerException at android.graphics.Canvas.setBitmap(Canvas.java:143) at com.espian.showcaseview.ShowcaseView.dispatchDraw(ShowcaseView.java:190) at android.view.ViewGroup.drawChild(ViewGroup.java:1644) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) at android.view.ViewGroup.drawChild(ViewGroup.java:1644) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) at android.view.View.draw(View.java:6883) at android.widget.FrameLayout.draw(FrameLayout.java:357) at android.view.ViewGroup.drawChild(ViewGroup.java:1646) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) at android.view.ViewGroup.drawChild(ViewGroup.java:1644) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) at android.view.View.draw(View.java:6883) at android.widget.FrameLayout.draw(FrameLayout.java:357) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1921) at android.view.ViewRoot.draw(ViewRoot.java:1526) at android.view.ViewRoot.performTraversals(ViewRoot.java:1262) at android.view.ViewRoot.handleMessage(ViewRoot.java:1863) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3687) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636) at dalvik.system.NativeStart.main(Native Method)

amlcurran commented 11 years ago

How did you manage to get this to occur? I've not had an issue like this yet.

ghost commented 11 years ago

Note: It occurred even for my own project that implemented the ShowcaseView Library. Had to comment that line c.setBitmap(null) to get it to work.

amlcurran commented 11 years ago

I've place the offending code in a try/catch block; it doesn't affect the running of the program in any way, so I'll mark this as wontfix.