2011-04-17 70 views
0

好这个问题,从这个问题源于: 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. 
} 
+0

您是否正在处理取消激活/以任何方式激活?你能否断断续续地看到什么地方出现故障? – 2011-04-17 05:13:39

+0

@willmel - 这是基本的代码。看到我更新的问题。基本上这个项目是一个全新的项目,除了Pivot应用程序附带的示例数据之外,没有任何代码。 – webdad3 2011-04-17 13:06:31

+0

@Jeff V:你确定这个应用程序崩溃了吗?它不仅仅是当你在墓碑时退出调试器然后返回到应用程序?启动应用程序,然后选择第二个数据透视表项目。现在点击搜索并返回,当模拟器屏幕为空并且调试器已停止时,再次在Visual Studio中运行应用程序(F5)。如果应用程序启动时选择了第二个数据透视表项,则问题只是调试器在应用程序被逻辑删除时退出。 – Praetorian 2011-04-17 13:17:34

回答

1

好吧,在我的头撞在我的桌子上几个小时后,我发现一些机器上的模拟器有我遇到的同样的问题。

所以...我做的第一件事就是将我所有的函数都封装在Try/Catch块中......即使是最小的函数和那些不会出错的函数。然后我一边加载应用程序,看看我是否可以让它崩溃。当我觉得我在手机上进行了充分测试后,我重新提交了该应用程序。在测试笔记部分,我要求他们在设备上而不是仿真器上进行测试。我从来没有听说过他们是否这样做,但他们通过我的应用程序,所以我猜他们做到了。

感谢@Praetorian和@Matt Lacey和@willmel以及其他任何为我看过这个问题的人。我很感激!

0

我也注意到,如果你创建一个新的WP7应用程序,这也happend。 创建一个新的应用程序。启动它。 当它开始时,按开始按钮并立即点击后退按钮。它现在说Resuming ..但没有任何反应。 当您尝试重新启动应用程序时,您只能看到闪屏。

但我发现,如果你建立一个使用构建=释放和不调试应用程序应用程序(在设备上运行),则它不会发生..

您可以检查这是你的情况下以及..如果是这样他们即时通讯也陷入困境

+0

如果它在设备上没有失败,那么您可以向应用程序提交技术例外请求,并建议他们在设备上进行测试,因为模拟器看起来运行不正常。或者在AppHub论坛上询问问题。 – Cyberherbalist 2011-04-18 20:45:33