View Issue Details

IDProjectCategoryView StatusLast Update
0013294MMW v4Synchronizationpublic2016-05-23 10:35
Reporterrusty Assigned To 
PriorityurgentSeveritymajorReproducibilityalways
Status resolvedResolutionunable to reproduce 
Product Version4.1.12 
Target Version4.1.12 
Summary0013294: Auto-converted Tracks repeatedly fail to sync via USB when direcories pre-exist.
DescriptionAs discussed over IM, when syncing tracks to a nexus 5, 50+ tracks fail to sync--all of them being tracks that are auto-converted. Log is posted to ftp (youtube tracks are no longer on the sync list).

Note: based on a previously submitted log, Ludek indicated:
[5/17/2016 10:52:27 AM | Edited 10:53:09 AM] Ludek Stoklasa: Hi, re the Rusty's log, there are MTP errors when creating folders, e.g. folder "Bob Dylan" failed to create when uploading C:\Users\Russell\AppData\Local\Temp\C964.mp3 -> \Music\Bob Dylan\Modern Times\05 Bob Dylan - Someday Baby.mp3
Ludek Stoklasa: the same e.g. for folder "Billy Burnette"

I checked the device and found that these directories already exist on the device (in fact, the bob dylan directory even has another track and albumart.jpg file in the directory). In addition, empty /Music/Billy Burnette-Memphis in Manhattan and /Music/Bob Dylan-Bob Dylans Greatest Hits Volume 2 also existed on the device. Could it be that an error is resulting because MMW is trying to create directories that already exist?

To test out that hypothesis, I deleted those two directories from the device, rebooted, and did another USB auto-sync.
-->
This time those files synced successfully (log on ftp)!

Note: the problem started when I changed the sync configuration for my nexus 5 and set it to auto-convert _all_ tracks that are > 196kbps (even if they're in a format that's compatible with the device). I'm guessing that MMW deleted a bunch of files, leaving the directories behind, and that these residual directories are somehow causing the problem.

p.s. I reboot the device prior to each sync operation to ensure that deletion-related MTP problems are less likely to occur.
Steps To Reproduce1 Reboot device
2 Open ES explorer and see that the /Music/Bob Dylan and /Music/Billy Burnette directories exist
3 Close ES explorer
4 Connect device to MMW and sync
--> errors re. copying Bob Dylan and Billy Burnette files
5 Disconnect device and reboot
6 Run ES Explorer and delete those directories
7 Reboot
8 Connect and perform USB sync
--> success
TagsNo tags attached.
Fixed in build

Relationships

related to 0013295 closedLudek Add [Help] button to the sync summary dialog 

Activities

Ludek

2016-05-18 22:04

developer   ~0044655

Last edited: 2016-05-18 22:17

No, MMW tries to create the folders _only_ if it cannot open them via MTP.

In both the logs I see some folders that were not visible over MTP and also failed to create over MTP (e.g.
\Music\Billy Burnette\ -- failed_sync_of_auto-converted_tracks.LOG,
\Music\Alexi Murdoch\ -- failed_sync_of_auto-converted_tracks_after_deleting_directories.LOG )

But as discussed several times this happens when MMA or ES Explorer deleted the files and folders in Android and the MTP does not refresh. The folders are still visible over MTP (although no longer exists in Android), but cannot be deleted/created/accessed via Windows Explorer or MMW.

I guess that rebooting the device fixes this?
Anyhow this cannot be fixed/workarounded on the Windows side.

rusty

2016-05-18 22:28

administrator   ~0044657

I added the repro steps to clarify.
Rebooting the devices does not fix this, and ES explorer clearly shows that the folders exist.

So the question is what can we do to workaround this? Or is the only solution to tell users to 'If this happens, delete all content using a file explorer, and then resync'?

Ludek

2016-05-19 09:06

developer   ~0044660

Last edited: 2016-05-19 09:37

1) I verified in the log that MMW didn't delete _any_ of the mentioned folders. The folders are deleted only if the files are removed from the sync list or deleted manually and the folders would remain empty after sync (not when they are just replaced by newer versions of the files). So it is still very unclear why some folders became invisible over MTP all of the sudden and which operation could cause this, I guess it was rather an operation in Android.

2) If they are invisible over MTP then MMW cannot access it's object interface and thus cannot delete such a folders. Creation also fails.

3) The only workaround that I see for now is to show the [Help] button (suggested in 0013293 and pointing to KB article) directly on the sync summary dialog.

There was a problem synchronizing the following item(s):
.....
[Help] [OK]

4) I wonder, is this reproducible for you? If yes, then we could find the action which causes the folders to be invisible. I wonder especially:
a) whether MMA was closed all the time
b) the files were removed/re-added on the sync list in between so that a MMW folder deletion operation was involved? In such a case maybe if the delete operation would fail somehow then it could make some sense, but so far based on the log this didn't happen.

Ludek

2016-05-19 13:25

developer   ~0044662

Last edited: 2016-05-19 16:45

FYI: Marek also reproduced it on CM12, solving with him separately. The folder was deleted by MMW with successful MTP result, but remains visible in Android.
So far it looks like the workaround could be for MMW to not delete empty folders for such a devices.

The question is whether MMW shouldn't delete the emptied folders only for some types of Android devices or for all? I guess that probably for all devices where MMA is installed (where MMA can delete them)? The other question is whether MMA's folder deletion doesn't make issues too (on such a devices)?

Ludek

2016-05-19 18:55

developer   ~0044667

Item 3 is tracked as 0013295

marek

2016-05-20 05:56

developer   ~0044668

I found out that it was test error in my case. ES file explorer uses cache and has to be manually refreshed to show current content. So it wasn't cause of the freeze.

The freeze occurs when folders are deleted on device but they are still visible over MTP via Windows Explorer. It doesn't occur always. But it looks like it occurs when MMA is running only (not sure).

Only some of deleted files remains visible (like albumart.jpg) and it causes that the parent folder is still visible.

I do not see any operation with this file (albumart.jpg) in MMA, only some DB operation during UDB sync.

Logs sent to Ludek.

rusty

2016-05-20 14:13

administrator   ~0044674

btw, could this issue be related to http://www.mediamonkey.com/forum/viewtopic.php?f=21&t=83533 (a case of a user seeing files repeatedly sync unnecessarily that Ludek thought is related to a change in the auto-conversion rules).

Ludek

2016-05-23 10:35

developer   ~0044699

As talked via IM: In case of Marek it was a test error, Peke cannot replicate it, and Rusty can no longer replicate this issue too.

So resolving as "unable to reproduce"