-
Notifications
You must be signed in to change notification settings - Fork 337
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
Crash when setCacheEnabled(..) is set to true #14
Comments
If you're seeing this you're probably getting out of memory errors first, if your app is memory intensive then you may want to try adding largeHeap to the android manifest. I had this problem caused by loading up an apk extension file which required the zip decompressor in memory, thus leading to an oom error and then to this. I think a simple null check here would help too. |
I am sure it's not about OOM error. Logcat message clearly shows its a NullPointerException as below 08-23 13:08:22.172: E/AndroidRuntime(22880): FATAL EXCEPTION: AsyncTask |
Thanks for the note - I'll take a look as soon as I have some time - I probably just missed something when migrating. If you find a fix before then please post. |
anyone found the fix? Thx b4 |
I just tried and am unable to reproduce - it works fine for me. I suspect there's probably a bad file request (perhaps the result over overly-aggressive intersection detection, which was slightly modified from the previous version). If either of you @yolapop or @braj008 want to post a problem app somewhere, I'd be interested in taking a look / debugging - otherwise I'd suggest trying the null checks mentioned earlier:
If that works, post back and I'll update the repo. Thanks |
Worked for me 👯 |
cool - I've committed the change as well. will leave issue open for a while in case anyone wants to post an app for debug |
Above mentioned solution is enough to solve the problem. I have been using following solution.
|
I would better suggest this fix: In: DetailLevel in getIntersections function: int startingRow = (int) Math.floor( viewport.top / offsetHeight ); int endingRow = (int) Math.ceil( viewport.bottom / offsetHeight ); int startingColumn = (int) Math.floor( viewport.left / offsetWidth ); int endingColumn = (int) Math.ceil( viewport.right / offsetWidth ); By: int startingRow = (int) Math.floor( viewport.top / offsetHeight ); int endingRow = (int) Math.ceil( viewport.bottom / offsetHeight ) - 1; int startingColumn = (int) Math.floor( viewport.left / offsetWidth ); int endingColumn = (int) Math.ceil( viewport.right / offsetWidth ) - 1; As tailes are from 0 to n |
awesome, big thanks - i'll try this out soon and if it works consistently i'll post a new commit |
@Tristus1er solution worked. Shall I close the issue? |
@braj008 i'll leave it open as a reminder until i test and commit the patch. thanks |
updated in the latest release |
When I load app with setCacheEnabled(..) to true, its crashing at below method
Here, both key and bitmap are null. May be some null check should work.
The text was updated successfully, but these errors were encountered: