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

Android-8.1: Opening map area filter after closing permissions will cause APhotoManager to crash #175

Open
sjl872964789 opened this issue Jun 23, 2020 · 6 comments

Comments

@sjl872964789
Copy link

Describe the bug
Opening map area filter after closing permissions will cause APhotoManager to crash

To Reproduce
Steps to reproduce the behavior:

  1. Install APhotoManager
  2. Turn off the storage permission of APhotoManager in settings
  3. Open APhotoManager
  4. Click on the three points in the upper right corner
  5. Click "Map Area Filter"
  6. See error

Expected behavior
APhotoManager shouldn't crash anyway

Smartphone (please complete the following information):

  • Android version : Android 8.1.0
  • A Photo Manager Version : 0.8.3.200315

Additional context
record

Crash Report

06-23 16:12:50.646  2604  2793 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #4
06-23 16:12:50.646  2604  2793 E AndroidRuntime: Process: de.k3b.android.androFotoFinder, PID: 2604
06-23 16:12:50.646  2604  2793 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at android.os.AsyncTask$3.done(AsyncTask.java:353)
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at java.util.concurrent.FutureTask.run(FutureTask.java:271)
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:764)
06-23 16:12:50.646  2604  2793 E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: Missing SQL Column longitude,latitude or _id
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at de.k3b.android.androFotoFinder.locationmap.MarkerLoaderTask.doInBackground(MarkerLoaderTask.java:118)
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at de.k3b.android.androFotoFinder.locationmap.MarkerLoaderTaskWithRecycling.doInBackground(MarkerLoaderTaskWithRecycling.java:74)
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at de.k3b.android.androFotoFinder.locationmap.MarkerLoaderTaskWithRecycling.doInBackground(MarkerLoaderTaskWithRecycling.java:37)
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at android.os.AsyncTask$2.call(AsyncTask.java:333)
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
06-23 16:12:50.646  2604  2793 E AndroidRuntime:        ... 4 more
06-23 16:12:50.646  2604  2726 E SQLiteLog: (14) cannot open file at line 35803 of [605907e73a]
06-23 16:12:50.646  2604  2726 E SQLiteLog: (14) os_unix.c:35803: (2) open(/storage/emulated/0/osmdroid/tiles/cache.db) -
06-23 16:12:50.646  2604  2793 E k3bFoto :
06-23 16:12:50.646  2604  2793 E k3bFoto :
06-23 16:12:50.646  2604  2793 E k3bFoto : UncaughtException. Last know Activity
06-23 16:12:50.646  2604  2793 E k3bFoto :
06-23 16:12:50.646  2604  2793 E k3bFoto : => FotoGalleryActivity{0 0}
06-23 16:12:50.646  2604  2793 E k3bFoto : LogCat.uncaughtException java.lang.RuntimeException: An error occurred while executing doInBackground()
06-23 16:12:50.646  2604  2793 E k3bFoto : java.lang.RuntimeException: An error occurred while executing doInBackground()
06-23 16:12:50.646  2604  2793 E k3bFoto :      at android.os.AsyncTask$3.done(AsyncTask.java:353)
06-23 16:12:50.646  2604  2793 E k3bFoto :      at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
06-23 16:12:50.646  2604  2793 E k3bFoto :      at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
06-23 16:12:50.646  2604  2793 E k3bFoto :      at java.util.concurrent.FutureTask.run(FutureTask.java:271)
06-23 16:12:50.646  2604  2793 E k3bFoto :      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
06-23 16:12:50.646  2604  2793 E k3bFoto :      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
06-23 16:12:50.646  2604  2793 E k3bFoto :      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
06-23 16:12:50.646  2604  2793 E k3bFoto :      at java.lang.Thread.run(Thread.java:764)
06-23 16:12:50.646  2604  2793 E k3bFoto : Caused by: java.lang.IllegalArgumentException: Missing SQL Column longitude,latitude or _id
06-23 16:12:50.646  2604  2793 E k3bFoto :      at de.k3b.android.androFotoFinder.locationmap.MarkerLoaderTask.doInBackground(MarkerLoaderTask.java:118)
06-23 16:12:50.646  2604  2793 E k3bFoto :      at de.k3b.android.androFotoFinder.locationmap.MarkerLoaderTaskWithRecycling.doInBackground(MarkerLoaderTaskWithRecycling.java:74)
06-23 16:12:50.646  2604  2793 E k3bFoto :      at de.k3b.android.androFotoFinder.locationmap.MarkerLoaderTaskWithRecycling.doInBackground(MarkerLoaderTaskWithRecycling.java:37)
06-23 16:12:50.646  2604  2793 E k3bFoto :      at android.os.AsyncTask$2.call(AsyncTask.java:333)
06-23 16:12:50.646  2604  2793 E k3bFoto :      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
06-23 16:12:50.646  2604  2793 E k3bFoto :      ... 4 more
@k3b
Copy link
Owner

