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

favorites: duplicates can not be selected and deleted... #17977

Closed
Rowin63 opened this issue Aug 19, 2023 · 15 comments · Fixed by #18510
Closed

favorites: duplicates can not be selected and deleted... #17977

Rowin63 opened this issue Aug 19, 2023 · 15 comments · Fixed by #18510
Assignees
Milestone

Comments

@Rowin63
Copy link

Rowin63 commented Aug 19, 2023

Description

Somehow it happened, I duplicated all my favorites.

So I tried to select and delete those duplicates:
my places / favorites / trash bin / selecting every second favorite, every duplicate. I continue one by one by one (every second is marked), and suddenly it happens, that from all selected favorites both, also the ones I want to keep, are marked for delete, automatically!
Tried it a few times, happens always. Like this, it is not possible for me to delete all the duplicates I produced...

Happens in +4.5.10, but I remember, it was also in some previous version like this. My workaround then was replacing the favorites file from a backup. But unfortunately now I can´t do this, the backup also contains the duplicates...

I can select and delete around 20 duplicates before this "marking" happens. When around 30, it happens to mark both of the selected favorites. But it is independent from the selected number, it happens somehow after a certain time. I also can select 15 or 20 and wait, it happens after some seconds.

How to reproduce

Actual result

Expected result

Environment
OsmAnd Version:
Android/iOS version:
Device model:

@DmitryAlexei
Copy link
Contributor

@Rowin63 can you make a short video of your issue?
Do you use OsmAnd cloud?
Do you use Auto backup? (https://docs.osmand.net/docs/user/personal/global-settings#auto-backup)

@Rowin63
Copy link
Author

Rowin63 commented Aug 21, 2023

Here´s the video.
Behaviour is different today, happens much quicker then last time. Perhaps depending on how busy Osmand is at the moment. You can see, as soon as I select the duplicate, almost immediately the other entry is selected automatically too.

No, I don´t use the cloud.
Yes, "Auto Backup" is set to "on", but the device was in "flight mode".
(perhaps "auto backup" and "cloud", which I did use some time ago, was the reason to come to all the duplicates).

Anyway, I cant´get rid of them now :-)
As I mentioned before, it´s no new issue in +4.5.10, it happened already weeks or months ago in an earlier version.

Screen_Recording_20230821_091157_OsmAnd+.mp4

@Rowin63
Copy link
Author

Rowin63 commented Aug 24, 2023

I solved the problem by deleting the favourites and get a copy from another device 👍

@DmitryAlexei
Copy link
Contributor

@Rowin63 In your opinion, what was the reason for this behavior?

@Rowin63
Copy link
Author

Rowin63 commented Aug 25, 2023

I don't really know, but perhaps the fact, that there are two absolutely identical entries in the favorite.gpx file? And then the app gets confused about, which to select? Just a guess.

Unfortunately I deleted the file. Otherwise I could have tried to edit one of the duplicated entries just a little bit (date, time, whatever, but not name or position) and see if this behavior changes...

@Rowin63
Copy link
Author

Rowin63 commented Aug 25, 2023

Yes, I can confirm, it is because the duplicates are absolutely exact duplicates.
Just changing the symbol or the colour and it does not happen anymore 👍

@sonora
Copy link
Member

sonora commented Aug 25, 2023

It sounds like a bug, then. We should in the app either

  • identify and remove "absolutely exact duplicates",
  • or we allow them, then the app must be able to treat them separately, e.g. via a uniqe primary key in the favorites database.

@vshcherb
Copy link
Member

Favroties couldn't be exact duplicates so it's bug during import / copy / etc, actually it should have checks for such situations it looks strange of course

@DmitryAlexei
Copy link
Contributor

OsmAnd~ 4.6.0#792m, released: 2023-09-21
logcat.log

  • duplicates of favorites were created while synchronizing with the Cloud between different devices
  • when trying to select one of the duplicates (using bulk select in My places menu) second one is marked automatically (sometimes 20-30 seconds needed)
  • duplicates of favorites can be deleted using My places, if you manage to do it faster, than second one will be marked
Video 1 Video 2
Screen_Recording_20230922_110856_OsmAnd._1.mp4
Screen_Recording_20230922_110856_OsmAnd._2.mp4

@DmitryAlexei
Copy link
Contributor

  • when trying to delete duplicates of favorites using Map context menu app freezes and sometimes crashes
  • duplicates cannot be deleted
video_2023-09-22_11-44-21.mp4

@vshcherb vshcherb added this to the 4.6-android milestone Oct 25, 2023
@vshcherb
Copy link
Member

Critical bug for cloud synchronization - favorites should never have duplicates!

Corwin-Kh added a commit that referenced this issue Nov 6, 2023
@Corwin-Kh Corwin-Kh linked a pull request Nov 6, 2023 that will close this issue
@DmitryAlexei
Copy link
Contributor

DmitryAlexei commented Nov 8, 2023

Tested on 2 Android devices with OsmAnd~ 4.6.0#997m, released: 2023-11-08

So the cause of this issue has been fixed (also see #18241, it also can be closed).

@eurosoba
Copy link

I have much the same problem.
Frequent changes of phone means that I have four copies of every favourite.
Although it looks like you can delete them by checkboxing them it doesn't actually work.
Here's what happens:
Checkbox 3 of the 4 identical entries
Press the dustbin icon
Message to say that I'm going to delete 1 favourite
Press delete
Only one of the three is actually deleted

Apart from the fact that this should work, it would far better if imports of duplicate entries were prevented in the first place!

@Busterama452
Copy link

Busterama452 commented Mar 16, 2024 via email

@eurosoba
Copy link

eurosoba commented Mar 17, 2024 via email

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

Successfully merging a pull request may close this issue.

7 participants