StorageFile.DeleteAsync() delete file fail without any exception sometimes.

I develop a test tool to Write a file, then delete it, over and over again.
Using "await StorageFile.DeleteAsync()" to delete file , sometimes, it run successfully without any exception, but the file to be deleted wasn't deleted as expect. Why the API " StorageFile.DeleteAsync" doesn't work?
Thanks.

Hello,
Code is as this:
 private async void SDCardFile(String basename)
            while (true)
                if (this.isStop)
                    return;
                Boolean isWirteSuc = await WriteSDCardFile(fileName, writeText);//writefile
                if (isWirteSuc)
                else
                Boolean isDeleteSuc = await DeleteSDCardFile(fileName);  //deletefile
                if (isDeleteSuc )
                else
 private async Task<bool> DeleteSDCardFile(String filename)
            try
                StorageFolder externalDevices = KnownFolders.RemovableDevices;
                StorageFolder sdCard = (await externalDevices.GetFoldersAsync()).FirstOrDefault();
                StorageFile storageFile = await sdCard.CreateFileAsync(filename, CreationCollisionOption.OpenIfExists);
                await storageFile.DeleteAsync();
                return true;
            catch (Exception ex)
                return false;
I use a timer to stop the test after 12 hours, during this test, most of the file delete success, but some failed, it still return "true"  from "DeleteSDCardFile(String filename)", so there is no exception, but the file is not deleted,
I can find these files on SD card.
Look forward to your answer, thanks for your comments.

