Search code examples
htmlvisual-studiowindows-8windows-store-appswinjs

Visual Studio 2012 JS/HTML5 Win 8 newly created project crashes


My project kept crashing after being swiped-down minimized with a code 1.

Debug Output:

'WWAHost.exe' (Script): Loaded 'Script Code (MSAppHost/1.0)'. The program '[7048] WWAHost.exe' has exited with code 1 (0x1).

I couldn't find any problematic function so as a test I created a brand new project and just built and ran it. It crashed with the same code perhaps 30 - 45 seconds after being swiped down.

I searched here, Google, and the MSDN and couldn't find any info.

Any pointers?

Thanks.


Solution

  • Swiping down is actually closing the app, not minimizing it, and Visual Studio is just telling you that the app's process was terminated (due to user/system command) with the exit status.

    That message is expected behavior and no cause for concern, unless you also see a runtime error before that exit message.

    BTW, you can debug suspend & terminate events from Visual Studio while the app is running via the Debug Locations toolbar or the Debug menu. In some cases, you might write code to react to being suspended/terminated (e.g. to save state/data). There's more on Windows Store app lifecycles if you're interested.