View Issue Details

IDProjectCategoryView StatusLast Update
0008348MMW v4Synchronizationpublic2011-09-18 19:52
Reporterstephen_plattAssigned To 
PriorityurgentSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version4.0 
Target Version4.0Fixed in Version4.0 
Summary0008348: iPad 2 sync 'thread creation error - not enough storage to process this request'
DescriptionSyncing with the iPad 2 brings about a "Thread creation error" and the sync terminates before it is completed.
Steps To Reproduce1. Start with cleared iPad (no audio tracks)
2. Select a large amount of files via playlists to sync (3000 audio files here)
3. Auto-conversion rules are incompatible -> mp3 (v5)
4. Initiate sync. After about 100 files are sync'ed, 'thread creation error - not enough storage to process this request' pops up from time to time
5. The sync is terminated around file 300 or so
6. No playlists are copied to the device
Additional Informationhttp://www.mediamonkey.com/forum/viewtopic.php?f=6&t=59768
TagsNo tags attached.
Fixed in build1433

Relationships

related to 0008149 closedLudek Synchronization can fail on specific BMP images 
related to 0008063 closedLudek Reading of a specific JPEG file causes AV 
related to 0008255 closedLudek MediaMonkey corrupts artwork colors when adding it as bitmap (regression) 

Activities

stephen_platt

2011-09-07 23:39

developer   ~0027488

Log file is attached

jiri

2011-09-08 10:29

administrator   ~0027508

The problem is in failed JPEG conversions.

Ludek

2011-09-08 12:47

developer   ~0027511

Last edited: 2011-09-08 15:28

This regression (failed JPEG conversion) has been introduced in build 1425 while fixing 0008255 (SVN revision 12524). I created some Dunit tests to preserve problems like this.

Aside from the failed artwork conversion there was really a huge memory leak (the reason for the thread creation error).


Fixed in build 1429.

lowlander

2011-09-12 14:22

developer   ~0027607

Confirmed on forum

stephen_platt

2011-09-14 19:14

developer   ~0027700

Last edited: 2011-09-14 19:31

I'm still having an issue where MM crashes while I sync with an iPad 2. I've uploaded another log, but hard to say if there's anything useful in it, it looks like it just cuts off as MM closes during the sync.

http://www.4shared.com/file/23F8Ajdl/ipadSTEVE-PC.html

Ludek

2011-09-14 21:55

developer   ~0027708

Last edited: 2011-09-14 22:06

It looks that there still exists a memory leak although I haven't found any so far (but I don't have iPad). Was your memory utilization very high at the moment?

I suspect that there could be a memory leak in decode/encode plugin rather than in the main app. Attach please your device profile so that we could see your exact device settings.

stephen_platt

2011-09-14 22:06

developer   ~0027710

I just tried the sync again. It's hard to say, I watched the memory usage in the task manager but when MM crashed it was only at about 150 MB. During the sync process the memory usage had gone higher than that (up to 250 MB or so) but come back down.

Ludek

2011-09-15 10:34

developer   ~0027742

Last edited: 2011-09-15 10:42

Jiri also couldn't reproduce the issue with iPad.
Stephen, could you please

1. Download process explorer: http://technet.microsoft.com/en-us/sysinternals/bb896653
2. Run it together with MM and start syncing
3. Right-click MediaMonkey.exe in the Process Explorer and select [Performance] tab. Watch 'Virtual memory' and 'Handles' boxes, does it grow?

And also attach your device profile (MMDC file) so that we could see your device settings.

stephen_platt

2011-09-15 15:34

developer   ~0027749

http://www.4shared.com/file/0aJGT_6V/iPadsyncCrash.html

I uploaded a video of the sync with Process Explorer open, the Virtual Memory does grow up to the point of the crash. It crashes in the last 30 seconds of the video.

The sync did get much farther than usual this time, usually the crash has been happening after copying around 500 tracks.

jiri

2011-09-16 09:06

administrator   ~0027763

Last edited: 2011-09-16 09:42

Ok, the video shows that it's the 'Virtual Size' of 'Virtual Memory' that causes problem - it's 1.5GB right on start and so it very quickly approaches 2GB limit.

I tested various scenarios of start-up on my PC, all results in MB:

MM4 debug:
Default: 770
With UPnP server: 950
No plugins: 356

Specific plugins:
d_WMDM: 50
d_iPod: 40
d_iPhone: 180 !

MM3 debug:
Default: 445
No plugins: 246
d_iPhone: 85


This raises a couple of questions:
1. Why starting a UPnP server consumes so much memory?
2. Why the same dll (d_iPhone) consumes 100MB more memory in MM4 than in MM3?

jiri

2011-09-16 15:35

administrator   ~0027767

The problem is in our default callstack (16MB), which was just 1MB previously. Assigning to Petr to decrease it (unless there's any reason for this, in which case we must eliminate the reason).

petr

2011-09-16 16:28

developer   ~0027770

Fixed in 1433 (fixed stack size to 1024)

Ludek

2011-09-17 11:32

developer   ~0027790

Last edited: 2011-09-17 11:39

The callstack size was still 16MB in the project (dproj) file (i.e. in our internal build). Fixed (doesn't affect public builds).

stephen_platt

2011-09-18 19:52

developer   ~0027810

verified 1433