HumanLearning2021 / HumanLearningApp

GNU General Public License v3.0
3 stars 2 forks source link

Move download switch away from home #239

Closed jonaskon closed 3 years ago

jonaskon commented 3 years ago

Move the download switch away from the home fragment. It is now available from the learning dataset selection and from the dataset overview.

jonaskon commented 3 years ago

Everything looks good to me but I got a weird surprise when testing. If i press the downloading button before everything is fully ready on the fragment the app crashes....

This should be adressed now

Nitwix commented 3 years ago

I don't know if this is hard to fix but I observe the following crash:

Tell me if you cannot reproduce. If it's hard to fix, it's ok to leave as is, because we don't have a lot of time until the deadline.

E/com.github.HumanLearning2021.HumanLearningApp.model.DefaultImageDisplayer: load failed class com.bumptech.glide.load.engine.GlideException: Failed to load resource There were 3 root causes: java.io.FileNotFoundException(/data/user/0/com.github.HumanLearning2021.HumanLearningApp/cache/936d9f09-4cff-45eb-8264-3210db71c90d: open failed: ENOENT (No such file or directory)) java.io.FileNotFoundException(open failed: ENOENT (No such file or directory)) java.io.FileNotFoundException(open failed: ENOENT (No such file or directory)) call GlideException#logRootCauses(String) for more detail Cause (1 of 4): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, LOCAL There was 1 root cause: java.io.FileNotFoundException(/data/user/0/com.github.HumanLearning2021.HumanLearningApp/cache/936d9f09-4cff-45eb-8264-3210db71c90d: open failed: ENOENT (No such file or directory)) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class java.io.FileNotFoundException: /data/user/0/com.github.HumanLearning2021.HumanLearningApp/cache/936d9f09-4cff-45eb-8264-3210db71c90d: open failed: ENOENT (No such file or directory) Cause (2 of 4): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class android.os.ParcelFileDescriptor, LOCAL There was 1 root cause: java.io.FileNotFoundException(open failed: ENOENT (No such file or directory)) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class java.io.FileNotFoundException: open failed: ENOENT (No such file or directory) Cause (3 of 4): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class android.content.res.AssetFileDescriptor, LOCAL There was 1 root cause: java.io.FileNotFoundException(open failed: ENOENT (No such file or directory)) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class java.io.FileNotFoundException: open failed: ENOENT (No such file or directory) Cause (4 of 4): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{StringUri->Object->Drawable}, LOCAL Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{StringUri->Drawable->Drawable} Cause (2 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{StringUri->Bitmap->Drawable} E/AndroidRuntime: FATAL EXCEPTION: main Process: com.github.HumanLearning2021.HumanLearningApp, PID: 29517 class com.bumptech.glide.load.engine.GlideException: Failed to load resource There were 3 root causes: java.io.FileNotFoundException(/data/user/0/com.github.HumanLearning2021.HumanLearningApp/cache/936d9f09-4cff-45eb-8264-3210db71c90d: open failed: ENOENT (No such file or directory)) java.io.FileNotFoundException(open failed: ENOENT (No such file or directory)) java.io.FileNotFoundException(open failed: ENOENT (No such file or directory)) call GlideException#logRootCauses(String) for more detail Cause (1 of 4): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, LOCAL There was 1 root cause: java.io.FileNotFoundException(/data/user/0/com.github.HumanLearning2021.HumanLearningApp/cache/936d9f09-4cff-45eb-8264-3210db71c90d: open failed: ENOENT (No such file or directory)) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class java.io.FileNotFoundException: /data/user/0/com.github.HumanLearning2021.HumanLearningApp/cache/936d9f09-4cff-45eb-8264-3210db71c90d: open failed: ENOENT (No such file or directory) Cause (2 of 4): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class android.os.ParcelFileDescriptor, LOCAL There was 1 root cause: java.io.FileNotFoundException(open failed: ENOENT (No such file or directory)) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class java.io.FileNotFoundException: open failed: ENOENT (No such file or directory) Cause (3 of 4): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class android.content.res.AssetFileDescriptor, LOCAL There was 1 root cause: java.io.FileNotFoundException(open failed: ENOENT (No such file or directory)) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class java.io.FileNotFoundException: open failed: ENOENT (No such file or directory) Cause (4 of 4): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{StringUri->Object->Drawable}, LOCAL Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{StringUri->Drawable->Drawable} Cause (2 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{StringUri->Bitmap->Drawable}

jonaskon commented 3 years ago

I don't know if this is hard to fix but I observe the following crash:

download the database
add a new picture in a dataset (from camera)
click on the category in which you added the picture
crash

Tell me if you cannot reproduce. If it's hard to fix, it's ok to leave as is, because we don't have a lot of time until the deadline.

E/com.github.HumanLearning2021.HumanLearningApp.model.DefaultImageDisplayer: load failed class com.bumptech.glide.load.engine.GlideException: Failed to load resource

Thanks, I fixed it.