lingochamp / lingochamp/FileDownloader

1.7.7版本报空指针异常NullPointerException

Open
#1,378 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

2021-03-26 18:58:05.857 20493-23439/ W/System.err: java.lang.NullPointerException: Attempt to invoke interface method 'com.liulishuo.filedownloader.model.FileDownloadModel com.liulishuo.filedownloader.database.FileDownloadDatabase.find(int)' on a null object reference
2021-03-26 18:58:05.857 20493-23439/ W/System.err: at android.os.Parcel.readException(Parcel.java:1690)
2021-03-26 18:58:05.857 20493-23439/ W/System.err: at android.os.Parcel.readException(Parcel.java:1637)
2021-03-26 18:58:05.857 20493-23439/ W/System.err: at com.liulishuo.filedownloader.i.IFileDownloadIPCService$Stub$Proxy.start(IFileDownloadIPCService.java:301)
2021-03-26 18:58:05.857 20493-23439/ W/System.err: at com.liulishuo.filedownloader.FileDownloadServiceUIGuard.start(FileDownloadServiceUIGuard.java:106)
2021-03-26 18:58:05.857 20493-23439/ W/System.err: at com.liulishuo.filedownloader.FileDownloadServiceProxy.start(FileDownloadServiceProxy.java:68)
2021-03-26 18:58:05.857 20493-23439/ W/System.err: at com.liulishuo.filedownloader.DownloadTaskHunter.start(DownloadTaskHunter.java:607)
2021-03-26 18:58:05.857 20493-23439/ W/System.err: at com.liulishuo.filedownloader.FileDownloadTaskLauncher$LaunchTaskRunnable.run(FileDownloadTaskLauncher.java:155)
2021-03-26 18:58:05.857 20493-23439/ W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
2021-03-26 18:58:05.858 20493-23439/ W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
2021-03-26 18:58:05.858 20493-23439/ W/System.err: at java.lang.Thread.run(Thread.java:761)
2021-03-26 18:58:05.858 20493-23444/ W/System.err: java.lang.NullPointerException: Attempt to invoke interface method 'com.liulishuo.filedownloader.model.FileDownloadModel com.liulishuo.filedownloader.database.FileDownloadDatabase.find(int)' on a null object reference
2021-03-26 18:58:05.858 20493-23444/ W/System.err: at android.os.Parcel.readException(Parcel.java:1690)
2021-03-26 18:58:05.859 20493-23444/ W/System.err: at android.os.Parcel.readException(Parcel.java:1637)
2021-03-26 18:58:05.859 20493-23444/ W/System.err: at com.liulishuo.filedownloader.i.IFileDownloadIPCService$Stub$Proxy.start(IFileDownloadIPCService.java:301)
2021-03-26 18:58:05.859 20493-23444/ W/System.err: at com.liulishuo.filedownloader.FileDownloadServiceUIGuard.start(FileDownloadServiceUIGuard.java:106)
2021-03-26 18:58:05.859 20493-23444/ W/System.err: at com.liulishuo.filedownloader.FileDownloadServiceProxy.start(FileDownloadServiceProxy.java:68)
2021-03-26 18:58:05.859 20493-23444/ W/System.err: at com.liulishuo.filedownloader.DownloadTaskHunter.start(DownloadTaskHunter.java:607)
2021-03-26 18:58:05.859 20493-23444/d W/System.err: at com.liulishuo.filedownloader.FileDownloadTaskLauncher$LaunchTaskRunnable.run(FileDownloadTaskLauncher.java:155)
2021-03-26 18:58:05.859 20493-23444/ W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
2021-03-26 18:58:05.859 20493-23444/ W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
2021-03-26 18:58:05.859 20493-23444/ W/System.err: at java.lang.Thread.run(Thread.java:761)
2021-03-26 18:58:05.860 20493-23439/ W/System.err: java.lang.NullPointerException: Attempt to invoke interface method 'com.liulishuo.filedownloader.model.FileDownloadModel com.liulishuo.filedownloader.database.FileDownloadDatabase.find(int)' on a null object reference
2021-03-26 18:58:05.860 20493-23439/ W/System.err: at android.os.Parcel.readException(Parcel.java:1690)
2021-03-26 18:58:05.861 20493-23439/ W/System.err: at android.os.Parcel.readException(Parcel.java:1637)
2021-03-26 18:58:05.861 20493-23439/ W/System.err: at com.liulishuo.filedownloader.i.IFileDownloadIPCService$Stub$Proxy.start(IFileDownloadIPCService.java:301)
2021-03-26 18:58:05.861 20493-23439/ W/System.err: at com.liulishuo.filedownloader.FileDownloadServiceUIGuard.start(FileDownloadServiceUIGuard.java:106)
2021-03-26 18:58:05.861 20493-23439/ W/System.err: at com.liulishuo.filedownloader.FileDownloadServiceProxy.start(FileDownloadServiceProxy.java:68)

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 the start path in FileDownloadServiceUIGuard.java, FileDownloadServiceProxy.java, and DownloadTaskHunter.java, then trace the IPC call to FileDownloadDatabase.find. Reproduce the NullPointerException on version 1.7.7 and determine why the database reference is null; done means the start path no longer produces this exception and the behavior is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.