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

App crashes when downloading a new issue #227

Closed
libreliodev opened this issue May 26, 2014 · 13 comments
Closed

App crashes when downloading a new issue #227

libreliodev opened this issue May 26, 2014 · 13 comments
Labels

Comments

@libreliodev
Copy link
Owner

This happened when downloading the last version of Wind, right after the pdf was downloaded. Logcat: https://gist.github.com/libreliodev/ba1ba35e181cccc60bc0
@intrications Can this be related to the update for #208 ?
cc @suntehnik

@intrications
Copy link
Collaborator

@libreliodev

I think this is the same crash we were experiencing from before the libmupdf update and not due to #208. This appears to be the same crash: #173 (comment)

Failed to open /data/data/com.niveales.wind/app_librelio/wind_383/wind_383_.pdf

Does this always happen on the same device or have you experienced it on difference devices?

@intrications
Copy link
Collaborator

I've added some logging to the download and pushed to github. Can you test a download.

The log just after DownloadManager finishes downloading the pdf should be something like:

downloadMagazineService  D  Download manager says download successful for wind_383/wind_383_.pdf
                        D  Attempting to move file for wind_383/wind_383_.pdf
          StorageUtils  D  move /storage/emulated/0/Android/data/com.niveales.wind/files/wind_383.pdf => /data/data/com.niveales.wind/app_librelio/wind_383/wind_383.pdf
downloadMagazineService  D  5511979 bytes moved for wind_383/wind_383_.pdf

@libreliodev
Copy link
Owner Author

@intrications

Does this always happen on the same device or have you experienced it on difference devices?

Just tested on another device, and it did not crash. Will now test again on device where crash occured.

@libreliodev
Copy link
Owner Author

@intrications

I've added some logging to the download and pushed to github. Can you test a download.

Tested again, and crashed again: https://gist.github.com/libreliodev/2e7e760eda09db922bfd

And when trying to restart the app, it crashed: https://gist.github.com/libreliodev/122ed7b47181989475f7

@intrications
Copy link
Collaborator

@libreliodev

I haven't changed anything that would stop the crash. I'm just trying to work out what is causing the file to not be in the right place after download.

Can you look at the logcat produced on the command line because the crash report does not show the bit that says whether the file was successfully downloaded and copied - the bit that says "Download manager says download successful", etc.

What device are you using and what version of Android is it running?

@libreliodev
Copy link
Owner Author

@intrications

Now, I can't reproduce the bug. I keep trying.

@intrications
Copy link
Collaborator

What device are you using and what version of Android is it running? Things have changed a bit with dealing with external storage in Android 4.4

@libreliodev
Copy link
Owner Author

What device are you using and what version of Android is it running?

Galaxy Tab. Android 4.1.2

@libreliodev
Copy link
Owner Author

Just got a new crash not sure wether it's related to push or this issue.

See #173 for context and logcat at https://gist.github.com/libreliodev/dea2d3d41eaaabfa8b40

@libreliodev
Copy link
Owner Author

Tried again with another issue, app did not crash, but took a lot of time to complete download.
Logcat: https://gist.github.com/libreliodev/60ba4377ad39c8131160

@intrications
Copy link
Collaborator

Ok. I think I've found the problem. For some crazy reason the code didn't check for DownloadMagazine.STATUS_FAILED but would carry on and try to get the assets. Not sure how I didn't notice this before.

I'm not sure why the downloading is failing though. I have pushed code to log the reason code. The logcat will say "STATUS FAILED - REASON CODE:".

I'm thinking again that we should stop using DownloadManager.

@libreliodev
Copy link
Owner Author

I'm not sure why the downloading is failing though. I have pushed code to log the reason code. The logcat will say "STATUS FAILED - REASON CODE:".

No way to reproduce the bug again until now.

@libreliodev
Copy link
Owner Author

Should be fixed with #231

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