lingochamp / lingochamp/FileDownloader

DownloadEventPoolImpl里面有数组越界的奔溃

Open
#1,354 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
11.1k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

崩溃线程
FileDownloader-EventPool1

1Caused by: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
2at java.util.LinkedList.toArray(LinkedList.java:1053)
3at com.liulishuo.filedownloader.event.DownloadEventPoolImpl.trigger(DownloadEventPoolImpl.java:127)
4at com.liulishuo.filedownloader.event.DownloadEventPoolImpl.publish(DownloadEventPoolImpl.java:105)
5at com.liulishuo.filedownloader.event.DownloadEventPoolImpl$1.run(DownloadEventPoolImpl.java:119)
6at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
7at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
8at java.lang.Thread.run(Thread.java:764)

DownloadEventPoolImpl里面有数组越界的奔溃,能帮忙尽快处理下吗

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with DownloadEventPoolImpl.java at trigger line 127 and trace how publish and its worker at lines 105 and 119 reach the LinkedList.toArray call shown in the stack trace. Done means the reported ArrayIndexOutOfBoundsException no longer occurs in this event-pool path, with regression coverage for the failing case.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.