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

java.lang.ArithmeticException #601

Closed
Quennel opened this issue Jun 8, 2017 · 8 comments
Closed

java.lang.ArithmeticException #601

Quennel opened this issue Jun 8, 2017 · 8 comments
Labels
Milestone

Comments

@Quennel
Copy link

Quennel commented Jun 8, 2017

更新v1.5.2版本后收集到的crash

crash log:
Fatal Exception: java.lang.ArithmeticException: divide by zero
at com.liulishuo.filedownloader.DownloadSpeedMonitor.end(SourceFile:57)
at com.liulishuo.filedownloader.DownloadTaskHunter.onOver(SourceFile:289)
at com.liulishuo.filedownloader.FileDownloadMessenger.notifyError(SourceFile:170)
at com.liulishuo.filedownloader.FileDownloadList.remove(SourceFile:197)
at com.liulishuo.filedownloader.DownloadTaskHunter.update(SourceFile:189)
at com.liulishuo.filedownloader.DownloadTaskHunter.updateKeepFlow(SourceFile:83)
at com.liulishuo.filedownloader.MessageSnapshotGate.transmitMessage(SourceFile:44)
at com.liulishuo.filedownloader.MessageSnapshotGate.receive(SourceFile:83)
at com.liulishuo.filedownloader.message.MessageSnapshotThreadPool$FlowSingleExecutor$1.run(SourceFile:100)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

@Jacksgong Jacksgong added the bug label Jun 8, 2017
@Jacksgong
Copy link
Collaborator

Jacksgong commented Jun 8, 2017

抱歉这块是1.5.2修复速度计算这块导致的,但是暴露了之前无法暴露的问题,并非新增。

根据代码,这个确实有可能,但是概率应该很低,场景是:

  • 一连接上,立马结束了,前后差别应该是毫秒级 ( 当前的timestamp - connected记录的timestamp = 0 )
  • 如果是有多个相同的任务,那么该相同任务出现这个问题的可能性会增高。

你那边该问题的的crash率是多少,还有没有其他新增问题,如果该问题crash率不高,这个问题会在预计这周末发布的v1.5.3中带上。

@Jacksgong Jacksgong added this to the 1.5.3 milestone Jun 8, 2017
@Quennel
Copy link
Author

Quennel commented Jun 8, 2017

crash率有5%,虽然还是灰度状态,但这个问题占比还是比较高,90%是6.0系统,10%是7.0系统,以samsung手机为主,目前只收集到此问题。

@Jacksgong
Copy link
Collaborator

okay,那我发个小版本修复吧。

@Jacksgong
Copy link
Collaborator

你再跟踪下看看1.5.2还有没有其他问题问题,没有其他问题了,我今晚发一个小版本把这个修复带上。

@Quennel
Copy link
Author

Quennel commented Jun 8, 2017

👌thanks

@Quennel
Copy link
Author

Quennel commented Jun 8, 2017

你好,补充一个空指针异常,只出现一次,可能是偶然事件

crash log:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'void com.liulishuo.filedownloader.c.a.a()' on a null object reference
at com.liulishuo.filedownloader.download.FetchDataTask.sync(SourceFile:193)
at com.liulishuo.filedownloader.download.FetchDataTask.pause(SourceFile:58)
at com.liulishuo.filedownloader.download.DownloadRunnable.pause(SourceFile:58)
at com.liulishuo.filedownloader.download.DownloadRunnable.discard(SourceFile:62)
at com.liulishuo.filedownloader.download.DownloadLaunchRunnable.onError(SourceFile:634)
at com.liulishuo.filedownloader.download.DownloadRunnable.run(SourceFile:120)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

@Jacksgong
Copy link
Collaborator

@Quennel okay👍

@Jacksgong Jacksgong reopened this Jun 8, 2017
@Jacksgong
Copy link
Collaborator

这个问题出现在:

触发暂停的同时,FetchDataTask已经被创建并请求执行,但是还没有来得及被执行。

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

No branches or pull requests

2 participants