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

OsmAnd deletes favorites if one is saved before all favorites are loaded #20957

Open
burillo-se opened this issue Sep 30, 2024 · 6 comments · May be fixed by #20977
Open

OsmAnd deletes favorites if one is saved before all favorites are loaded #20957

burillo-se opened this issue Sep 30, 2024 · 6 comments · May be fixed by #20977
Assignees
Labels
! ^ UI approving needed and-bugs
Milestone

Comments

@burillo-se
Copy link

burillo-se commented Sep 30, 2024

Description

If OsmAnd hasn't loaded its favorites yet, and I create a new one, the old ones are deleted and there appears to be no way to restore them.

(apologies, there was a rant previously, but backups work, it was user error)

Steps to reproduce

  1. Have lots of favorites
  2. Open OsmAnd app (the favorites will not be loaded until some time later - maybe this is specific to having favorite on SD card)
  3. Save a favorite

Actual result

All old favorites are deleted

Expected result

If favorites are unavailable right now, I'd expect either that I wouldn't be able to save a new one, or, preferably, it'll be saved and then added to favorites later.

Your Environment (required)

WARNING Crash-Logs MAY contain information you deem sensitive.
Review this CAREFULLY before posting your issue!

OsmAnd Version: plus, 4.8.6
Android/iOS version: 12
Device model: Nokia 8.3
Crash-Logs: ?
@burillo-se burillo-se changed the title Something is seriously wrong with the way OsmAnd handles favorites OsmAnd deletes favorites if one is saved before all favorites are loaded Sep 30, 2024
@yuriiurshuliak
Copy link

Unfortunately, I do not fully understand the steps for reproduction. Am I correct in assuming that after opening the app with a large number of favorites, it takes some time for the favorites to load, and during that period, a new favorite needs to be created?

Could you please provide a video and more detailed steps to help us reproduce the bug accurately without making assumptions?

@anatolyburakov
Copy link

anatolyburakov commented Oct 1, 2024

Yes, your understanding is correct: when I first open OsmAnd, I have no favorites, but they appear after a while (usually about a minute in). During that period, if I save a favorite, all previous favorites that I had get deleted. I'm not sure if this is specific to having OsmAnd data stored on SD card (as opposed to in main memory) or if it is even related to having lots of favorites (as opposed to some other issue that prevents favorites from loading quickly), but I'm mentioning it just in case it is relevant.

Here's a link to GDrive with a video showing the period between loading OsmAnd and appearance of favoties: https://drive.google.com/file/d/1Csb3Km9FxkvviNMIlo267PhGXu_I7dem/view

If I save a favorite during this period, other favorites are deleted (as in, even after waiting for a few minutes, the only favorites I will see is the one I just created, and if I reload OsmAnd I will see the same - just one favorite).

@yuriiurshuliak
Copy link

The bug has been successfully reproduced. To reproduce it, import a large number of favorites, fully close the application, then reopen it and go to My Places > Favorites. You’ll notice that not all the favorites load right after opening the app. Close the My Places tab, create a new favorite on the map, and close the app again. Upon reopening and navigating back to My Places > Favorites, only the newly created favorite will appear, while the previously imported favorites will no longer be visible.

OsmAnd~ 4.9.0#3340m, released: 2024-10-02

video_2024-10-02_12-12-20.mp4

@vshcherb vshcherb added this to the 4.9-android milestone Oct 2, 2024
@vshcherb
Copy link
Member

vshcherb commented Oct 2, 2024

Just FYI: It's possible to use backups for favorites from local storage, to restore missing favorites

@anatolyburakov
Copy link

Just FYI: It's possible to use backups for favorites from local storage, to restore missing favorites

yep, I eventually found where they were. the process could've been less manual, but that's a separate issue.

@sonora
Copy link
Member

sonora commented Oct 13, 2024

From my testing, the behavior even seems somehow triggered by going to the My Favorites screen too soon after app start:

  • If I immediately go there after the map screen appears after a new app start, I get this 1+ minute or so "dead zone" where the app becomes unresponsive, sometimes the OS even warns about it
  • If instead I wait for ten seconds after the map screen has appeared before I go there, all is fine: Favorites are there, all is responsive, no hanging.

So while the 10 seconds may vary with your number of favorites, it seems the issue is aggravated or even created by going to some screen too early in the process, creating this extra-long blocking.

I believe I have seen similar effects by trying certain search operations too early after app start. For example, if going to Search > Address, and tapping "Search city/location first": If you do this before the list of "Nearest cities" is displayed at the bottom of the screen, you increase the overall time for the search to return results significantly vs. first waiting for the Nearest cities to be displayed.

@vshcherb vshcherb modified the milestones: 4.9-android, 5.0-android Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
! ^ UI approving needed and-bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants