WP7: NavigationFailed on app shutdown

Jan 21, 2011 at 10:26 AM

I have a Game control in the main page of a WP7 app.

When I exit the app with the 'back' button, I almost always have a NavigationFailed exception: the app tries to navigate to GamePage.xaml (not 100% sure of the name, I don't have the app here right now) which does not exist in my project. I have no reference to that page in my project, so I guess it's something internal to the component.

This is difficult to track with the emulator (the app simply hangs on shutdown and stays there until you stop), but is easy to reproduce on the device.

Is this a known issue or I'm doing something wrong? If it's an issue, is there a workaround?



Jan 23, 2011 at 1:51 PM

I've now reproduced the issue: it suffices to create an empty WP7 application, as soon as you put Balder.Display.WP7.Display.Initialize(); in the App_Launching event, the application does not quit.

When you hit back in the main page the page unloads but the application stops responding. This happens in the emulator as well.

At some point I observed the mentioned "navigation to GamePage.xaml failed" error, but most of the time with the debugger attached the app just does not respond.

Jan 29, 2011 at 11:46 AM


when the BackKey is pressed you can call the following : 


That should uninitialize everything that is needed and gracefully exit everything.


Jan 29, 2011 at 11:50 AM
Great, I'll try it this evening!
Jan 29, 2011 at 8:42 PM

Weird, this doesn't seem to solve the problem.

After calling UnregisterGame the app is still stuck at shutdown and often tries to navigate to GamePage.xaml. Very weird also because I can't find any reference to GamePage (or anything related) in the Balder source.

Tombstoning on the other hand works fine.

Jan 29, 2011 at 10:36 PM

That is weird. I had an app that got approved in the marketplace with this method in it. But to be honest, I haven't spent much time on this - so this is something I will be looking into. 


Jan 29, 2011 at 10:36 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.