View Issue Details

IDProjectCategoryView StatusLast Update
0014139MMADBpublic2019-01-10 04:10
Reporterpeke Assigned To 
PriorityurgentSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Target Version1.3.4Fixed in Version1.3.4 
Summary0014139: DB Update: Repaired SDCard can get different ID
Descriptionyesterday my Moto G reported SDCard Failed and I used SDCard Recovery software to repair it in Card reader. All files were preserved/restored including Sync profile.

Apron Insertion of SDCard in Phone all tracks became Grayed.

Solution would be that MMA have same ability like MMW counterpart "locate moved/missing tracks"

NOTE: Resync sync also fail
Log ID: FJCSRLIVV9
Description: sync fail
TagsNo tags attached.
Attached Files
Fixed in build844

Relationships

related to 0014167 closedmartin On upgrade to 1.3.0 some users cannot play library content (due to encrypted SD card?) 
related to 0014197 closedmarek Disabled scanned folders cannot be removed 
child of 0013216 assignedmartin Sync to adopted storage fails --> Content migrated to adopted storage fails to play 

Activities

peke

2017-03-25 23:08

developer   ~0047622

Last edited: 2017-03-25 23:12

Changing and assigning to Marek for log analyze as along with one noted there were few auto sent crash logs.

Assign to Rusty if you see fit after log analyze.

marek

2017-03-28 09:59

developer   ~0047641

I agree that something like "locate moved/missing tracks" will be useful. It can be implemented as part of media scanner.

Your issues are probably related to corrupted SD card. I see many Disk I/O exceptions.

peke

2017-03-28 14:11

developer   ~0047646

Last edited: 2017-03-28 14:13

Scanned SDCard on PC and it has not found any write errors.

Errors are possibly due the Corrupted SDCard before format.

Re Scanner: I agree it is the good place for it, but a manual assignment would be also good.

rusty

2017-03-28 16:28

administrator   ~0047648

From my perspective, this should be an automated process. e.g.
If MMA has checked for new/changed media (automatically or due to user intervention) and tracks aren't found, then MMA should tell the user something like:

The following couldn't be found:
...
...
...
[ ] Search other locations -->opens the Add Folders dialog.
[ ] Delete the tracks
[OK]

Note: I'm not familiar with the specifics of how MMA currently works re. disconnected SD cards/USB storage. The above may need to be modified so that it integrates well with that functionality.

peke

2017-04-03 19:50

developer   ~0047709

I've done additional tests and I think I have found the reason and possible solution for a problem which should be easy to replicate and fix.

Steps to reproduce:
1. Eject working SDCard from phone
2. Insert it in card reader and copy whole content
3. Quick Format the card so that Format serial changes
4. Copy all info back to SDCard
5. Insert it in phone
6. Start MMA (Will ask for access rights)
7. Gray Storage would show

Proposed solution:
On Load Check If storageinfo.xml that contain Previous SDCard Serial Number Comply with read of current SDCard and if not Update media prefix in mmstore.db which would make all tracks available again or remove them if deleted due the SDCard Corruption.

marek

2017-06-20 17:18

developer   ~0048168

I am now implementing following procedure that should fix this:

1. when MediaStore sync goes through all media, it can detect tracks that are on unmounted storages
2. it will look for the track with identical relative path on other mounted storages
3. it will store positive or negative result for each mounted storage
4. at the end of sync we will have following data:
 - for each unmounted storage
    - similarities in percents with each mounted storage
5. so we can define some similarity threshold and expect that some storages are the same and that these records in DB might be merged
6. user will see a notification that will goes to activity that will look like the one supposed by Rusty. I.e. user can merge, delete or leave these tracks as is.
7. these processed storage pairs will be stored so we will avoid to show it again for the same storage pair. Also pairing with the storages that were not similar to unmounted storage will be stored so we will not test it again on next sync repeatedly.

Peke's solution was implemented in MMA 1.2 for updating paths in previous form. But it wasn't so reliable and we needed some something that can be started anytime to check the similarity. This is now possible with new form of paths and it wasn't possible in 1.2. But I will re-add observing the change in storageInfo as additional rule.

Rusty proposed to suggest user to browse folders to pair with lost tracks. But what if there are tracks from multiple missing storages. User won't be able to update them correctly. My implementation will find automatically corresponding storage. It will be also hard to determine when to display it to user because we probably don't want to do it on each start.