k3b commented Jun 26, 2020

Thanks for your feedback

on android-8.1
Caused by: java.lang.IllegalArgumentException: Missing SQL Column longitude,latitude or _id

The app is trying to collect photo-gps-data longitude,latitude to show the markers in the map and android seems to not allow it any more.

Unfortunately i only have android-7.1 device and android emulator does not run on my developer machine so i can not reproduce on my own.

I read that google wants to restrict photo-gps-access.

@k3b k3b added the bug label Jun 26, 2020
@k3b k3b changed the title Opening map area filter after closing permissions will cause APhotoManager to crash Android-8.1: Opening map area filter after closing permissions will cause APhotoManager to crash Jun 26, 2020
@k3b
Copy link
Owner

k3b commented Jun 29, 2020

Today my android lg-k30 got updated from android-7.1 to android-9 and "a photo manager" version 0.8.3 still works as expected without any crash.

can you send me a crash log as described in https://github.com/k3b/APhotoManager/wiki/Problem-Reporting-Logfile-Howto

to see what is going on before and after?

@sjl872964789
Copy link
Author

Thanks for your quick reply. I think this is what you need.
androFotofinder.logcat-20200630-144010.txt
It is worth mentioning that I found another bug in the process of saving logcat. If the storage permission is denied, I will not be able to save logcat in the corresponding directory, but APhotoManager will still remind me that the save is successful, which once made me feel confused

@k3b
Copy link
Owner

k3b commented Jul 4, 2020

[OsmDroid]
Unable to start the sqlite tile writer. Check external storage availability.

OsmDroid (the openstreemap display library) failed to to put map tile-images into it-s internal sqlite database.

  • Are you using Mapsforge offline map (See Settings) with mapsforge data on sd-card ?

On my android 9 i currently have the mapsforge data in internal memory (/storage/emulated/0) which works as expected.

I assume that mapsforge-data on sdcard does not work yet or the mapsforge-path is not correct.

Since 4 Months (and 88 commits) i am working on saf support
#169

@sjl872964789
Copy link
Author

Sorry, I did not really know whether I use Mapsforge offline map with mapsforge data on sd-card , my settings are like this:
401F4CB4F225CA8D2CEC2304246AEBCC

@k3b
Copy link
Owner

k3b commented Sep 14, 2020

That screenshot means you are not using "offline maps"

The crash-log let me suggest that the crash happend in a seperate thread.

I just found osmdroid/osmdroid#1313 (comment) which may be related to this issue.

Are you able to compile the "fdroid-branch" of this repository on your own?

If yes you can try to add the code from osmdroid/osmdroid#1313 (comment) to de.k3b.android.androFotoFinder.AndroFotoFinderApp#onCreate()

I have no device where i can reproduce the error with so i cannot verfy if it solves your problem.

If you cannot compile on your own fixing the issue is much more complicated:

  • i try some code change and create a compiled apk file for you and attach it to this ticket.
  • you install the apk and check if it fixes the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@k3b @sjl872964789 and others