Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,730,714 Members 41,582 Now Online
XDA Developers Android and Mobile Development Forum

ISETool.exe bug

Tip us?
 
sensboston
Old
(Last edited by sensboston; 1st March 2012 at 12:45 PM.)
#1  
Recognized Developer - OP
Thanks Meter 418
Posts: 1,476
Join Date: Nov 2009
Location: Boston, MA

 
DONATE TO ME
Default ISETool.exe bug

Today I found very annoying and strange bug (or, may be, MS call it "feature" ). Seems like directories on isf can hold 1024 files only...
Try code below:

Code:
Random rnd = new Random();
using (var isf = IsolatedStorageFile.GetUserStoreForApplication())
{
      byte[] data = new byte[1024];
      isf.CreateDirectory("test");
      for (int i=0; i<1025; i++)
      {
          string fileName = "test\\" + i.ToString("D4") + ".bin";
          using (IsolatedStorageFileStream fs = new IsolatedStorageFileStream(fileName, FileMode.Create, isf))
          {
               rnd.NextBytes(data);
               fs.Write(data, 0, data.Length);
          }
      }
}
After loop completed, resulting directory "test" will be empty! But change i<1024 and you'll get all yours 1024 files...

Tested on emulator and HTC Surround, same results. Can't find any documentation about this limitation... Shame on you, MS!

Update: another strange behavior ('cause of this bug) - if you already have 1024 files and try to add one more, the whole directory content is "magically" disappear But exception isn't thrown...
 
Dbeattie
Old
#2  
Member
Thanks Meter 8
Posts: 51
Join Date: Feb 2012
Location: Lincoln, NE
Interesting, I'll try it as well. This would be lame to have to work around.
 
sensboston
Old
#3  
Recognized Developer - OP
Thanks Meter 418
Posts: 1,476
Join Date: Nov 2009
Location: Boston, MA

 
DONATE TO ME
Quote:
Originally Posted by Dbeattie View Post
Interesting, I'll try it as well.
Yes, please, confirm...
 
Dbeattie
Old
#4  
Member
Thanks Meter 8
Posts: 51
Join Date: Feb 2012
Location: Lincoln, NE
I can't test this at the moment but I know I write well over 1000 files to /shared/media so I'm curious to tet this.
 
Nudua
Old
#5  
Senior Member
Thanks Meter 97
Posts: 290
Join Date: Mar 2011

 
DONATE TO ME
Quote:
Originally Posted by sensboston View Post
Yes, please, confirm...
Hey just tried it out, wrote 2k items to a folder called "Data".

While it didn't show up in the Windows Phone Power tools, the file does exist in the folder itself.

bool success = storage.FileExists(Path.Combine("data", "1999"));

So it's either a problem with the WPConnect api or with the power tools, haven't tried the command line tool.
 
sensboston
Old
#6  
Recognized Developer - OP
Thanks Meter 418
Posts: 1,476
Join Date: Nov 2009
Location: Boston, MA

 
DONATE TO ME
Yep, fortunately you are right, it's a ISETool.exe (or drivers) bug, not a WP7 ISF.
 
Casey_boy
Old
#7  
Casey_boy's Avatar
Retired Recognized Developer
Thanks Meter 55
Posts: 456
Join Date: Feb 2010
Quote:
Originally Posted by sensboston View Post
Yep, fortunately you are right, it's a ISETool.exe (or drivers) bug, not a WP7 ISF.
Could you therefore edit the title of the thread please?

Thanks.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Blast Those Flags with Knock the Flags

Lately, we have seen a rather drastic shift in the world of mobile device gaming. The infamous Angry … more

Hide Numbers on Your SMS and Call Logs with Reflection

How many times have you given your device to someone else in order to show them a … more

Implement Split View in Your LG G2 KitKat Rom with Automated Installer

Some of you may have remembered a story on the Portal a few weeks back … more

Cast Your Device Screen the Way it Was Meant to be with Second Screen

Not too long ago here on the XDA Portal, we covered how Google had made … more