1
我正在開發Windows Phone 8.1應用程序。它適用於WP 8和WP 8.1的設備很好,但與Windows 10在設備上,它拋出Windows 10設備上的System.ExecutionEngineException
ExecutionEngineException was unhandled. An unhandled exception of type 'System.ExecutionEngineException' occurred in Unknown Module.
沒有什麼地方出了錯任何數據。有些地方,總是拋出異常,有些地方偶爾會拋出異常。下面的實施例的代碼拋出異常 - 它基本上是當按鈕(網格與圖像)被分接凸片,它們是StackPanels之間切換的方法:
private void Grid_Tapped(object sender, TappedRoutedEventArgs e)
{
if(!isMapVisible)
{
hideSection();
map_wrapper.Visibility = Windows.UI.Xaml.Visibility.Visible;
map_button.Background = new SolidColorBrush(ColorHelper.FromArgb(0xFF, 40, 110, 73));
map_icon.Source = new BitmapImage(new Uri(FileHelper.getIconPath("tu_2.png")));
isMapVisible = true;
}
}
private void hideSection()
{
if(isMapVisible)
{
map_button.Background = new SolidColorBrush(ColorHelper.FromArgb(0xFF, 238, 238, 238));
map_icon.Source = new BitmapImage(new Uri(FileHelper.getIconPath("tu.png")));
isMapVisible = false;
map_wrapper.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}
else if(isPhotoVisible)
{
photo_button.Background = new SolidColorBrush(ColorHelper.FromArgb(0xFF, 238, 238, 238));
photo_icon.Source = new BitmapImage(new Uri(FileHelper.getIconPath("photo_green.png")));
isPhotoVisible = false;
image_wrapper.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}
else if(isListVisible)
{
list_button.Background = new SolidColorBrush(ColorHelper.FromArgb(0xFF, 238, 238, 238));
list_icon.Source = new BitmapImage(new Uri(FileHelper.getIconPath("!2.png")));
isListVisible = false;
news_wrapper.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}
}
你可以標記引發異常的行嗎? – Stefan
我不能,因爲我不知道。我只知道在網格被點擊後我會得到異常,所以當上面的方法被觸發時。該例外沒有任何附加信息,並且Call Stack窗口也是空的。 – miecinka
你的圖像大小是多少? – Stefan