Gar*_*ith 5 crash debugging in-app-purchase win-universal-app
我有一个应用程序,当前在尝试在Windows Phone 10上进行应用程序内购买时有时会崩溃。它似乎在崩溃时未引发异常。我在想,也许另一个线程使应用程序崩溃了?但是,似乎没有该应用程序的UnhandledException事件正在调度。
RequestProductPurchaseAsync(sku)。RequestProductPurchaseAsync(sku)显示之前的日志并将其写入磁盘。OnUnhandledException。等待Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,async()=>
{
尝试{
如果(IsSimulation){
PurchaseResult =等待CurrentAppSimulator.RequestProductPurchaseAsync(sku);
}
其他{
Debug.Log(“ PurchaseProductAsync正在尝试真正的购买!”);
//使此调用崩溃约5秒。没有异常被抛出。
PurchaseResult =等待CurrentApp.RequestProductPurchaseAsync(sku);
//这不会显示。
Debug.Log(“ PurchaseProductAsync得到了结果” +(purchaseResult == null?“ null”:purchaseResult.Status.ToString()));
}
}
catch(Exception PurchaseExc){
PurchaseResult = null;
result.ErrorCode =“ -285”;
result.ErrorException = PurchaseExc;
result.ErrorMessage =“异常错误”;
Debug.Log(“尝试从CurrentApp或CurrentAppSimulator进行购买时,PurchaseProductAsync发生异常。
}
});
关于如何捕获或调试此崩溃的任何想法?
public App()
{
this.InitializeComponent();
appCallbacks = new AppCallbacks();
UnhandledException += OnUnhandledException;
}
private void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
// Never seems to run
Debug.Log("Received unhandled exception");
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
973 次 |
| 最近记录: |