I have a monodroid application that terminates without any notice. When it hits an exception the application just terminates. It was deployed to the device using "Start without debugging" from Visual Studio. When I run it with the debugger in visual studio I do get a break on an exception. Is this normal behaviour for the application to just terminate?
Yes, this sounds perfectly normal. If your application encounters an unhandled exception it will crash, terminating completely. You can take a look at the Android Debug Log to see a log of what happened, including the stacktrace produced from any crashes of the application.
Related
After upgrading to Xcode 11.3, our app throws an exception when running on an iOS 13.3 device. The exception does not occur at the same place every time, and the log indicates the exception is coming from com.apple.CoreAnalytics (see below). The exception is only thrown once. And, the exception is NOT thrown when I run the app on the simulator. Thanks in advance for your thoughts and ideas!
Sometimes Apple's frameworks use exceptions as an internal messaging technique. They probably shouldn't do that, but the frameworks contain a lot of old code that doesn't always follow best practices. There is no harm done, because the framework, having thrown the exception, also catches it, which is why you run fine if the app just runs without the debugger. But if you run from Xcode and you have set an Exception Breakpoint, you will pause after the throw but before the catch. It looks like that's what's happening. So just remove that breakpoint.
I have created a Xamarin.Forms barcode scanning app with Android and iOS projects. The Android build appears to run fine, but the iOS build occasionally crashes and I am struggling to pin down the cause, as no crash log is produced and no exception is reported in the application output.
Under heavy load (non-stop barcode scanning) the app crashes after typically 200 or 300 barcodes have been scanned.
I am puzzled how such a crash can occur, leaving absolutely no evidence of its cause. Is there somewhere else I should be looking for the evidence, apart from within Xcode's Devices window? Shouldn't I expect an exception to be reported in the application output, while debugging?
I have implemented logging handlers for AppDomain.CurrentDomain.UnhandledException and TaskScheduler.UnobservedTaskException but they don't appear to be called. Is there some other way I can instrument my code to trap the cause of this crash?
Many thanks for your advice,
Tim
To get some output I always hit the continue button in visual studio debugger. The application stops, and for some reason I can see an exception in the output. Hope this helps.
I got this warning when running my application with HockeyApp integration:
[HockeySDK] WARNING: Detecting crashes is NOT enabled due to running the app with a debugger attached.
Crash reports are not sent and no alert is displayed when opening the app again.
Any one have any idea how to resolve this issue?
This has very simple reasons:
If you are running the app with Xcode attached, your app is connected to lldb, Xcode's debugger. When lldb is attached, it will of course do its job as a debugger and catch any exception or crash that occurs. This means that the crash can never reach the HockeyApp SDK or any other crash reporting SDK while lldb is attached at the same time.
The solution is also pretty simple. If you just want to make sure the SDK is integrated properly and will catch crashes, do the following:
Do a quick "Build & Run" to install the current version of the app on the simulator or device.
Click the "Stop" button in Xcode to stop the debugging session.
Manually start the app on the device or simulator by tapping or clicking the app icon.
Cause a crash.
Restart the app. Now the HockeySDK should process the crash report and show a dialog to approve crash log sending.
One thing to keep in mind: Make sure to not make the app crash immediately after app start as this would not give the SDK enough time to process and send the crash report before crashing again.
Hockey app sdk by default does not send report when a debugger is attached. There is nothing wrong with this.
It will send report when a archive build that release to ur tester cause a crash. I personally think this should and remain as this because you are trying to track crashes from your tester not when you are developing.
I have an application in Windows Phone 8.1. I debug it in an actual device and it works ok. However, when I run the app outside the visual studio, sometimes (random) it crashes.
Is there any way to see if there is an exception? In Android and iOS you can see the log although application is not running on Debug.
I think maybe it could be a memory problem, I load a lot of data. How can I check if this is the problem?
Thank you very much
There is no automatic logging for you, but you can use the global exception event:
Application.Current.UnhandledException += ...
There you can get your exception: Put it in a log file, just show a message dialog, etc.
I found a solution, where I was getting not enough quota is available to process this command windows phone 8.1
Windows phone 8.1 have bug for navigate frame.
I replaced :
Frame.Navigate(typeof(SecondXAML));
To :
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => Frame.Navigate(typeof(SecondXAML)));
guys now no above exception. not enough quota is available to process this command windows phone 8.1
Tested 100 times calling. not crashing.
I've been testing AppCode and I can't seem to find any information as to WHY an app is crashing.
I've added an exception breakpoint and I can see the line of code causing the crash but no info on why.
In Xcode the exception reason is printed into the console but in AppCode I just get "Exception = Exception Breakpoint".
Can someone point me in the direction of getting useful information out of the crash.
AppCode, Choses Run, View Break points settings, Click on "Log message to console" by default it is off.
Command liners use, shift-fn-command-f8
AppCode also prints the exception in the console, providing that you launch the app in debug mode (as, actually, the debugger does it).