Application crashes without throwing any exceptions in Windows Phone 8.1 xaml

I am creating a xaml application for Windows 8.1. And I used SlideView: a Facebook-like panel for Windows Phone . But the application crashes every time I go to a new page by pressing the button that fits inside the slide view. Navigation is carried out from the appearance of the button.

The bad thing is that it does not throw any exceptions or details. Even it does not fall into the App UnhandledException event.

  public App() { this.InitializeComponent(); this.UnhandledException += App_UnhandledException; } void App_UnhandledException(object sender, UnhandledExceptionEventArgs e) { //not throwing exception here } 

I want to know when this will happen? How to get exception information from which the application crashed? I can solve the problem if I can get the exact problem.

Please provide me a solution. My sample is here

+6
source share
1 answer

I don’t know why, but ... If you just added something to the secnod page and the problem secnod away.

 <Grid> <TextBlock Text="second" /> </Grid> 

I also cannot catch the exception anywhere. Previously, I had similar problems, and I had to delete the code piecemeal to eliminate an exception ... Obviously, something is wrong in the WinRT structure.

Update

No, the above answer still does not correct it. After some further investigation, I found the right way to get rid of the accident in order to call Dispatcher . I believe this is a bug that appeared in Update 1. See the link for reference.

 private async void ButtonBase_OnClick(object sender, RoutedEventArgs e) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => Frame.Navigate(typeof(second))); } 
+5
source

Source: https://habr.com/ru/post/980347/


All Articles