-
Notifications
You must be signed in to change notification settings - Fork 551
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
本地txt打开会出现OutOfMemoryError #26
Comments
阅读界面 OOM 崩溃的原因是这样的:
结论就是 onSizeChanged() 是异步执行,转换成同步回调的。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
操作步骤,清理后台,打开IReader,载入一个本地txt文件,从书架打开,返回书架,再点击任意一个txt都会黑屏
后台报错信息:
01-06 22:47:20.552 2040-2059/com.example.newbiechen.ireader I/art: WaitForGcToComplete blocked for 5.419s for cause Background
01-06 22:47:20.552 2040-2040/com.example.newbiechen.ireader I/art: Waiting for a blocking GC Alloc
01-06 22:47:20.552 2040-2132/com.example.newbiechen.ireader I/art: Waiting for a blocking GC Alloc
01-06 22:47:20.577 2040-2040/com.example.newbiechen.ireader I/art: WaitForGcToComplete blocked for 875.902ms for cause Alloc
01-06 22:47:20.577 2040-2040/com.example.newbiechen.ireader I/art: Starting a blocking GC Alloc
01-06 22:47:20.578 2040-2132/com.example.newbiechen.ireader I/art: WaitForGcToComplete blocked for 328.382ms for cause Alloc
01-06 22:47:20.578 2040-2132/com.example.newbiechen.ireader I/art: Starting a blocking GC Alloc
01-06 22:47:20.578 2040-2040/com.example.newbiechen.ireader W/System.err: java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.
01-06 22:47:20.578 2040-2040/com.example.newbiechen.ireader W/System.err: at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:111)
01-06 22:47:20.578 2040-2040/com.example.newbiechen.ireader W/System.err: at android.os.Handler.handleCallback(Handler.java:751)
01-06 22:47:20.578 2040-2040/com.example.newbiechen.ireader W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
01-06 22:47:20.578 2040-2040/com.example.newbiechen.ireader W/System.err: at android.os.Looper.loop(Looper.java:159)
01-06 22:47:20.578 2040-2040/com.example.newbiechen.ireader W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6363)
01-06 22:47:20.578 2040-2040/com.example.newbiechen.ireader W/System.err: at java.lang.reflect.Method.invoke(Native Method)
01-06 22:47:20.578 2040-2040/com.example.newbiechen.ireader W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1096)
01-06 22:47:20.578 2040-2040/com.example.newbiechen.ireader W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:883)
01-06 22:47:20.578 2040-2040/com.example.newbiechen.ireader W/System.err: Caused by: java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack trace available
01-06 22:47:20.578 2040-2040/com.example.newbiechen.ireader E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.newbiechen.ireader, PID: 2040
java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:111)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:159)
at android.app.ActivityThread.main(ActivityThread.java:6363)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1096)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:883)
Caused by: java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack trace available
01-06 22:47:20.590 2040-2040/com.example.newbiechen.ireader I/Process: killProcess pid=2040
java.lang.RuntimeException
at android.os.Process.killProcess(Process.java:1258)
at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:111)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063)
at io.reactivex.plugins.RxJavaPlugins.uncaught(RxJavaPlugins.java:288)
at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:282)
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:113)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:159)
at android.app.ActivityThread.main(ActivityThread.java:6363)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1096)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:883)
01-06 22:47:20.590 2040-2040/com.example.newbiechen.ireader I/Process: Sending signal. PID: 2040 SIG: 9
The text was updated successfully, but these errors were encountered: