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

(rare) Concurrent GeoTIFF loading may cause wrong GeoTIFF to be loaded #42

Open
mkrupczak3 opened this issue Feb 24, 2023 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@mkrupczak3
Copy link
Member

Description:

In OpenAthena for Android, GeoTIFF digital elevation model loading is performed by a new thread upon initiation of the task.

The app (by design) does not preclude the user from initiating a new load operation even when one is ongoing.

The issue is that these loading threads are not synchronized with each other properly. This may cause a different GeoTIFF to be loaded than the user expects!

Steps to reproduce:

Load a large GeoTIFF file. While the load operation is ongoing, change your mind and select a small GeoTIFF file. The small file will load before the large one, but then the large one will load after (even though the task was initiated first).

When the user goes to select an image and then calculate, the loaded file will be the large one even though they expected it to be the small one.

Possible solution:

Use a synchronized stack across the loading and man UI thread. Pop from the stack only the last inputted GeoTIFF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant