gedoor / MyBookshelf

阅读是一款可以自定义来源阅读网络内容的工具,为广大网络文学爱好者提供一种方便、快捷舒适的试读体验。
https://gedoor.github.io
GNU General Public License v3.0
7.57k stars 1.81k forks source link

搜索页面OutOfMemoryError 问题 #516

Open huhd opened 4 years ago

huhd commented 4 years ago

sony dpt-rp1装2.0版本,在搜索书籍时候,屏幕显示空白(另外一个问题是软键盘只能输入英文)。logcat后看到outofmemory error。查到说解决方案是在manifest里加上: android:hardwareAccelerated="false" android:largeHeap="true"

E/art (23558): Throwing OutOfMemoryError "Failed to allocate a 13483212 byte allocation with 6984396 free bytes and 6MB until OOM" E/GlideExecutor(23558): Request threw uncaught throwable E/GlideExecutor(23558): java.lang.OutOfMemoryError: Failed to allocate a 13483212 byte allocation with 6984396 free bytes and 6MB until OOM E/GlideExecutor(23558): at dalvik.system.VMRuntime.newNonMovableArray(Native Method) E/GlideExecutor(23558): at android.graphics.Bitmap.nativeCopy(Native Method) E/GlideExecutor(23558): at android.graphics.Bitmap.copy(Bitmap.java:557) E/GlideExecutor(23558): at com.kunfei.bookshelf.help.BlurTransformation.transform(BlurTransformation.java:32) E/GlideExecutor(23558): at com.bumptech.glide.load.resource.bitmap.BitmapTransformation.transform(BitmapTransformation.java:85)

ximencx commented 4 years ago

本质由于释放不及时导致