I have a windows pone application working quite well except when it comes back from Tombstonning, then quite randomly it silently exits after executing the same command some times.
I have set VS2012 to pause on any first chance exception but nothing happens:
I also have handlers for the following events:
this.application.UnhandledException += this.OnApplicationUnhandledException;
this.application.RootFrame.NavigationFailed += this.OnRootFrameNavigationFailed;
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
None of the handlers gets called :S
The only information I have is the following line on the output which does not mean anything to me. Any help would be really good, thanks.
The program '[1040] TaskHost.exe' has exited with code -2147483645 (0x80000003).
EDIT: Finally I tracked down the problem to the following line:
Contract.Requires<ArgumentNullException>(bitmap != null, "Bitmap cannot be null.");
The application is exiting even when the bitmap variable is not null. Any idea?
Seems that this is a defect on the CodeContracts API.
Calling:
Contract.Requires<ArgumentNullException>(bitmap != null, "Bitmap cannot be null.");
makes the application exit sometimes (event with bitmap not null) with the only information being:
The program '[1040] TaskHost.exe' has exited with code -2147483645 (0x80000003).
Interestingly enough it is not the only case when unexpected exit happens. In my case it is related to a combination of WebBrowser control, Microsoft AdControl and UploadOperation/DownloadOperation. If I take at least one of those things out of the equation the application becomes rather stable but with all of them in the application at once it can unexpectedly exit practically at any time: when you scroll WebBrowser control content, when you pause or resume DownloadOperation, when AdControl content is refreshed at the same time something is changed on the screen. In my case the error code is 1. I wonder how to approach investigation of such problem to find more or less exact cause and try to minimize the probability of the exiting. I definitely cannot completely remove WebBrowser control or AdControl or DownloadOperation/UploadOperation but potentially I could "realign" something so to speak but what and where?
User contributions licensed under CC BY-SA 3.0