What could cause a WP7 application to crash without exception

I have an application that works fine on a device emulator, but on a real device it will work after a while. This can happen in a few minutes, as well as in 1-2 hours. The problem arises with both the device and the connection to the visual studio.

The fact is that an exception is not thrown, VS just reports that the connection was lost. I really checked if I use too much memory, but it is not (http://stackoverflow.com/questions/4239193/whats-causing-my-wp7-app-to-crash).

What could cause applications to crash without throwing exceptions?

+6
source share
4 answers

It may crash without a visible exception at fooobar.com/questions/88025 / ....

When debugging, you can detect this exception by adding an event handler to Application.UnhandledException and writing the details of the exception in the Debug.WriteLine method. The result is displayed in the Visual Studio output / debug window.

  private void OnAppUnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) { Debug.WriteLine(e.ExceptionObject.ToString()); } 
+4
source

You may receive an alarm that will not be detected if this occurs in a thread other than the UI. Test your asynchronous calls.

In addition, any error in the code that is executed in response to the action of an application bar item or menu item can cause this behavior.

+2
source

It is possible that the physical device does not exactly match the emulation configuration. You can send an error message to an output stream that does not exist on the device, or send it to something that is local to the emulator and the remote device.

In addition, you can simply fulfill various conditions that will lead you to a clean exit.

The emulator probably works clean compared to all background applications on many devices.

Registration and debugging are your friends.

Your question is interesting, but it lacks details.

+1
source

I had several instances of the wrong xaml application crashing.

You can change the settings in visual studio for exceptions to break all exceptions to keep track of what's happening.

0
source

Source: https://habr.com/ru/post/888840/


All Articles