Skip to content
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

某些文件断点信息记录异常 #380

Open
javakam opened this issue Mar 20, 2020 · 2 comments
Open

某些文件断点信息记录异常 #380

javakam opened this issue Mar 20, 2020 · 2 comments

Comments

@javakam
Copy link

javakam commented Mar 20, 2020

v1.0.7-SNAPSHOT
出现了和 #79 相似的BUG ,下面这个MP3下载完成大退app后获取到的BreakPointInfo是个空对象,状态为UNKOWN 。一个几M的MP3文件 : https://dl.stream.qqmusic.qq.com/M800001KXr543Qplnl.mp3?guid=120784105&vkey=55603F7F55664D8E38AE77EF9C3048B42FDAA12A08912E93361B24359C5342852B7566CC1E6887B7ADD8845B609CCDFFDE81F813D0A44B8C&uin=0&fromtag=66

  • 问题复现:
    sample中的 QueueControllerinitTasks 加入链接
var url = "https://dl.stream.qqmusic.qq.com/M800001KXr543Qplnl.mp3?guid=120784105&vkey=55603F7F55664D8E38AE77EF9C3048B42FDAA12A08912E93361B24359C5342852B7566CC1E6887B7ADD8845B609CCDFFDE81F813D0A44B8C&uin=0&fromtag=66"
        var boundTask = builder.bind(url)
        TagUtil.saveTaskName(boundTask, "A mp3")

开启串行下载后,同时下载该文件和微信APK:

