好这个问题,从这个问题源于: wp7: App failing! Can not figure out where?测试应用程序未能在后退按钮... Windows Phone 7的
我认为这已得到纠正,但它仍然是失败的。我撕掉了所有的app.xaml.cs代码,当点击搜索按钮并立即按下后退按钮时,它仍然崩溃。
所以...我决定看看我是否可以用一个新的测试应用程序复制这个问题。基本上我用默认的主视图模型创建了一个基本的数据透视应用程序。我的代码不存在...
我按下搜索按钮,然后立即按下后退按钮,然后看到...同样的事情发生....它崩溃了应用程序,模拟器显示一个空白屏幕调试器停止!
所以...这使我相信我发现了一个模拟器中的错误(我觉得这很难相信)...或者,我的Studio环境可能已损坏(我希望它是不)。
我不确定该去哪里。我不知道错误是什么,它阻止了我的应用程序在市场上被接受。
有没有人有任何想法?
我做了我所看到的屏幕截图:
注意,一日3搜索/回连击兼用作搜索屏幕框被允许显示。然而,在过去2个搜索/回连击不工作,你会看到箱子不允许显示...
http://www.youtube.com/watch?v=XVht3OtBGaI
错误报告我从微软获得:
Comments: The application reactivate after deactivation and terminates unexpectedly.
Steps to reproduce:
1) Launch the application.
2) Select a vehicle.
3) Press the device's "Start" button.
4) Select the device's "Back" button.
5) Observe the application terminates unexpectedly and does not reactive the application.
This error is reproducible 8 out of 10 times.
从不同的应用程序中的其他错误报告:
Comments: The application terminates rather than resuming when the user attempts to return from a Search.
Steps to reproduce:
1. Launch the application
2. Select the Add + button
3. Press the Search button
4. Press the Back button
5. Observe the application terminates after a few seconds.
我注意到:
当以下在调试器中发生:
The thread '<No Name>' (0xd1b0092) has exited with code 0 (0x0).
The thread '<No Name>' (0xd6900ba) has exited with code 0 (0x0).
这所描述的(时间的100%),该项目不会失败。但是,如果在此之前单击后退按钮,则应用程序将失败(100%的时间)。
更新#1:App.xaml.cs
// Code to execute when the application is launching (eg, from Start)
// This code will not execute when the application is reactivated
private void Application_Launching(object sender, LaunchingEventArgs e)
{
}
// Code to execute when the application is activated (brought to foreground)
// This code will not execute when the application is first launched
private void Application_Activated(object sender, ActivatedEventArgs e)
{
// Ensure that application state is restored appropriately
if (!App.ViewModel.IsDataLoaded)
{
App.ViewModel.LoadData();
}
}
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
}
// Code to execute when the application is closing (eg, user hit Back)
// This code will not execute when the application is deactivated
private void Application_Closing(object sender, ClosingEventArgs e)
{
// Ensure that required application state is persisted here.
}
您是否正在处理取消激活/以任何方式激活?你能否断断续续地看到什么地方出现故障? – 2011-04-17 05:13:39
@willmel - 这是基本的代码。看到我更新的问题。基本上这个项目是一个全新的项目,除了Pivot应用程序附带的示例数据之外,没有任何代码。 – webdad3 2011-04-17 13:06:31
@Jeff V:你确定这个应用程序崩溃了吗?它不仅仅是当你在墓碑时退出调试器然后返回到应用程序?启动应用程序,然后选择第二个数据透视表项目。现在点击搜索并返回,当模拟器屏幕为空并且调试器已停止时,再次在Visual Studio中运行应用程序(F5)。如果应用程序启动时选择了第二个数据透视表项,则问题只是调试器在应用程序被逻辑删除时退出。 – Praetorian 2011-04-17 13:17:34