Similar Messages

  • Why StorageFolder.CreateFileAsync(String) creates file fail without any exception thrown?

    I need to develop a windows phone store app to test file system. And I use
    StorageFolder.CreateFileAsync to create a file on ApplicationData.Current.LocalFolder path and write
    1MB text content, and read it, modify it, and re-write it. But after about 5000 times write/read.I found that the applicaition blocked at
    StorageFolder.CreateFileAsync through a test method of log. However, there isn't any exception thrown. Why did the
    StorageFolder.CreateFileAsync  fail? And how to solve this problem? We need to write/read about 150000 times.

    Hi jinchanglin,
    Have you ever tried with profiling the app while debug the app,
    Analyze app performance and
    Analyze memory usage (VB, C#, C++)
    Is it possible that CPU or memory usage reach to the limitation as you need execute the same code with nearly 150,000 times. Also you mentioned, 5000 times is ok, personally I think the code is fine, but you may need to care more about performance behavior.
    As I know if you are working with a Phone device, there is some limitation for memory usage, you cannot let your app use more memory set than that value, try to find the limitation from
    AppMemoryUsageLimit | appMemoryUsageLimit property
    --James
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

  • Payables Open Interface Pgm fails without any error(Very urgent)

    All,
    I'm into an integration project where in I'm pushing Invoice doc from a third party appln to Oracle apps (11.5.10.2) thru payables open interface. The integration is smooth till today. We pushed a record today, but the concurrent neither picks up the data but failed with 'completed error' status. When I delete the same record from the interface, the concurrent runs fine. So we are sure there is some issue with the data in my record. Since concurrent is failed without any reason, from where I can get the log to know what is the actual problem with that record? Pls help me with your inputs.
    Thanks,
    Sen

    Sen,
    To enable trace, please refer to this document (skip the part about generating TKPROF, just check the concurrent request output file if more details about the error are logged after enabling trace and setting the profile option).
    Note: 453527.1 - How To Trace a Concurrent Request And Generate TKPROF File
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=453527.1
    The database log file can be usually found under $ORACLE_HOME/admin/<SID>_<hostname>/bdump directory (or from SQL*Plus, issue "show parameter background_dump_dest").
    Regards,
    Hussein

  • Publishing of the translation for an Iview fails without any notice

    We face the followoing problem with an custom IView in SAP portal:
    The publishing of the translation for an Iview fails without any notice it only works directly after the IView was deployed.
    The translation is done by first generating the translation data then translating to the several languages, marking the data as translated. After that the translation is published via the Translation Worklist Coordination.
    All is done in the Portal under Contenet-Administration->Portal Content Translation, Translation Worklist Coordination and Worklist Translation
    The publishing works directly after deployment of an iView but if one tries to retranslate the translation is saved in the repository but not published. If we delete the translation Worklist and start over again the translations that are not published are still in the generated data but still we can’t publish them.
    There is no Information that the publication failed or anything. In the Worklist it just goes back to normal state where we can again generate the translation data.
    The Iview is a Java IView for the translation a properties file was created and all the words from properties file show up in the generated data from the Worklist.
    We could deploy the Iview every time the translation needs to be changed but the customer wants to do the translation without that step.
    We use the following Versions:
    Sap Portal nw2004s
    sap.com/SAP-JEECOR 7.00 SP10 (1000.7.00.10.0.20061026144500) 20070119122211
    sap.com/SAP-JEE 7.00 SP10 (1000.7.00.10.0.20061026144500) 20070119121940
    Thanks 4 Help

    Please review the terms of your Comcast agreement. Many agreements include scheduled price increases, and typically state that prices will return to the prevailing (almost always higher) rates when the agreement expires.
    If you still have questions contact one of their Billing reps at the phone number on your bill or 1-800-Comcast, chat with them using one of the "Account and Bill" options at https://www.comcastsupport.com/chatentry/, or visit a Service Center if one is nearby (check locations and hours at http://customer.xfinity.com/service-center-locations).
    Comcast sometimes responds to questions here in the forums, and sometimes they do not. When they do the typical response time is somewhere between a few hours and a few days.

  • AR Autoivoice fails without any error

    Autoivoice fails without any error, the lines remains in the Interface Lines. I do not get any exception or error, but the invoice is not created. After running Autoinvoce, Sales Order status is closed, so the problem is with the Autoinvoice..
    Any ideas of solving this problem? Thank you..

    It is completed, there is nothing in the log file but this Warning: some records remaining in ra_interface_lines..it looks as if it had completed normally, but the invoices are not created..there is no error shown..
    Could it be the problem the Accounting and Invoicing rules that are set to Monthly?
    Thank you.

  • FCC configuration in Sender File Channel Without any key field name

    Hi Everyone,
    We have below flat file generated from ECC using standard tcode.
    The flat file is fixed length file and first record is header record followed by line items.
    There is no key field name in the file name.
    Can we read the file and convert into xml without any key field name?
    I want to understand if the FCC configuration for above file can be done without key name or not.
    Thanks,
    Vertika

    Hello,
    AFAIK, using FCC i really doubt u can convert file into xml.
    So technically, there are two options either read each line one by one and then do conversions in ur mapping or write a custom module which will read ur input file and convert into xml.
    Configuring Generic Sender File CC Adapter
    Thanks
    Amit Srivastava

  • Oracle XE 10g install fails without any error or message

    Hi,
    I searched many posts in this form, and could not find an answer to my problem.
    Trying to install XE on a server 2003. Installation proceeds successfully almost to an end, and then installation window disappears, without any message, error or warning.
    New ORACLE_HOME, created up to this point, also disappears.
    Logfile has the following entries, C:\WINDOWS\OracleDatabaseXEServerInstall.log:
    MSI (s) (F8:C0) [16:04:44:540]: Note: 1: 1708
    MSI (s) (F8:C0) [16:04:44:540]: Product: Oracle Database 10g Express Edition -- Installation operation failed.
    I know that the server is behind the firewall, and does not have connection to the internet. It is connected to the network, and other servers and desktops, though.
    Does it have to have access to the outside world to install XE?

    Hi,
    I am having the same issue, both on a windows 2003 server and on a XP client PC. The installation progresses up to a point after which the installation window disappears without errors or messages. I tried as a domain administrator, as a local administrator and removed other Oracle software, rebooted, checked for virus scanners etcetera, withou result.
    I searched through the forums but could not find a solution.
    Any idea's?
    Regards,
    Gerrit
    Hi,
    I searched many posts in this form, and could not
    find an answer to my problem.
    Trying to install XE on a server 2003. Installation
    proceeds successfully almost to an end, and then
    installation window disappears, without any message,
    error or warning.
    New ORACLE_HOME, created up to this point, also
    disappears.
    Logfile has the following entries,
    C:\WINDOWS\OracleDatabaseXEServerInstall.log:
    MSI (s) (F8:C0) [16:04:44:540]: Note: 1: 1708
    MSI (s) (F8:C0) [16:04:44:540]: Product: Oracle
    Database 10g Express Edition -- Installation
    operation failed.
    I know that the server is behind the firewall, and
    does not have connection to the internet. It is
    connected to the network, and other servers and
    desktops, though.
    Does it have to have access to the outside world to
    install XE?

  • Backup failing without any errors in sys prefrerences time machine

    What happens: Time Machine scans, prepares, but does not actually back up. It does not report any errors through System Preferences > Time Machine.
    I've used Disk Utility to verify both my local disk and my time machine disk (external USB drive).
    I've done a full reset of Time Machine ("A4").
    Here's the relevant log:
    Nov 26 03:07:31 computerName com.apple.backupd[522]: Starting standard backup
    Nov 26 03:07:31 computerName com.apple.backupd[522]: Backing up to: /Volumes/Time Machine Backups/Backups.backupdb
    Nov 26 03:07:32 computerName com.apple.backupd[522]: Event store UUIDs don't match for volume: Macintosh HD
    Nov 26 03:07:32 computerName com.apple.backupd[522]: Node requires deep traversal:/ reason:must scan subdirs|new event db|
    Nov 26 03:10:18 computerName mds[34]: (/Volumes/Time Machine Backups/.Spotlight-V100/Store-V1/Stores/039F4DE9-98EB-4474-A60B-665902E6BC99)(E rror) IndexSDB in dbflushdatastore:/Volumes/Time Machine Backups/.Spotlight-V100/Store-V1/Stores/039F4DE9-98EB-4474-A60B-665902E6BC99/st ore.db : dbsyncdatastore: !WARNING! prior write-errors invalidate sync.
    Nov 26 03:10:18 computerName mds[34]: (/Volumes/Time Machine Backups/.Spotlight-V100/Store-V1/Stores/039F4DE9-98EB-4474-A60B-665902E6BC99)(E rror) IndexCI in _ContentIndexSyncIndexBulk:preSync error:22 0
    Nov 26 03:10:18 computerName mds[34]: (/Volumes/Time Machine Backups/.Spotlight-V100/Store-V1/Stores/039F4DE9-98EB-4474-A60B-665902E6BC99)(E rror) IndexSDB in dbflushdatastore:/Volumes/Time Machine Backups/.Spotlight-V100/Store-V1/Stores/039F4DE9-98EB-4474-A60B-665902E6BC99/st ore.db : dbsyncdatastore: !WARNING! prior write-errors invalidate sync.
    Nov 26 03:10:18 computerName mds[34]: (/Volumes/Time Machine Backups/.Spotlight-V100/Store-V1/Stores/039F4DE9-98EB-4474-A60B-665902E6BC99)(E rror) IndexCI in _ContentIndexSyncIndexBulk:preSync error:22 0
    Nov 26 03:11:00 computerName com.apple.backupd[522]: Error: Flushing index to disk returned an error: 0
    Nov 26 03:11:00 computerName com.apple.backupd[522]: Backup canceled.
    Thanks for any pointers you can provide.
    - Evan

    evan_j wrote:
    Hi Pondini!
    Thanks for your help.
    I added the entire Time Machine disk to the spotlight privacy exception, waited for a bit, and removed it. From this line, I assume that it triggered the re-indexing of the drive:
    Nov 27 10:26:58 computerName mds[34]: (Normal) DiskStore: Creating index for /Volumes/Time Machine Backups
    Yup.
    I think one of the issues was that I had the power settings to shut down disks.
    That shouldn't be a problem, as they should "spin up" when necessary. Some external HDs respond to that setting, some don't -- they have their own settings. But unchecking the option sometimes fixes the problem, so at least you know what it is.
    Nov 27 05:57:05 computerName mds[34]: (/Volumes/Time Machine Backups/.Spotlight-V100/Store-V1/Stores/039F4DE9-98EB-4474-A60B-665902E6BC99)(E rror) IndexSDB in dbflushdatastore:/Volumes/Time Machine Backups/.Spotlight-V100/Store-V1/Stores/039F4DE9-98EB-4474-A60B-665902E6BC99/st ore.db : dbsyncdatastore: !WARNING! prior write-errors invalidate sync.
    Nov 27 05:57:05 computerName mds[34]: (/Volumes/Time Machine Backups/.Spotlight-V100/Store-V1/Stores/039F4DE9-98EB-4474-A60B-665902E6BC99)(E rror) IndexCI in _ContentIndexSyncIndexBulk:preSync error:22 0
    . . . {that pair of lines repeats ~ 6 times} . . .
    Nov 27 06:15:16 computerName mDNSResponder[35]: PenaltyTimeForServer: PenaltyTime negative -180458, (server penaltyTime -1014959037, timenow -1014778579) resetting the penalty
    It repeats the 1st and 2nd lines every ~ 6 minutes, then the PenaltyTimeForServer, then the cycle starts again.
    Any ideas?
    The UUID mismatch message sent by backupd in your first post is because TM hasn't completed a backup, and isn't sure what's changed on your system and needs to be saved. So it does a "deep traversal," comparing your system to the backups (that's the "scanning" in the messages). That has to be repeated every time, until a backup is completed. On subsequent backups, it can use a log of changes that OSX keeps, and will be much quicker.
    It sounds like something is corrupted, somewhere. Exclude your TM drive from Spotlight again,but leave it excluded. Verify your internal HD and Repair the TM drive again. (Unfortunately, those will find directory errors and the like, but not necessarily problems within files.)
    Then try another backup.
    How old is your external HD? Are you just starting with TM or that disk, or have you been backing-up successfully for a while?
    Are you running any kind of Sync application? A couple of the messages mention some sort of sync, but I don't know enough about Spotlight to know whether that's relevant.
    Are you running Windows via Parallels, VmWare, or the like?

  • Publishing an ERD to a file fails without feedback

    I am using Designer 10.1.2.0.2 and am trying to publish an ERD to a jpeg file. I have tried turning on diagnostics but get no indication of errors, warnings, or failures in the log file. I can edit and save changes to the ERD but cannot get it to write to a local file on my Windows XP 2002 Sevice Pack 3 system. Any suggestions are welcome.

    Will this work around do the trick?
    Choose select all from the edit menu and then copy the elements of the ERD (edit -> copy). Then open i.e. Microsoft Paint and paste the ERD inside paint. Now you are able to save your ERD as jpeg.
    Regards,
    Mark

  • Deleted Files in Lightroom, any way to recover??

    I deleted hundreds of photos in lightroom, and I think they also got deleted from the folders that I exported them too because they are now missing.
    When I deleted them they went into my trash, and then I went on and emptied my trash.
    I don't have their thumbnails or anything, is there any way I can get these back?! It's an emergency!!!!!
    Thanks!!

    Well, you can try downloading and installing and running something called an "Undelete Utility". There are freeware ones available. If you are going to do this, do not do anything else on your computer.
    Also, develop a comprehensive and automated backup strategy so that this won't ever happen again.

  • Acrobat x installation failed without any error message

    I installed Acrobat X on Window 7 (64-bit) from downloaded files. The installer poped up the installation options up to the typical or custom installation. After clicking "Next", nothing happened. I have already disabled the antivirus software and my Win 7 has the latest updates installed. In addition, I also tried the downloaded trial version of the Acrobat X from Adobe. But nothing happened either after clicking "Next" in the final stage of the installation options. Does anybody know how to solve this problem? Thanks a lot.  

    Troubleshoot with install logs
    Mylenium

  • Adobe Cloud subscription  fails without any explicacion

    I have subscribed to the Creative Cloud ( my id = [email protected] ) and I got the Adobe Application ;Manager.
    I was able to download Lightroom 5 and Illustrator but I met many surprises.
    Updating Photoshop CS6 I get the error message U44M1P7 no explanation is available ( it repeats )
    Today the Adobe Application  Manager starts updating itself , dies in the process and results elñiminated from the
    system.
    Today I tried to download Photoshop CC from this site and it does not work.
    What is wrong?

    Log Ceative Cloud site, download AAM 7 and install it.
    Mylenium

  • Validation with data file failed

    Hello All
    I have loaded the Currency Exchange Rates from BW cube into Rate Model in BPC upto March 2014 and then our BW cube get updated the Exchange Rates for April 2014.
    Now I am trying to load the Exchange Rates for April 2014 only into Rate model and for that I am validating the Transformation File but it was failed. It shows 'VALIDATION WITH DATA FILE FAILED'.
    Rejected list option showing blank screen.
    With the same Transformation file I have loaded the data upto March 2014 successfully.
    I have compressed the source cube, reactivate the source cube after all am unable to validate the Transformation file. Below is my transformation file screen shot.
    Please let me know if you need any more details from my side.
    Thanku you all in advance.
    Please help
    Regards
    Srikant

    Hi Shaik
    Thanks for your reply.
    I have validate the Transformaiton file by given vlaue in MAXREJECTCOUNT= 10000 but there is no chage same error is coming. 'Validation with data file failed' without any errors.
    Thanks
    Srikant

  • Could'nt delete file after processing  sender file in windows environment ?

    Hi,
    I have problem with sender file adapter in windows 2003 server, because the file adapter cannot delete the file after processing, seems like permission problem. but then i have set full controll access to the pi7adm (sap instance admin). but the problem still persist.
    Please advise, me.
    Thank you and Best Regards
    Fernand

    Hi,
    Of course i set delete option in my CC sender, but the fail adapter couldn delete fail without any reason ?
    This is the error message from RWB Could not delete file 'K:\WORKDIR\FTP\data\data1.fer1' after processing.
    like i mention before i have set full access to sap admin user to the directory. but the error still persist.
    any idea.
    Cheers
    Fernand

  • Update for photoshop cs5 not working, deletes files before installl happens

    My computer crashed, so I rebuilt it.  I installed photoshop CS5 with no errors.  I go to update it and it downloads without any problems.  Then when it goes to install it errors out.  I found that just as one part of the update is 100% downloaded, it is deleted.  And this happens for each and every part of the update, so when it goes to install the updates, there is no files to do that with. 

    I went to that web site and downloaded those files.  And what happens?  Most of the files extract without any problem, but the one that errror out on every single one I downloaded was the AdobepatchInstaller.exe.  I have 2 computer and tried it on both computers and both said the same thing.  When it does extract it, it says it is corrept.  So now how is that my computers fault????

Maybe you are looking for

  • BW Hierarchy in WebI report: strange behaviour

    Hi experts, I faced with an (apparently) strange WebI behaviour. I'm working with SAP BW 7.0 and BO XI 3.1 SP 2. I have a universe built on a BEx query and the BEx query is built on a multiprovider (with 2 infoCubes inside). The universe maps a BW hi

  • Onedrive for Business, lost files

    I am missing about 80% of content. Random folders and files have disappeared and are not available online. They are also not in the recycle bin.

  • File damaged- how can i fix it

    I am able to open the iphoto but it closes in less than 15 seconds. the file is damaged,should i trash it and reinstall?

  • Merging 2 datasources at Array level

    I am trying to merge 2 data sources into 1 to be used as a data provider for an AdvancedDataGrid: Originally I have this for a single data source: var dsrc:Array = new Array(); dsrc.push({col1:val1,col2:val2}); dsrc.push({col1:val3,col2:val4}); Now I

  • Determine if signal is changing?

    Quick question: I am acquiring a simple voltage signal from a pressure sensor.  And I am building a simple LabVIEW GUI for calibrating the measurement. For the calibration, I am applying a knopwn pressure to the sensor.  And then I want to use LabVIE