Windows App Not Fully Crashing, Black Screen

Hello, new C# dev looking for help. I am building a Windows 8.1 Store C# app and having some problems with the app not crashing and throwing errors. The app hangs up eventually and just shows a black or blank screen. Sometimes it will flicker for a bit before going fully black and unresponsive.

My application has a main page (XAML) with basic info on it, 7 buttons, and a flipview. When a button is clicked it loads the corresponding page within the app via "this.Frame(Navigate(typeof(PageName), null). These pages are a combination of blank page templates & splitview templates. They contain data bindings for the split pages and mostly webviews for the blank pages.

The app works fine, until I really start clicking buttons (to go to pages), then hit the back button (to go to main page). It works for roughly 15-20 page loads/back button combinations. The app then starts flickering the like a strobe and eventually it just goes to a black screen.

When the screen is black, the app is still running, no errors are output, no info in my debug window. At first I thought it might be a void async issue, but I am only using one in my code with a message that pops up to the user.

I have looked up unhandeled exceptions, but have not found a good way to implement it yet and I am not sure if it would catch this issue. Anyone with info on what this might be? Memory issue?

Also, I have a question about the back button functionality in windows store apps. I am using the back button provided with templates that has the command="Binding Navigationhelper.GoBackCommand, ElementName=pageroot". When this is envoked does it kill that page and remove it from memory… or do I need to manually do this? For example, if a page with a webview is loaded and the user hits back, does this kill that session and remove it from memory?

Thanks for any help and sorry about the length.

EDIT: I am also noticing that the app gets up to a 45% CPU usage and about 800MB of ram as well. Is this normal when running debug in Visual Studio 2013?

by sk8rgui via /r/csharp

Leave a Reply