lingochamp / FileDownloader

Multitask、MultiThread(MultiConnection)、Breakpoint-resume、High-concurrency、Simple to use、Single/NotSingle-process
Apache License 2.0
11.04k stars 2.2k forks source link

NullPointerException #1288

Open jijiangrui opened 5 years ago

jijiangrui commented 5 years ago
java.lang.NullPointerException: Attempt to invoke interface method 'com.liulishuo.filedownloader.BaseDownloadTask com.liulishuo.filedownloader.BaseDownloadTask$IRunningTask.getOrigin()' on a null object reference
    at com.liulishuo.filedownloader.FileDownloadMessenger.notifyError(FileDownloadMessenger.java:169)
    at com.liulishuo.filedownloader.FileDownloadMessenger.handoverMessage(FileDownloadMessenger.java:276)
    at com.liulishuo.filedownloader.FileDownloadMessageStation.requestEnqueue(FileDownloadMessageStation.java:62)
    at com.liulishuo.filedownloader.FileDownloadMessageStation.requestEnqueue(FileDownloadMessageStation.java:55)
    at com.liulishuo.filedownloader.FileDownloadMessenger.process(FileDownloadMessenger.java:224)
    at com.liulishuo.filedownloader.FileDownloadMessenger.notifyBlockComplete(FileDownloadMessenger.java:137)
    at com.liulishuo.filedownloader.FileDownloadList.remove(FileDownloadList.java:209)
    at com.liulishuo.filedownloader.DownloadTaskHunter.update(DownloadTaskHunter.java:208)
    at com.liulishuo.filedownloader.DownloadTaskHunter.updateKeepFlow(DownloadTaskHunter.java:85)
    at com.liulishuo.filedownloader.MessageSnapshotGate.transmitMessage(MessageSnapshotGate.java:48)
    at com.liulishuo.filedownloader.MessageSnapshotGate.receive(MessageSnapshotGate.java:96)
    at com.liulishuo.filedownloader.message.MessageSnapshotThreadPool$FlowSingleExecutor$1.run(MessageSnapshotThreadPool.java:100)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at `java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)`
jijiangrui commented 5 years ago

1.7.7版本

rantianhua commented 5 years ago

确定是 1.7.7 版本吗?这个版本今天凌晨才发布。

jijiangrui commented 5 years ago

是的,你看下代码,后面判了空,前面在log里直接使用了,所以空指针了

rantianhua commented 5 years ago

你有什么复现的路径吗?或者一份完整的日志?