2020-03-20 23:51:28.047 26854-26854/com.liulishuo.okdownload.sample D/DownloadContext: start true
2020-03-20 23:51:28.049 26854-26854/com.liulishuo.okdownload.sample D/DownloadContext: start finish true 1ms
2020-03-20 23:51:28.049 26854-26926/com.liulishuo.okdownload.sample D/DownloadDispatcher: execute: com.liulishuo.okdownload.DownloadTask@c72cae74@1@https://dl.stream.qqmusic.qq.com/M800001KXr543Qplnl.mp3?guid=120784105&vkey=55603F7F55664D8E38AE77EF9C3048B42FDAA12A08912E93361B24359C5342852B7566CC1E6887B7ADD8845B609CCDFFDE81F813D0A44B8C&uin=0&fromtag=66@/storage/emulated/0/Android/data/com.liulishuo.okdownload.sample/cache/queue/null
2020-03-20 23:51:28.051 26854-26926/com.liulishuo.okdownload.sample D/CallbackDispatcher: taskStart: 1
2020-03-20 23:51:28.072 26854-26854/com.liulishuo.okdownload.sample D/QueueController: bind 0 for https://dl.stream.qqmusic.qq.com/M800001KXr543Qplnl.mp3?guid=120784105&vkey=55603F7F55664D8E38AE77EF9C3048B42FDAA12A08912E93361B24359C5342852B7566CC1E6887B7ADD8845B609CCDFFDE81F813D0A44B8C&uin=0&fromtag=66
2020-03-20 23:51:28.072 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: bind 1 with ViewHolder{ac11486 position=0 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:51:28.073 26854-26926/com.liulishuo.okdownload.sample D/NetworkSecurityConfig: Using Network Security Config from resource network_security_config debugBuild: true
2020-03-20 23:51:28.076 26854-26926/com.liulishuo.okdownload.sample W/download.sampl: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (light greylist, reflection)
2020-03-20 23:51:28.076 26854-26926/com.liulishuo.okdownload.sample W/download.sampl: Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (light greylist, reflection)
2020-03-20 23:51:28.076 26854-26926/com.liulishuo.okdownload.sample W/download.sampl: Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (light greylist, reflection)
2020-03-20 23:51:28.078 26854-26854/com.liulishuo.okdownload.sample D/QueueController: bind 1 for http://dldir1.qq.com/weixin/android/weixin6516android1120.apk
2020-03-20 23:51:28.078 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: bind 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:51:28.081 26854-26926/com.liulishuo.okdownload.sample D/CallbackDispatcher: -----> start trial task(1) {range=[bytes=0-0]}
2020-03-20 23:51:28.084 26854-26854/com.liulishuo.okdownload.sample D/QueueController: bind 2 for https://cdn.llscdn.com/yy/files/tkzpx40x-lls-LLS-5.7-785-20171108-111118.apk
2020-03-20 23:51:28.085 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: bind 3 with ViewHolder{c321d74 position=2 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:51:28.090 26854-26854/com.liulishuo.okdownload.sample D/QueueController: bind 3 for https://t.alipayobjects.com/L1/71/100/and/alipay_wap_main.apk
2020-03-20 23:51:28.090 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: bind 4 with ViewHolder{208129d position=3 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:51:28.096 26854-26854/com.liulishuo.okdownload.sample D/QueueController: bind 4 for https://dldir1.qq.com/qqfile/QQforMac/QQ_V6.2.0.dmg
2020-03-20 23:51:28.096 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: bind 5 with ViewHolder{589f312 position=4 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:51:28.115 26854-26854/com.liulishuo.okdownload.sample D/QueueController: bind 5 for https://zhstatic.zhihu.com/pkg/store/zhihu/futureve-mobile-zhihu-release-5.8.2(596).apk
2020-03-20 23:51:28.116 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: bind 6 with ViewHolder{a9165d4 position=5 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:51:28.147 26854-26926/com.liulishuo.okdownload.sample W/download.sampl: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (light greylist, reflection)
2020-03-20 23:51:28.206 26854-26926/com.liulishuo.okdownload.sample W/download.sampl: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (light greylist, reflection)
2020-03-20 23:51:28.241 26854-26926/com.liulishuo.okdownload.sample D/ConnectTrial: task[1] redirect location: null
2020-03-20 23:51:28.242 26854-26926/com.liulishuo.okdownload.sample D/CallbackDispatcher: <----- finish trial task(1) code[206]{accept-ranges=[bytes], connection=[keep-alive], content-length=[1], content-range=[bytes 0-0/3789900], content-type=[audio/mpeg], date=[Fri, 20 Mar 2020 15:51:28 GMT], etag=["96D2077E98869AE0F4BA0F68EA6F1702"], last-modified=[Thu, 12 Mar 2020 04:45:56 GMT], server=[AliyunOSS], x-oss-hash-crc64ecma=[9588934801473053175], x-oss-object-type=[Normal], x-oss-request-id=[5E74E680A1A55C303596AA0B], x-oss-server-time=[22], x-oss-storage-class=[Standard]}
2020-03-20 23:51:28.242 26854-26926/com.liulishuo.okdownload.sample D/DownloadDispatcher: is file conflict after run: 1
2020-03-20 23:51:28.243 26854-26926/com.liulishuo.okdownload.sample D/DownloadCall: breakpoint invalid: download from beginning because of local check is dirty 1 fileExist[false] infoRight[false] outputStreamSupport[true] com.liulishuo.okdownload.core.download.BreakpointLocalCheck@f7201d2
2020-03-20 23:51:28.244 26854-26926/com.liulishuo.okdownload.sample D/CallbackDispatcher: downloadFromBeginning: 1
2020-03-20 23:51:28.252 26854-26934/com.liulishuo.okdownload.sample D/DownloadChain: create connection on url: https://dl.stream.qqmusic.qq.com/M800001KXr543Qplnl.mp3?guid=120784105&vkey=55603F7F55664D8E38AE77EF9C3048B42FDAA12A08912E93361B24359C5342852B7566CC1E6887B7ADD8845B609CCDFFDE81F813D0A44B8C&uin=0&fromtag=66
2020-03-20 23:51:28.252 26854-26934/com.liulishuo.okdownload.sample D/HeaderInterceptor: AssembleHeaderRange (1) block(0) downloadFrom(0) currentOffset(0)
2020-03-20 23:51:28.252 26854-26934/com.liulishuo.okdownload.sample D/CallbackDispatcher: -----> start connection task(1) block(0) {if-match=["96D2077E98869AE0F4BA0F68EA6F1702"], range=[bytes=0-1894949], user-agent=[OkDownload/1.0.8-SNAPSHOT]}
2020-03-20 23:51:28.253 26854-26935/com.liulishuo.okdownload.sample D/DownloadChain: create connection on url: https://dl.stream.qqmusic.qq.com/M800001KXr543Qplnl.mp3?guid=120784105&vkey=55603F7F55664D8E38AE77EF9C3048B42FDAA12A08912E93361B24359C5342852B7566CC1E6887B7ADD8845B609CCDFFDE81F813D0A44B8C&uin=0&fromtag=66
2020-03-20 23:51:28.254 26854-26935/com.liulishuo.okdownload.sample D/HeaderInterceptor: AssembleHeaderRange (1) block(1) downloadFrom(1894950) currentOffset(0)
2020-03-20 23:51:28.254 26854-26935/com.liulishuo.okdownload.sample D/CallbackDispatcher: -----> start connection task(1) block(1) {if-match=["96D2077E98869AE0F4BA0F68EA6F1702"], range=[bytes=1894950-3789899], user-agent=[OkDownload/1.0.8-SNAPSHOT]}
2020-03-20 23:51:28.265 26854-26934/com.liulishuo.okdownload.sample D/CallbackDispatcher: <----- finish connection task(1) block(0) code[206]{accept-ranges=[bytes], connection=[keep-alive], content-length=[1894950], content-range=[bytes 0-1894949/3789900], content-type=[audio/mpeg], date=[Fri, 20 Mar 2020 15:51:28 GMT], etag=["96D2077E98869AE0F4BA0F68EA6F1702"], last-modified=[Thu, 12 Mar 2020 04:45:56 GMT], server=[AliyunOSS], x-oss-hash-crc64ecma=[9588934801473053175], x-oss-object-type=[Normal], x-oss-request-id=[5E74E680A1A55C3035E0AA0B], x-oss-server-time=[1], x-oss-storage-class=[Standard]}
2020-03-20 23:51:28.266 26854-26934/com.liulishuo.okdownload.sample D/CallbackDispatcher: fetchStart: 1
2020-03-20 23:51:28.270 26854-26934/com.liulishuo.okdownload.sample D/MultiPointOutputStream: Create new file: 1583988347871.mp3
2020-03-20 23:51:28.272 26854-26934/com.liulishuo.okdownload.sample W/DownloadUriOutputStream: fallocate() not supported; falling back to ftruncate()
2020-03-20 23:51:28.282 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream start flush looper task[1] with syncBufferIntervalMills[2000] syncBufferSize[65536]
2020-03-20 23:51:28.285 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 1 with ViewHolder{ac11486 position=0 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:28.289 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (1) block(0)  syncLength(47120) currentOffset(47120)
2020-03-20 23:51:28.397 26854-26935/com.liulishuo.okdownload.sample D/CallbackDispatcher: <----- finish connection task(1) block(1) code[206]{accept-ranges=[bytes], connection=[keep-alive], content-length=[1894950], content-range=[bytes 1894950-3789899/3789900], content-type=[audio/mpeg], date=[Fri, 20 Mar 2020 15:51:28 GMT], etag=["96D2077E98869AE0F4BA0F68EA6F1702"], last-modified=[Thu, 12 Mar 2020 04:45:56 GMT], server=[AliyunOSS], x-oss-hash-crc64ecma=[9588934801473053175], x-oss-object-type=[Normal], x-oss-request-id=[5E74E680ECD3FD393281C759], x-oss-server-time=[20], x-oss-storage-class=[Standard]}
2020-03-20 23:51:28.397 26854-26935/com.liulishuo.okdownload.sample D/CallbackDispatcher: fetchStart: 1
2020-03-20 23:51:28.398 26854-26935/com.liulishuo.okdownload.sample D/MultiPointOutputStream: Create output stream write from (1) block(1) 1894950
2020-03-20 23:51:28.476 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 1 with ViewHolder{ac11486 position=0 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:28.681 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 1 with ViewHolder{ac11486 position=0 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:28.681 26854-26934/com.liulishuo.okdownload.sample D/MultiPointOutputStream: task[1] current need fetching block count 2 is not equal to no more stream block count 1
2020-03-20 23:51:28.681 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: task[1] current need fetching block count 2 is not equal to no more stream block count 1
2020-03-20 23:51:28.682 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: runSync state change isNoMoreStream[false] newNoMoreStreamBlockList[[0]]
2020-03-20 23:51:28.695 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 1 with ViewHolder{ac11486 position=0 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:28.715 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (1) block(0)  syncLength(1847830) currentOffset(1894950)
2020-03-20 23:51:28.715 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (1) block(1)  syncLength(156313) currentOffset(156313)
2020-03-20 23:51:28.716 26854-26934/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream close task[1] block[0]
2020-03-20 23:51:28.716 26854-26934/com.liulishuo.okdownload.sample D/CallbackDispatcher: fetchEnd: 1
2020-03-20 23:51:28.718 26854-26937/com.liulishuo.okdownload.sample D/DownloadChain: release connection com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection@916c5f7 task[1] block[0]
2020-03-20 23:51:28.884 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 1 with ViewHolder{ac11486 position=0 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:29.091 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 1 with ViewHolder{ac11486 position=0 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:29.294 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 1 with ViewHolder{ac11486 position=0 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:29.517 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 1 with ViewHolder{ac11486 position=0 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:29.557 26854-26903/com.liulishuo.okdownload.sample D/RemitSyncExecutor: sync info with id: 1
2020-03-20 23:51:29.743 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 1 with ViewHolder{ac11486 position=0 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:29.922 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 1 with ViewHolder{ac11486 position=0 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:29.923 26854-26935/com.liulishuo.okdownload.sample D/MultiPointOutputStream: task[1] current need fetching block count 2 is equal to no more stream block count 2
2020-03-20 23:51:29.923 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: task[1] current need fetching block count 2 is equal to no more stream block count 2
2020-03-20 23:51:29.923 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: runSync state change isNoMoreStream[true] newNoMoreStreamBlockList[[1]]
2020-03-20 23:51:29.949 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (1) block(1)  syncLength(1738637) currentOffset(1894950)
2020-03-20 23:51:29.949 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream stop flush looper task[1]
2020-03-20 23:51:29.950 26854-26935/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream close task[1] block[1]
2020-03-20 23:51:29.950 26854-26935/com.liulishuo.okdownload.sample D/CallbackDispatcher: fetchEnd: 1
2020-03-20 23:51:29.950 26854-26937/com.liulishuo.okdownload.sample D/DownloadChain: release connection com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection@30dbc64 task[1] block[1]
2020-03-20 23:51:29.952 26854-26903/com.liulishuo.okdownload.sample D/RemitSyncExecutor: remove info 1
2020-03-20 23:51:29.952 26854-26926/com.liulishuo.okdownload.sample D/DownloadCall: call is finished 1
2020-03-20 23:51:29.952 26854-26926/com.liulishuo.okdownload.sample D/DownloadDispatcher: execute: com.liulishuo.okdownload.DownloadTask@434b6342@2@http://dldir1.qq.com/weixin/android/weixin6516android1120.apk@/storage/emulated/0/Android/data/com.liulishuo.okdownload.sample/cache/queue/null
2020-03-20 23:51:29.952 26854-26926/com.liulishuo.okdownload.sample D/CallbackDispatcher: taskStart: 2
2020-03-20 23:51:29.954 26854-26926/com.liulishuo.okdownload.sample D/CallbackDispatcher: -----> start trial task(2) {range=[bytes=0-0]}
2020-03-20 23:51:29.957 26854-26854/com.liulishuo.okdownload.sample W/QueueListener: https://dl.stream.qqmusic.qq.com/M800001KXr543Qplnl.mp3?guid=120784105&vkey=55603F7F55664D8E38AE77EF9C3048B42FDAA12A08912E93361B24359C5342852B7566CC1E6887B7ADD8845B609CCDFFDE81F813D0A44B8C&uin=0&fromtag=66 end with: COMPLETED
2020-03-20 23:51:30.027 26854-26926/com.liulishuo.okdownload.sample D/ConnectTrial: task[2] redirect location: null
2020-03-20 23:51:30.028 26854-26926/com.liulishuo.okdownload.sample D/CallbackDispatcher: <----- finish trial task(2) code[206]{cache-control=[max-age=600], connection=[keep-alive], content-length=[1], content-range=[bytes 0-0/47275936], content-type=[application/octet-stream], date=[Wed, 17 Apr 2019 11:20:22 GMT], expires=[Wed, 17 Apr 2019 11:30:22 GMT], last-modified=[Fri, 29 Sep 2017 09:58:01 GMT], server=[nws_4.2.1_midcache], x-cache-lookup=[Cache Hit], x-nws-log-uuid=[5645098542928529618], x-nws-uuid-verify=[71df83ae97765ae143092345217bc98c]}
2020-03-20 23:51:30.030 26854-26926/com.liulishuo.okdownload.sample D/DownloadDispatcher: is file conflict after run: 2
2020-03-20 23:51:30.030 26854-26926/com.liulishuo.okdownload.sample D/DownloadCall: breakpoint invalid: download from beginning because of local check is dirty 2 fileExist[false] infoRight[false] outputStreamSupport[true] com.liulishuo.okdownload.core.download.BreakpointLocalCheck@597decd
2020-03-20 23:51:30.030 26854-26926/com.liulishuo.okdownload.sample D/CallbackDispatcher: downloadFromBeginning: 2
2020-03-20 23:51:30.032 26854-26934/com.liulishuo.okdownload.sample D/DownloadChain: create connection on url: http://dldir1.qq.com/weixin/android/weixin6516android1120.apk
2020-03-20 23:51:30.032 26854-26935/com.liulishuo.okdownload.sample D/DownloadChain: create connection on url: http://dldir1.qq.com/weixin/android/weixin6516android1120.apk
2020-03-20 23:51:30.033 26854-26939/com.liulishuo.okdownload.sample D/DownloadChain: create connection on url: http://dldir1.qq.com/weixin/android/weixin6516android1120.apk
2020-03-20 23:51:30.033 26854-26934/com.liulishuo.okdownload.sample D/HeaderInterceptor: AssembleHeaderRange (2) block(1) downloadFrom(15758646) currentOffset(0)
2020-03-20 23:51:30.033 26854-26935/com.liulishuo.okdownload.sample D/HeaderInterceptor: AssembleHeaderRange (2) block(0) downloadFrom(0) currentOffset(0)
2020-03-20 23:51:30.033 26854-26935/com.liulishuo.okdownload.sample D/CallbackDispatcher: -----> start connection task(2) block(0) {range=[bytes=0-15758645], user-agent=[OkDownload/1.0.8-SNAPSHOT]}
2020-03-20 23:51:30.033 26854-26934/com.liulishuo.okdownload.sample D/CallbackDispatcher: -----> start connection task(2) block(1) {range=[bytes=15758646-31517290], user-agent=[OkDownload/1.0.8-SNAPSHOT]}
2020-03-20 23:51:30.035 26854-26939/com.liulishuo.okdownload.sample D/HeaderInterceptor: AssembleHeaderRange (2) block(2) downloadFrom(31517291) currentOffset(0)
2020-03-20 23:51:30.036 26854-26939/com.liulishuo.okdownload.sample D/CallbackDispatcher: -----> start connection task(2) block(2) {range=[bytes=31517291-47275935], user-agent=[OkDownload/1.0.8-SNAPSHOT]}
2020-03-20 23:51:30.044 26854-26934/com.liulishuo.okdownload.sample D/CallbackDispatcher: <----- finish connection task(2) block(1) code[206]{cache-control=[max-age=600], connection=[keep-alive], content-length=[15758645], content-range=[bytes 15758646-31517290/47275936], content-type=[application/octet-stream], date=[Wed, 17 Apr 2019 11:20:22 GMT], expires=[Wed, 17 Apr 2019 11:30:22 GMT], last-modified=[Fri, 29 Sep 2017 09:58:01 GMT], server=[nws_4.2.1_midcache], x-cache-lookup=[Cache Hit], x-nws-log-uuid=[6620908773968909918], x-nws-uuid-verify=[496feb06b32a098b609d098add9e255f]}
2020-03-20 23:51:30.044 26854-26934/com.liulishuo.okdownload.sample D/CallbackDispatcher: fetchStart: 2
2020-03-20 23:51:30.054 26854-26934/com.liulishuo.okdownload.sample D/MultiPointOutputStream: Create new file: weixin6516android1120.apk
2020-03-20 23:51:30.054 26854-26934/com.liulishuo.okdownload.sample D/MultiPointOutputStream: Create output stream write from (2) block(1) 15758646
2020-03-20 23:51:30.055 26854-26934/com.liulishuo.okdownload.sample W/DownloadUriOutputStream: fallocate() not supported; falling back to ftruncate()
2020-03-20 23:51:30.056 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream start flush looper task[2] with syncBufferIntervalMills[2000] syncBufferSize[65536]
2020-03-20 23:51:30.060 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(1)  syncLength(4096) currentOffset(4096)
2020-03-20 23:51:30.064 26854-26935/com.liulishuo.okdownload.sample D/CallbackDispatcher: <----- finish connection task(2) block(0) code[206]{cache-control=[max-age=600], connection=[keep-alive], content-length=[15758646], content-range=[bytes 0-15758645/47275936], content-type=[application/octet-stream], date=[Wed, 17 Apr 2019 11:20:22 GMT], expires=[Wed, 17 Apr 2019 11:30:22 GMT], last-modified=[Fri, 29 Sep 2017 09:58:01 GMT], server=[nws_4.2.1_midcache], x-cache-lookup=[Cache Hit], x-nws-log-uuid=[5931255126090181162], x-nws-uuid-verify=[827f6a8431f88b694eb366b7a5dc66e3]}
2020-03-20 23:51:30.065 26854-26935/com.liulishuo.okdownload.sample D/CallbackDispatcher: fetchStart: 2
2020-03-20 23:51:30.067 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:30.072 26854-26939/com.liulishuo.okdownload.sample D/CallbackDispatcher: <----- finish connection task(2) block(2) code[206]{cache-control=[max-age=600], connection=[keep-alive], content-length=[15758645], content-range=[bytes 31517291-47275935/47275936], content-type=[application/octet-stream], date=[Wed, 17 Apr 2019 11:20:22 GMT], expires=[Wed, 17 Apr 2019 11:30:22 GMT], last-modified=[Fri, 29 Sep 2017 09:58:01 GMT], server=[nws_4.2.1_midcache], x-cache-lookup=[Cache Hit], x-nws-log-uuid=[11814531359536795638], x-nws-uuid-verify=[496feb06b32a098b609d098add9e255f]}
2020-03-20 23:51:30.072 26854-26939/com.liulishuo.okdownload.sample D/CallbackDispatcher: fetchStart: 2
2020-03-20 23:51:30.114 26854-26939/com.liulishuo.okdownload.sample D/MultiPointOutputStream: Create output stream write from (2) block(2) 31517291
2020-03-20 23:51:30.260 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:30.468 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:31.077 26854-26854/com.liulishuo.okdownload.sample I/chatty: uid=10235(com.liulishuo.okdownload.sample) identical 3 lines
2020-03-20 23:51:31.281 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:31.456 26854-26903/com.liulishuo.okdownload.sample D/RemitSyncExecutor: sync info with id: 2
2020-03-20 23:51:31.490 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:31.694 26854-26854/com.liulishuo.okdownload.sample I/chatty: uid=10235(com.liulishuo.okdownload.sample) identical 1 line
2020-03-20 23:51:31.895 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:32.061 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: task[2] current need fetching block count 3 is not equal to no more stream block count 0
2020-03-20 23:51:32.095 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:32.106 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(0)  syncLength(551208) currentOffset(551208)
2020-03-20 23:51:32.107 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(1)  syncLength(1599548) currentOffset(1603644)
2020-03-20 23:51:32.108 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(2)  syncLength(708288) currentOffset(708288)
2020-03-20 23:51:32.303 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:33.743 26854-26854/com.liulishuo.okdownload.sample I/chatty: uid=10235(com.liulishuo.okdownload.sample) identical 7 lines
2020-03-20 23:51:33.962 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:34.109 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: task[2] current need fetching block count 3 is not equal to no more stream block count 0
2020-03-20 23:51:34.149 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(0)  syncLength(544068) currentOffset(1095276)
2020-03-20 23:51:34.149 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(1)  syncLength(1545096) currentOffset(3148740)
2020-03-20 23:51:34.150 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(2)  syncLength(396984) currentOffset(1105272)
2020-03-20 23:51:34.164 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:34.982 26854-26854/com.liulishuo.okdownload.sample I/chatty: uid=10235(com.liulishuo.okdownload.sample) identical 4 lines
2020-03-20 23:51:35.186 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:35.400 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:35.819 26854-26854/com.liulishuo.okdownload.sample I/chatty: uid=10235(com.liulishuo.okdownload.sample) identical 2 lines
2020-03-20 23:51:36.018 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:36.151 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: task[2] current need fetching block count 3 is not equal to no more stream block count 0
2020-03-20 23:51:36.191 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(0)  syncLength(565488) currentOffset(1660764)
2020-03-20 23:51:36.191 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(1)  syncLength(1489404) currentOffset(4638144)
2020-03-20 23:51:36.192 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(2)  syncLength(471240) currentOffset(1576512)
2020-03-20 23:51:36.225 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:36.425 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: progress 2 with ViewHolder{e1ac147 position=1 id=-1, oldPos=-1, pLpos:-1}
2020-03-20 23:51:36.582 26854-26854/com.liulishuo.okdownload.sample D/DownloadDispatcher: start cancel bunch task manually: 11
2020-03-20 23:51:36.583 26854-26854/com.liulishuo.okdownload.sample D/DownloadDispatcher: handle cancel calls, cancel calls: 1
2020-03-20 23:51:36.583 26854-26854/com.liulishuo.okdownload.sample D/DownloadDispatcher: flying canceled: 2
2020-03-20 23:51:36.584 26854-26854/com.liulishuo.okdownload.sample D/DownloadCall: cancel task 2 consume: 0ms
2020-03-20 23:51:36.584 26854-26854/com.liulishuo.okdownload.sample D/DownloadDispatcher: handle cancel calls, callback cancel event: 1
2020-03-20 23:51:36.584 26854-26854/com.liulishuo.okdownload.sample D/DownloadDispatcher: finish cancel bunch task manually: 11 consume 2ms
2020-03-20 23:51:36.584 26854-26854/com.liulishuo.okdownload.sample W/QueueListener: http://dldir1.qq.com/weixin/android/weixin6516android1120.apk end with: CANCELED
2020-03-20 23:51:36.585 26854-26941/com.liulishuo.okdownload.sample D/FileLock: increaseLock increase lock-count to 1/storage/emulated/0/Android/data/com.liulishuo.okdownload.sample/cache/queue/weixin6516android1120.apk
2020-03-20 23:51:36.585 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: task[2] current need fetching block count 3 is equal to no more stream block count 3
2020-03-20 23:51:36.585 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: runSync state change isNoMoreStream[true] newNoMoreStreamBlockList[[0, 1, 2]]
2020-03-20 23:51:36.596 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(0)  syncLength(185640) currentOffset(1846404)
2020-03-20 23:51:36.597 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(1)  syncLength(179928) currentOffset(4818072)
2020-03-20 23:51:36.598 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream sync success (2) block(2)  syncLength(98532) currentOffset(1675044)
2020-03-20 23:51:36.598 26854-26936/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream stop flush looper task[2]
2020-03-20 23:51:36.598 26854-26941/com.liulishuo.okdownload.sample D/FileLock: decreaseLock decrease lock-count to 0 /storage/emulated/0/Android/data/com.liulishuo.okdownload.sample/cache/queue/weixin6516android1120.apk
2020-03-20 23:51:36.598 26854-26941/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream close task[2] block[0]
2020-03-20 23:51:36.601 26854-26941/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream close task[2] block[1]
2020-03-20 23:51:36.601 26854-26941/com.liulishuo.okdownload.sample D/MultiPointOutputStream: OutputStream close task[2] block[2]
2020-03-20 23:51:36.602 26854-26903/com.liulishuo.okdownload.sample D/RemitSyncExecutor: remove free bunch id 2
2020-03-20 23:51:36.606 26854-26926/com.liulishuo.okdownload.sample D/DownloadCall: call is finished 2
2020-03-20 23:51:36.617 26854-26854/com.liulishuo.okdownload.sample D/QueueController: bind 0 for https://dl.stream.qqmusic.qq.com/M800001KXr543Qplnl.mp3?guid=120784105&vkey=55603F7F55664D8E38AE77EF9C3048B42FDAA12A08912E93361B24359C5342852B7566CC1E6887B7ADD8845B609CCDFFDE81F813D0A44B8C&uin=0&fromtag=66
2020-03-20 23:51:36.617 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: bind 1 with ViewHolder{e1ac147 position=0 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:51:36.621 26854-26854/com.liulishuo.okdownload.sample D/QueueController: bind 1 for http://dldir1.qq.com/weixin/android/weixin6516android1120.apk
2020-03-20 23:51:36.621 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: bind 2 with ViewHolder{c321d74 position=1 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:51:36.625 26854-26854/com.liulishuo.okdownload.sample D/QueueController: bind 2 for https://cdn.llscdn.com/yy/files/tkzpx40x-lls-LLS-5.7-785-20171108-111118.apk
2020-03-20 23:51:36.625 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: bind 3 with ViewHolder{208129d position=2 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:51:36.628 26854-26854/com.liulishuo.okdownload.sample D/QueueController: bind 3 for https://t.alipayobjects.com/L1/71/100/and/alipay_wap_main.apk
2020-03-20 23:51:36.629 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: bind 4 with ViewHolder{589f312 position=3 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:51:36.632 26854-26854/com.liulishuo.okdownload.sample D/QueueController: bind 4 for https://dldir1.qq.com/qqfile/QQforMac/QQ_V6.2.0.dmg
2020-03-20 23:51:36.632 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: bind 5 with ViewHolder{a9165d4 position=4 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:51:36.645 26854-26854/com.liulishuo.okdownload.sample D/QueueController: bind 5 for https://zhstatic.zhihu.com/pkg/store/zhihu/futureve-mobile-zhihu-release-5.8.2(596).apk
2020-03-20 23:51:36.645 26854-26854/com.liulishuo.okdownload.sample I/QueueListener: bind 6 with ViewHolder{55100da position=5 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:51:36.704 26854-26937/com.liulishuo.okdownload.sample D/DownloadChain: release connection com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection@a8c93e8 task[2] block[1]
2020-03-20 23:51:36.706 26854-26942/com.liulishuo.okdownload.sample D/DownloadChain: release connection com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection@5bda01 task[2] block[0]
2020-03-20 23:51:36.707 26854-26944/com.liulishuo.okdownload.sample D/DownloadChain: release connection com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection@14e50a6 task[2] block[2]

退出QueueActivity 后重新进来,通过 TagUtil.getStatus(task) 获取临时的status是没问题的,大退重新进入后页面的LOG:

2020-03-20 23:54:09.021 27050-27050/com.liulishuo.okdownload.sample I/Timeline: Timeline: Activity_launch_request time:762475638
2020-03-20 23:54:09.048 27050-27050/com.liulishuo.okdownload.sample W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@edc3bbf
2020-03-20 23:54:09.055 27050-27077/com.liulishuo.okdownload.sample D/ViewContentFactory: initViewContentFetcherClass
2020-03-20 23:54:09.055 27050-27077/com.liulishuo.okdownload.sample I/ContentCatcher: ViewContentFetcher : ViewContentFetcher
2020-03-20 23:54:09.055 27050-27077/com.liulishuo.okdownload.sample D/ViewContentFactory: createInterceptor took 0ms
2020-03-20 23:54:09.123 27050-27050/com.liulishuo.okdownload.sample D/Util: Get final download store is com.liulishuo.okdownload.core.breakpoint.RemitStoreOnSQLite@779b2ee
2020-03-20 23:54:09.123 27050-27050/com.liulishuo.okdownload.sample D/OkDownload: downloadStore[com.liulishuo.okdownload.core.breakpoint.BreakpointStoreOnSQLite@569e38f] connectionFactory[com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection$Factory@105a61c
2020-03-20 23:54:09.221 27050-27050/com.liulishuo.okdownload.sample D/QueueController: bind 0 for https://dl.stream.qqmusic.qq.com/M800001KXr543Qplnl.mp3?guid=120784105&vkey=55603F7F55664D8E38AE77EF9C3048B42FDAA12A08912E93361B24359C5342852B7566CC1E6887B7ADD8845B609CCDFFDE81F813D0A44B8C&uin=0&fromtag=66
2020-03-20 23:54:09.221 27050-27050/com.liulishuo.okdownload.sample I/QueueListener: bind 1 with ViewHolder{f7f96b position=0 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:54:09.221 27050-27050/com.liulishuo.okdownload.sample D/DownloadDispatcher: isPending: 1
2020-03-20 23:54:09.221 27050-27050/com.liulishuo.okdownload.sample D/DownloadDispatcher: isRunning: 1
2020-03-20 23:54:09.239 27050-27050/com.liulishuo.okdownload.sample D/QueueController: bind 1 for http://dldir1.qq.com/weixin/android/weixin6516android1120.apk
2020-03-20 23:54:09.239 27050-27050/com.liulishuo.okdownload.sample I/QueueListener: bind 2 with ViewHolder{ac11486 position=1 id=-1, oldPos=-1, pLpos:-1 no parent}
2020-03-20 23:54:09.239 27050-27050/com.liulishuo.okdownload.sample D/DownloadDispatcher: isPending: 2
2020-03-20 23:54:09.239 27050-27050/com.liulishuo.okdownload.sample D/DownloadDispatcher: isRunning: 2

然鹅,微信apk断点信息正常,mp3 的信息没有获取到,debug得到BreakPointInfo对象是空

@javakam
Copy link
Author

javakam commented Mar 21, 2020

#39 类似的情况

@javakam
Copy link
Author

javakam commented Mar 21, 2020

暂时解决了这个问题,不确定是否会出现其他的问题 ,解决方法:

com.liulishuo.okdownload.sample.util.queue.QueueListener 中: 
 override fun taskEnd(
         task: DownloadTask,
         cause: EndCause,
         realCause: Exception?,
         model: Listener1Assist.Listener1Model
 ) {
     val status = cause.toString()
     TagUtil.saveStatus(task, status)
     //OkDownload.with().breakpointStore().createAndInsert(task)
     //手动更新断点信息到数据库
     **task.info?.let { OkDownload.with().breakpointStore().update(it) }**
......

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant