You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.NullPointerException: Attempt to invoke virtual method 'long com.liulishuo.okdownload.core.breakpoint.BlockInfo.d()' on a null object reference
at com.liulishuo.okdownload.core.breakpoint.BreakpointInfo.g(BreakpointInfo.java:143)
at com.liulishuo.okdownload.core.listener.assist.Listener1Assist$Listener1Model.onInfoValid(Listener1Assist.java:151)
at com.liulishuo.okdownload.core.listener.assist.Listener1Assist.a(Listener1Assist.java:62)
at com.liulishuo.okdownload.core.listener.DownloadListener1.downloadFromBeginning(DownloadListener1.java:77)
at com.liulishuo.okdownload.core.listener.DownloadListenerBunch.downloadFromBeginning(DownloadListenerBunch.java:66)
at com.liulishuo.okdownload.core.dispatcher.CallbackDispatcher$DefaultTransmitListener$4.run(CallbackDispatcher.java:248)
at android.os.Handler.handleCallback(Handler.java:836)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:232)
at android.app.ActivityThread.main(ActivityThread.java:6802)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1103)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
The text was updated successfully, but these errors were encountered:
OkDownload Version
v1.0.3
Problem Describe
空指针异常应该是在多线程的情况下产生的,但目前不知道怎么修改。
不明白BlockInfo.getTotalLength 中为啥要做clone,直接遍历去长度不就可以了 。
Log
java.lang.NullPointerException: Attempt to invoke virtual method 'long com.liulishuo.okdownload.core.breakpoint.BlockInfo.d()' on a null object reference
at com.liulishuo.okdownload.core.breakpoint.BreakpointInfo.g(BreakpointInfo.java:143)
at com.liulishuo.okdownload.core.listener.assist.Listener1Assist$Listener1Model.onInfoValid(Listener1Assist.java:151)
at com.liulishuo.okdownload.core.listener.assist.Listener1Assist.a(Listener1Assist.java:62)
at com.liulishuo.okdownload.core.listener.DownloadListener1.downloadFromBeginning(DownloadListener1.java:77)
at com.liulishuo.okdownload.core.listener.DownloadListenerBunch.downloadFromBeginning(DownloadListenerBunch.java:66)
at com.liulishuo.okdownload.core.dispatcher.CallbackDispatcher$DefaultTransmitListener$4.run(CallbackDispatcher.java:248)
at android.os.Handler.handleCallback(Handler.java:836)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:232)
at android.app.ActivityThread.main(ActivityThread.java:6802)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1103)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
The text was updated successfully, but these errors were encountered: