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

Fatal exception #3

Open
Ornolfr opened this issue Jul 10, 2017 · 1 comment
Open

Fatal exception #3

Ornolfr opened this issue Jul 10, 2017 · 1 comment
Assignees
Labels

Comments

@Ornolfr
Copy link

Ornolfr commented Jul 10, 2017

java.lang.IllegalArgumentException: x must be >= 0
                                                                               at android.graphics.Bitmap.checkXYSign(Bitmap.java:364)
                                                                               at android.graphics.Bitmap.createBitmap(Bitmap.java:669)
                                                                               at android.graphics.Bitmap.createBitmap(Bitmap.java:639)
                                                                               at ir.mirrajabi.viewfilter.core.ViewFilter.getFilteredBackgroundOfView(ViewFilter.java:50)
                                                                               at ir.mirrajabi.viewfilter.core.ViewFilter$1.run(ViewFilter.java:39)
                                                                               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:5281)
                                                                               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:902)
                                                                               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)

@mirrajabi mirrajabi added the bug label Jul 13, 2017
@mirrajabi
Copy link
Owner

@Ornolfr
Thanks for the feedback.
I know this one. It happens when the view is not drawn yet but we are trying to use some of its logic that is dependent to layout size.
I don't have a solution yet. If anyone has I will gladly add an update to fix it.

For now if you have this issue just try putting your code inside onPostCreate or some elsewhere that you know happens after the activity is fully created and drawn.

@mirrajabi mirrajabi self-assigned this Aug 23, 2018
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