none
WinJS.Application.sessionState not working anymore?

    Question

  • Hi,

    I've noticed that the winjs sessionState doesn't work anymore.

    Used the sample from Microsoft and i got this error:

    App <ActivationAndLifetimeBasic> terminated itself by calling terminateApp API. App details are as follows:  Display Name:<Activation and Lifetime JS Basic sample>, AppUserModelId: <Microsoft.SDKSamples.ActivationAndLifetimeBasic.JS_8wekyb3d8bbwe!ActivationAndLifetimeBasic> Package Identity:<Microsoft.SDKSamples.ActivationAndLifetimeBasic.JS_1.0.0.0_neutral__8wekyb3d8bbwe> PID:<3064>. The API was called from the context of the following HTML document:  </default.html>. Error object passed to terminateApp carried the following details Description:<{"description":"Unspecified error\r\n","number":-2147467259,"stack":"WinRTError: Unspecified error\r\n\n   at getResultsOfAsyncOp (Function code:338:5)\n   at completed (Function code:427:21)","asyncOpType":"Windows.Foundation.IAsyncOperation`1<Windows.Storage.StorageFile>","asyncOpSource":{"stack":"\n   at writeText (ms-appx://microsoft.winjs.2.0/js/base.js:10179:17)\n   at _oncheckpoint (ms-appx://microsoft.winjs.2.0/js/base.js:10399:17)\n   at Application_checkpointHandler (ms-appx://microsoft.winjs.2.0/js/base.js:9556:17)\n   at dispatchOne (ms-appx://microsoft.winjs.2.0/js/base.js:9427:53)\n   at dispatchEvent (ms-appx://microsoft.winjs.2.0/js/base.js:9427:17)\n   at drainOneEvent (ms-appx://microsoft.winjs.2.0/js/base.js:9469:13)\n   at drainQueue (ms-appx://microsoft.winjs.2.0/js/base.js:9486:9)\n   at Anonymous function (ms-appx://microsoft.winjs.2.0/js/base.js:2952:17)\n   at enter (ms-appx://microsoft.winjs.2.0/js/base.js:2951:13)\n   at _setState (ms-appx://microsoft.winjs.2.0/js/base.js:2667:13)"},"asyncOpCausalityId":121}>, and Stack Trace:- WinRTError: Unspecified error


       at getResultsOfAsyncOp (Function code:338:5)
       at completed (Function code:427:21)

    The app simply crashes on suspend and fails to save the sessionState object to disk.

    Anyone else has this problem to? Have ideas on how to solve this problem?

    Using Windows 8.1 (6.3.9600) x64 with updates up to date.

    Saturday, January 11, 2014 11:17 PM

Answers

All replies

  • SessionState should work, and I don't have any obvious issues with the App activate and suspend using WinJS sample

    Are you using the sample unchanged? Does the problem occur only when naturally suspending or do you also see it under the debugger with the suspend button?

    Do you have trouble with other apps? SessionState is used frequently.

    --Rob

    Sunday, January 12, 2014 1:42 AM
    Owner
  • i am using the sample as is, no changes.

    the problem occurs both normaly and forced (using the debugger buttons).

    i am having this problem with other apps to.

    also worth mentioning that i didn't have this problem before upgrading to 8.1 
    Sunday, January 12, 2014 11:05 AM
  • It sounds like you have a lower level problem on that machine not specific to your code.

    For help with diagnosing system issues please post on the Windows 8.1 forum on http://answers.microsoft.com .

    --Rob

    Tuesday, January 14, 2014 2:41 AM
    Owner
  • re-installed windows 8.1 (directly, not through roll-up) and all issues are solved... maybe something went wrong with the upgrade from 8.0 to 8.1, who knows
    Wednesday, January 15, 2014 6:25 AM