smanikandan14 / ThinDownloadManager

To download files and to avoid using DOWNLOAD_WITHOUT_NOTIFICATION permission if you are using Android's DownloadManager in your apps.
Apache License 2.0
783 stars 185 forks source link

Attempt to invoke virtual method 'void java.io.OutputStream.write(byte[], int, int)' on a null object reference #46

Closed meness closed 8 years ago

meness commented 8 years ago

Hi,

I'm getting following error, 'Attempt to invoke virtual method 'void java.io.OutputStream.write(byte[], int, int)' on a null object reference'.

ClassName
com.thin.downloadmanager.DownloadDispatcher / com.thin.downloadmanager.DownloadDispatcher / com.thin.downloadmanager.DownloadDispatcher / com.thin.downloadmanager.DownloadDispatcher / com.thin.downloadmanager.DownloadDispatcher /
MethodName
writeDataToDestination / transferData / transferData / executeDownload / run /
LineNumber
296 / 276 / 220 / 144 / 83 /
smanikandan14 commented 8 years ago

Fixed this crash in version 1.2.1. Please update the version in your gradle file.

pawegio commented 8 years ago

Still occurs in 1.2.1:

java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.OutputStream.write(byte[], int, int)' on a null object reference
        at com.thin.downloadmanager.DownloadDispatcher.writeDataToDestination(DownloadDispatcher.java:315)
        at com.thin.downloadmanager.DownloadDispatcher.transferData(DownloadDispatcher.java:295)
        at com.thin.downloadmanager.DownloadDispatcher.transferData(DownloadDispatcher.java:238)
        at com.thin.downloadmanager.DownloadDispatcher.executeDownload(DownloadDispatcher.java:142)
        at com.thin.downloadmanager.DownloadDispatcher.run(DownloadDispatcher.java:81)
Aiuspaktyn commented 8 years ago

Still occurs in 1.2.2:

Fatal Exception: java.lang.NullPointerException
       at com.thin.downloadmanager.DownloadDispatcher.writeDataToDestination(SourceFile:315)
       at com.thin.downloadmanager.DownloadDispatcher.transferData(SourceFile:295)
       at com.thin.downloadmanager.DownloadDispatcher.transferData(SourceFile:238)
       at com.thin.downloadmanager.DownloadDispatcher.executeDownload(SourceFile:142)
       at com.thin.downloadmanager.DownloadDispatcher.run(SourceFile:81) 
smanikandan14 commented 8 years ago

I fixed this issue yesterday. Could you try vesion 1.2.3