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

NullPointerException on Falcon.drawRootToBitmap #10

Closed
mathroule opened this issue Jul 20, 2016 · 4 comments
Closed

NullPointerException on Falcon.drawRootToBitmap #10

mathroule opened this issue Jul 20, 2016 · 4 comments
Labels
Milestone

Comments

@mathroule
Copy link

mathroule commented Jul 20, 2016

When using Falcon with Spoon for instrumentation tests, this exception appears sporadically :

The stack trace:

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.draw(android.graphics.Canvas)' on a null object reference
at com.jraska.falcon.Falcon.drawRootToBitmap(Falcon.java:148)
at com.jraska.falcon.Falcon.drawRootsToBitmap(Falcon.java:133)
at com.jraska.falcon.Falcon.access$100(Falcon.java:25)
at com.jraska.falcon.Falcon$1.run(Falcon.java:117)
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:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

I could add the full Spoon trace if needed.

@jraska
Copy link
Owner

jraska commented Jul 25, 2016

Hi, thank you for reporting this.
Can you please tell me on which device is this happening. It would be nice if you could include the whole test case and I can try to reproduce it.
Please include the Spoon trace as well.

@jraska jraska added the bug label Jul 25, 2016
@jraska jraska added this to the 1.0.2 milestone Jul 26, 2016
@jraska
Copy link
Owner

jraska commented Jul 26, 2016

Should be fixed with 0aac416.
It will log an error when the null View in layout manager occurs.

I'm still not sure how this can be possible and if you could provide full test case it might be handy.

I will close the issue when I release new version.

@jraska
Copy link
Owner

jraska commented Jul 27, 2016

Version 1.0.2 released

@jraska jraska closed this as completed Jul 27, 2016
@mathroule
Copy link
Author

Thanks for the fix!

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

No branches or pull requests

2 participants