locked
Metro App crashed with WWAHost error RRS feed

  • Question

  • Hi there:

       I am writing a metro app with Javascript which means the UI data have to be written in several files verfy quick.

       But the app will crash when I click the write file button very fast.

       any suggestiongs?

       Looking forwaed to hearing form u.

       Function fragment following:

     function writeSchemeJSON(fileName, jsonObj) {
            schemeErrorContent = jsonObj;
            Windows.Storage.KnownFolders.documentsLibrary.createFileAsync(filePath + fileName, Windows.Storage.CreationCollisionOption.replaceExisting).done(function (file) {
                if (file !== null) {
                    var seri = JSON.stringify(jsonObj, null, null);
                    Windows.Storage.FileIO.writeTextAsync(file, seri).done(function () {
                        seri = null;
                        schemeErrorContent = null;
                    }, function (err) {
                        console.log("error block*****************");
                        //var seri = JSON.stringify(schemeErrorContent, null, null);
                        //Windows.Storage.KnownFolders.documentsLibrary.createFileAsync(filePath + fileName, Windows.Storage.CreationCollisionOption.replaceExisting).done(function (errorfile) {
                        //    Windows.Storage.FileIO.writeTextAsync(errorfile, seri).done(function () {
                        //        seri = null;
                        //        schemeErrorContent = null;
                        //    });//end of the errorFile write
                        //});//end of the errorFile Create
                    });
                }
                file = null;
            }, function (err) {
                console.log("error ************************");
                //Windows.Storage.KnownFolders.documentsLibrary.createFileAsync(filePath + fileName, Windows.Storage.CreationCollisionOption.replaceExisting).done(function (errorfile) {
                //    var seri = JSON.stringify(schemeErrorContent, null, null);
                //    Windows.Storage.FileIO.writeTextAsync(errorfile, seri).done(function () {
                //        seri = null;
                //        schemeErrorContent = null;
                //    });//end of the file create error
                //});//end of the errorFile Create
            });
            return;
        }

       Here is the error log:

      
    - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    - <System>
      <Provider Name="Application Error" /> 
      <EventID Qualifiers="0">1000</EventID> 
      <Level>2</Level> 
      <Task>100</Task> 
      <Keywords>0x80000000000000</Keywords> 
      <TimeCreated SystemTime="2012-03-21T02:54:06.000000000Z" /> 
      <EventRecordID>4338</EventRecordID> 
      <Channel>Application</Channel> 
      <Computer>StephenWin8</Computer> 
      <Security /> 
      </System>
    - <EventData>
      <Data>wwahost.exe</Data> 
      <Data>6.2.8250.0</Data> 
      <Data>4f3f0567</Data> 
      <Data>jscript9.dll</Data> 
      <Data>10.0.8250.0</Data> 
      <Data>4f3f09a0</Data> 
      <Data>c0000005</Data> 
      <Data>000000000024d03f</Data> 
      <Data>6ae4</Data> 
      <Data>01cd070de1632b14</Data> 
      <Data>C:\Windows\system32\wwahost.exe</Data> 
      <Data>C:\Windows\System32\jscript9.dll</Data> 
      <Data>1f3a5715-7301-11e1-a142-dc0ea15f5b4f</Data> 
      <Data>cf9bf850-55db-409c-bb2a-6ea592e93836_1.0.1.1_neutral__53scd2b84cp4g</Data> 
      <Data>App</Data> 
      </EventData>
      </Event>

    Wednesday, March 21, 2012 3:27 AM

Answers

  • Disable the button before you start to write the data, then re-enable the button after the write is complete.  I imagine you are suffering from trying to write to the same thing at teh same time.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, March 21, 2012 7:32 PM
    Moderator

All replies

  • Disable the button before you start to write the data, then re-enable the button after the write is complete.  I imagine you are suffering from trying to write to the same thing at teh same time.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, March 21, 2012 7:32 PM
    Moderator
  • Thanks Jpsanders.actually, my question is about the async error. I want to know why the async function failed when I write/read file very fast.anyway.Thanks a lot.:)
    Tuesday, March 27, 2012 2:07 AM