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