It is true that my solution works on root storage level only. But it is possible that the tracks will be moved from e.g. from '/SomeFolder/' to '/DifferentFolder/' and this won't be detected. I have following solution:
Library folders activity already shows all unmounted folders as list. We can add an action for each such record (eyeglass icon) to open the folders dialog to be able to find the folder manually. So this will be quite similar to Rusty's solution but it can be done anytime.

To sum this up:
a) we will found some unmounted storage
b) we will look for similar storages
  I) if we found similar storage, we will notify the user that we are able to update it
  II) if similar not found, we will notify user that he can do it manually in "Library folders" where he can do it anytime, even later. This notification will be displayed only once for each unmounted storage.

Note: This implementation will work correctly in case when storage is only unmounted (SD card ejected). The notification will occur (case II) ) and user can ignore it. As soon as he put the SD card back and it will have new UID, it will be detected that it is new and notification will be displayed (case I) )

rusty

2017-06-21 16:42

administrator   ~0048208

Re.:
bI) So a toast message would display along the lines of 'Scanning content from <found location>.' ?

bII) If MMA can't find the files, shouldn't there be a means of deleting them? Also, is it not possible to jump directly to the Choose Library Folders dialog?

e.g.

Files (##) couldn't be found:
+ (to expand list of tracks)

You can delete these tracks from the library or scan library folders for them.

[Scan] [[Delete]]

marek

2017-06-26 14:55

developer   ~0048268

b I) I actually wanted to display a notification so user can confirm this action. Or we can do it automatically. I am not sure what threshold is good. Maybe 80% of at least 10 tracks has to be the same?

b II) No this is not always good way. This will delete tracks even if the SD card is unmounted for a while. And Android is very unpredictable in this. It unmounts/mounts storages on device booting. So user should have option to delete it but it shouldn't be automatical process.

So I suggest to show the notification like:
"There are some tracks in library that were not found. Please click to manage library folders." - please revise this text

This will go directly to Choose library folders dialog where user can delete or manually bind the folders. Or he can leave it as is.

Note that in new UI, the dialog is even designed to show number of tracks (http://www.ventismedia.com/mantis/file_download.php?file_id=1760&type=bug). I also wanted to add on click action that will directly go to folder with these media.

So it is not necessary to add new dialog...only new notification.

Btw. the notification should be hidden as soon as user remounts the storage.

rusty

2017-06-30 15:15

administrator   ~0048310

bI) How about:
"x tracks from <OldLocation> couldn't be found."
"Scan <NewLocation> for the missing tracks?"
[[Scan]] [Cancel]

Note: use the self-timed confirmation mechanism so that this occurs automatically if the user doesn't respond.

bII)
"x tracks from <OldLocation> couldn't be found."
"Manage library folders to add/remove library folders?"
[[Manage folders]] [Cancel]

rusty

2018-11-22 20:18

administrator   ~0051612

note: I've seen this error several times after restarting an honor 5x.
1 restart honor 5x
2 install update to MM
3 run MM
--> hourglass appears for 15m as the DB updates
Debug log (build 837): 5C63LNGVZR

According to Martin, logs (from build 837) indicate that:
1)Media ids changed in Android OS db (note: SD card wasn't ejected--no idea why this occurred)
2) It caused that MMA db was not in sync with OS db, and pair process must be executed - this was the reason why it takes so long (hourglass).
3) During pair process, if albumArt is missing, MMA try to get artwork from OS db, but Android OS does not support track artwork (only one artwork per album) and this is the reason why it's better to have tracks from the same album in separate folder.

I've tested this further since then and have found that the key step to triggering the bug is to install an updated version of MMA.
i.e.
1 restart honor 5x (build 837)
2 run MM
--> no db update occurs

But if I do the following:
1 restart honor 5x
2 install update to MM (build 841 updated to build 843)
3 run MM
--> hourglass appears for 15m as the DB updates!
Debug log (build 843): UIGRA2REBW

It would appear that something in the update process causes MMA to trigger a DB refresh.

martin

2018-12-14 10:53

developer   ~0051780

Last edited: 2018-12-14 11:24

0014139:0051612 moved to #15264

martin

2018-12-18 13:18

developer   ~0051816

Fixed in build 1.3.4.844

peke

2019-01-10 04:10

developer   ~0052019

Verified 845