lingochamp / FileDownloader

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

文件下载到本地了,但是没有走completed 为什么 #883

Open xie438305665 opened 6 years ago

xie438305665 commented 6 years ago

Before Issue

  1. Please search on the Issues
  2. Please search on the wiki
  3. Please set FileDownloadLog.NEED_LOG=true and review the Logcat output from main process and :filedownloader process ( pay attention to Warn and Error level logcat)

Issue

  1. What problem do you get?
  2. Which version of FileDownloader are you using when you produce such problem?
  3. How to reproduce such problem?
  4. Do you set FileDownloadLog.NEED_LOG=true?
  5. Could you please reproduce this problem and provide all main process and :filedownloader process logcat
  6. Can you fix it by yourself and request PR, if not, what's problem do you get when you try to fix it

P.S. If you don't know how to get :filedownloader process, it's recommended to using pidcat to just filter all your application logcat, or define process.non-separate=true on filedownloader.properties


请在Issue前认真的跟进上面提到的建议,这样将可以极大的加快你遇到问题的处理。

Jacksgong commented 6 years ago

那走的是哪里?有具体日志吗?

xie438305665 commented 6 years ago

@Jacksgong image 跟这个情况是一样的

xie438305665 commented 6 years ago

@Jacksgong 我一共下载多个视频 比如我视频下载114个 其中有个别的或者几个 没走complete 方法 ,error,其他方法也不进, 其余的剩下的 都是正常的流程 , 因为我是根据下载完成统计数据的 ,这样会导致我数据错乱, 并行,串行 版本1.6.8 1.6.9 都试过 都存在这样的问题

xie438305665 commented 6 years ago

@Jacksgong 第一次下载 中间不暂停,绝对出现有不走complete方法,其他方法也不走的情况, image 每当下载数量 多的情况下就会出现这种情况,下载数量少,就会正常执行方法
当我暂停,在继续下载 我的下载数量秒完成, 希望大佬看看,有什么问题可以继续交流

rantianhua commented 6 years ago

请问有没有走 warn ,也就是说,你的 114 个视频下载链接都是完全不同的吗?假如其中一些视频链接是一样的,那么除了第一个,其他的都会走 warn ,不会为重复的任务开启下载活动,所以如果你按照下载的数量统计进度,那么在 warn 回调里,你也应该将进度 + 1

1525685999 commented 6 years ago

好像是 并没有下载完,但是文件夹里却出现了xxxx.xx.tmp的文件,这个文件大小 却是和需要下载的总文件大小是一样的,我看了Progress还在不断的回调,但是文件夹里面却已经有一个和需要下载文件一样大小的tmp结尾的文件

rantianhua commented 6 years ago

@xie438305665 希望提供 FileDownloader 的日志,只需要在任务开始前加一句 FileDownloadLog.NEED_LOG = true 即可。你图片里提供的是你自己的日志,但是这样看不出 FileDownloader 内部发生了什么。