View Issue Details

IDProjectCategoryView StatusLast Update
0012347MMW v4Synchronizationpublic2015-03-10 22:22
Reporterrusty Assigned To 
PriorityurgentSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformSamsung Galaxy S5 MiniOSAndroidOS Version4.4
Product Version4.1.5 
Target Version4.1.6Fixed in Version4.1.6 
Summary0012347: USB Sync to external SD Card fails to update database (regression)
DescriptionIn build 337, attempts to do a USB sync to the External SD Card on an S5 mini fails:
The content is copied to the Ventis directory (both Music and m3u playlists), but none of it shows up in the database!

In contrast, performing the same operation to internal memory works as expected.
TagsNo tags attached.
Attached Files
logs-s4-usb-failure.zip (380,622 bytes)
Fixed in build1720

Relationships

related to 0012290 closedmarek MMA Playlists losing tracks in 1.0.7 in some environments 
related to 0012340 closedrusty MMW v4 Optimize USB sync with Androids 
related to 0012372 resolvedmartin MMA Failed REINDEX on mmstore.db 

Activities

marek

2014-11-12 21:43

developer   ~0040993

This is not regression but known MTP issue. MMW tries to upload mmstore.db.synced to device. The DB is already there and is visible via Windows browser. But this DB file is not visible on Android device (in any browser app).

Upload to MMA finishes with some non zero value. Probably some upload error. Ludek please confirm.

So MMW tries to upload DB but fails and MMA doesn't see any DB to sync.

I have tested it with Samsung GS4 so it is probably the same thing.

BUT it is not possible to sync to internal storage too. Device has to be restarted or reconnected or some other action that cause that files will appear. Have you tried the internal storage sync right after external storage sync?

Could You generate logs. Preferably from MMW but MMA logs can be valuable too.

Ludek

2014-11-12 22:10

developer   ~0040994

Last edited: 2014-11-12 22:11

Yes, in the attached Marek's log I see that uploading file \MediaMonkey\files\mmstore.db.synced failed with MTP error code 80070013

Not sure whether it is regression or not, and also this error code is not listed between MTP error codes, but googling it I found it means ERROR_WRITE_PROTECT.
I suspect MTP refresh issue as Marek pointed.
@Marek: In the past there was a way how to refresh it on Androids, not sure how it goes with newer Android versions (when apps have usually less priveleges). Marek should know better.

rusty

2014-11-13 13:40

administrator   ~0041000

Last edited: 2014-11-13 15:24

Ludek, I was unable to reproduce this issue last night. It seems that if the device has been restarted, whatever MTP bug on the device that prevents the file from being written goes away.

However, if we assume that this error condition may occur every now and then, wouldn't it make sense for MMW to generate an error message when this occurs?

e.g. using existing strings:
"Auto sync"
------------------------------
"Unknown error." OR "Insufficient space available." OR "Error accessing the database." (depending on the situation).

[OK]

Ludek

2014-11-13 21:57

developer   ~0041015

We could use the same string as for tracks and artwork files:
'Problem while copying file %s to %s'

rusty

2014-11-14 14:17

administrator   ~0041020

Even better.

Ludek

2014-11-16 23:25

developer   ~0041032

Last edited: 2014-11-16 23:31

Both Marek and user from ticket #IRZ-224-25727 can reproduce that sometimes MMW cannot download MMA's DB (\MediaMonkey\files\mmstore.db), it fails with MTP error code 80042009

Marek indicated that restarting the device is workaround for this issues

Based on http://msdn.microsoft.com/en-us/library/windows/desktop/ff801091(v=vs.85).aspx the 80042009 means "Indicates that an object handle does not refer to an actual object that is present on the device. The application should enumerate the storages again."

The issues seems to be happen on Android 4.4 devices, getting touch with Marek to find whether the storage enumeration will help.

Ludek

2014-11-17 11:21

developer   ~0041037

Marek, here http://happymonkeying.com/beta/80042009/d_WMDM.dll is new d_WMDM.dll with disabled storage cache, please try to test whether it eliminates the 80042009 MTP error code.

Ludek

2014-11-19 11:57

developer   ~0041056

Last edited: 2014-11-19 11:57

Marek confirmed that he hasn't seen the 80042009 MTP error with the provided DLL, assigned back to me to implement the fix for 4.1.6

marek

2014-11-19 13:50

developer   ~0041057

Last edited: 2014-11-19 23:50

We have discussed new way how to avoid conflicts when Android is not able to refresh content over MTP. New approach is implemented in MMA in build 342

Ludek

2014-11-19 23:04

developer   ~0041063

Fixed in 4.1.6.1720

Together with 0012340 the workflow was changed to workaround the MTP freezes and refresh issues + fixed further tweaks related to USB sync with MMA.

peke

2014-11-24 03:12

developer   ~0041116

Verified 1720/343