我有一个
Windows pone应用程序工作得很好,除了它从Tombstonning回来,然后相当随机它默默地退出执行相同的命令一些.
我已经设置VS2012暂停任何第一次机会异常但没有任何反应:
我还有以下事件的处理程序:
this.application.UnhandledException += this.OnApplicationUnhandledException; this.application.RootFrame.NavigationFailed += this.OnRootFrameNavigationFailed; AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
没有任何处理程序被调用:S
我所拥有的唯一信息是输出中的以下行,这对我没有任何意义.任何帮助都会非常好,谢谢.
The program '[1040] TaskHost.exe' has exited with code -2147483645 (0x80000003).
编辑:最后我将问题追溯到以下行:
Contract.Requires<ArgumentNullException>(bitmap != null,"Bitmap cannot be null.");
即使位图变量不为null,应用程序也会退出.任何的想法?
解决方法
似乎这是CodeContracts API的缺陷.
呼叫:
Contract.Requires<ArgumentNullException>(bitmap != null,"Bitmap cannot be null.");
有时使应用程序退出(位图不为空的事件),唯一的信息是:
The program ‘[1040] TaskHost.exe’ has exited with code -2147483645 (0x80000003).