Reputation: 10971
I'm building a Windows 8 app.
My problem is when the user switches to another app or goes to start, the app terminates. In the side bar I find the preview of the app to be displaying the splash screen, when I click on the app it starts from the beginning.
What can be the problem here, could it be a memory issue ? In the task manager my app takes 40 MB of memory, is that too much ?
The Event Viewer shows the following when the app crashes:
Application: MyApp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: MyApp.Common.SuspensionManagerException Stack: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Threading.WinRTSynchronizationContext+Invoker.b__0(System.Object) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Upvotes: 0
Views: 177
Reputation: 29963
From your stack trace it looks like the suspension manager is throwing an exception. The most common cause of exceptions I've found in the suspension manager is in trying to pass complex objects between pages as a navigation parameter. If you are passing a complete business object around, then try just passing the ID. I know it's crazy, but that's the way it is with the default implementation.
Upvotes: 2