hikikomoriphoenix / Beedio

Android app that lets you find downloadable videos as you browse the web. Allows queuing downloads. Also includes bookmarking and ad-blocking features for easier browsing experience.
GNU General Public License v2.0
148 stars 44 forks source link

[LM-videodownloader][v1.0.1]The application crashes when I try to start or puase the video download #52

Closed 44asad closed 5 years ago

44asad commented 5 years ago

Expected behavior

The application should not crash when I click on the start or puase button.

Actual behavior

the application is crash when I click on the start or puase button.

How to reproduce:

https://youtu.be/4saOxn_pnIU 1.Browser/App version: v1.0.1 2.Operating system: 5.0.1 3.Smartphone: Galaxy j2

logcat

E/AndroidRuntime( 7466): FATAL EXCEPTION: IntentService[DownloadManager]
E/AndroidRuntime( 7466): Process: marabillas.loremar.lmvideodownloader, PID: 7466
E/AndroidRuntime( 7466): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
E/AndroidRuntime( 7466):   at marabillas.loremar.lmvideodownloader.download_feature.DownloadManager.onHandleIntent(:5)
E/AndroidRuntime( 7466):   at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/AndroidRuntime( 7466):   at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 7466):   at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 7466):   at android.os.HandlerThread.run(HandlerThread.java:61)
hikikomoriphoenix commented 5 years ago

Can you try to restart your device and see if it works? Once restarted, do not connect device to computer/usb/laptop. If it works, try to connect device to computer and see if it crashes again. If not, try disconnecting and see if it crashes. Just restart when it does. It is also possible, that your device does not support writing to external storage which is causing this bug.

I will try to make some update and see if it fixes this issue.

44asad commented 5 years ago

sir! @hikikomoriphoenix , same to same problems. i can see restart my devices! 2-3 try start or puase button click naw, the apps crash.

44asad commented 5 years ago

Logcat

E/AndroidRuntime( 8804): FATAL EXCEPTION: IntentService[DownloadManager]
E/AndroidRuntime( 8804): Process: marabillas.loremar.lmvideodownloader, PID: 8804
E/AndroidRuntime( 8804): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
E/AndroidRuntime( 8804):   at marabillas.loremar.lmvideodownloader.download_feature.DownloadManager.onHandleIntent(:5)
E/AndroidRuntime( 8804):   at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/AndroidRuntime( 8804):   at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 8804):   at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 8804):   at android.os.HandlerThread.run(HandlerThread.java:61)
hikikomoriphoenix commented 5 years ago

Can you try this -> LMvideodownloader_v1.0.3.zip

Please show me what happens.

44asad commented 5 years ago

ok thanks you

hikikomoriphoenix commented 5 years ago

Did it work? If you can't find the downloaded file at the root directory, the downloads might be in this folder -> Android/data/marabillas.loremar.lmvideodownloader/

44asad commented 5 years ago

no sir! same problems!

hikikomoriphoenix commented 5 years ago

I've added some changes. Please uninstall the app and install this one -> LMvideodownloader_v1.0.3.zip I've wrapped everything so that it pops up a message instead of crashing. Please post a screenshot of this message.

hikikomoriphoenix commented 5 years ago

This is rather suspicious. The only way I can think of to reproduce this bug despite the first changes I've added is to deliberately add an erroneous line of code:

File directory = null;
String path = directory.getAbsolutePath();
44asad commented 5 years ago

sir ......its ok this app. v1.0.3

hikikomoriphoenix commented 5 years ago

I'm glad. Thanks for cooperating.