My Xamarin (PCL) Android application suddenly randomly crashes when it released. It sometimes happens even when you are not currently using it and then message that app stopped working appears.
I wonder, is there any way to track whats going on, maybe there are some logs which I could have a look, or anything else to find out what the issue as I said it randomly happens and hard to find the problem.
Many thanks in advance.
A fast solution would be to plug your device and use the Android Device Monitor to see if it print out something on the device logs. A more reliable solution would be of course to integrate a crash reporter system like what the others have suggested or Crashlytics.
You might need to add a crash reporting tool like HockeyApp or VS App Center, or wire up your own global exception handler
Related
Since a while I am working with HoloLens2. My last OS-Versions were 10.0.18362.1005 and 10.0.19041.1109. I am developing with Unity 2019.4.7. My whole code was and still is running great on those old OS-Versions. Now I updated to OS-Version 21H1 and I have huge problems with everything including networking.
For example, my Mixed-Reality-WebRTC Pluging (from Microsoft), which only supports ARM-Architecture, does not work anymore on my new Device. The app crashes after it was successfully starting.
Another thing is, that the DevicePortal does not transmit virtual inputs. Again, on my older HoloLens2´s Virtual Input works great.
Also, even if I disable WebRTC parts of my Project, I still get an Exceptions in my Networking-System which I can´t assign to any cause. In term it is useful for you, I work with windows.Networking Library and in special with DatagramSocket.
I would be really glad if anybody could help me with this. Is OS-Version 21H1 restricted to any specific Unity- or VisualStudio Version (here currently I use 16.4.5)? Or is it Restricted to specific Networking Libraries? Thanks in advance!
Now I was able to fix the Networking Exception. The reason for that is located within my UDP-Communicator which uses DatagramSocket. Since earlier .Net.Sockets was not available at HoloLens2, now it is and I coincidentally came across this information. So I switched my implementation to .Net.Sockets which already exists in my project for editor-usage and now basic networking works fine.
Also, I was able to make WebRTC work again. With one of my Provisioning-Packages I disabled the usage of microphone for mixedReality and it seems like access to those audio-informations is mandatory for MR-WebRTC.
Unfortunately, I still have the same issues with Device Portal.This really looks like a bug.
I am trying to setup a development environment in Visual Studio Community for development with Xamarin.Forms. In order to make sure the Android Emulator was working, I followed the QuickStart Xamarin.Android tutorial found here.
When I Start Debugging with any number of Virtual Devices the output is always the same; the application does not show up, but the AVD successfully starts up and I can also successfully interact with OS; when trying the close the AVD (with the x icon on the top right) a pop-up dialog appears saying "There were Deployment Errors. Do you wish to continue? Yes\No". The frustrating part is that no matter my response there is absolutely no useful error informations, or warnings or messages for that matter. You may think this is a duplicate question but it is not. I have had problems with a similar problem in which the fix was to downgrade my Android SDK BuildTools to a version lower than 24.0. The was to circumvent an upstream bug that provided the error message: java.lang.UnsupportedClassVersionError blah blah blah. The problem here is I get NO error and my highest version Build Tools are version 23.0.3 which should be fine. Here is a pic on start-up:
AVD
Unfortunately as I am only a begginer user I am not permitted to post more links and images. Apologies for the images as links I am still only permitted to post images in this way.
Thank you for taking the time to help me out.
Hi anyone with a similar problem, this is what worked for me in this particular case. I started the AVD before starting Debugging, the application then showed up in the emulators device menu and everthing is working. I have been stuck with this problem for Five whole day trying dozens of things. Pheeeeuuuuuuw!
I'm currently running VS2013 Update 3, I'm building an app and i;m trying to mimic the Rate My App that shows up rate message dialog in b/w specified intervals.
My problem is that i've made a setting using ApplicationData.current.loclasettings and it is an integer.
and i want to see the settings number being updated every time i close and run the app to ensure the logic is perfect.
but i'm unable to do it. Every time i deploy the app from vs it replace the original app and thus erasing all the settings that have been previously saved.
I've tried to use attach a process but it doesnt work on windowsphones.
Well after a bit of research and going through the documentation it is clear that there is no way you can attach a process to the app that is already running on the phone.
At least for me there was no other way because Microsoft kept the USB debugging thing a little bit undocumented or not documented at all.
So, who ever are looking forward to first launch the app on a connected windows phone and then start the the connect to a process and select the appropriate device for communication , story it is not possible, at least the build that i;m using doesn't support. may there might be a better solution in the future.
I have a problem with playing audio tracks with the AudioPlaybackAgent on devices running WP8. It works perfectly on WP7, but not on WP8. It only works sometimes for WP8, so there is no clear steps on how to reproduce it either. What seems to be the problem is that when a new track is about to play and I have set the BackgroundAudioPlayer.Instance.Track to the new AudioTrack, it don't receive onPlaystateChanged.TrackReady.
Why is this? I don't receive onError either.
Is there a known bug with playing audio on WP8 devices? It happens about 50% of the time, and the same track can both work and not work. What can be the problem here? Please help. Any from Microsoft that can help on this? That would be highly appreciated.
The fact this occurs 50% of the time makes me suspect this could be a race condition which didn't occur on WP7.
Are you doing any thread-locking (using Mutex, lock() etc) from your background agent when changing tracks? I had something similar for a WP8 background audio app that was previously working on WP7 and traced it back to a deadlock in my code.
Don't forget that WP8 now has dual-core processors and is more likely to hit such issues. See this post from someone on the Windows Phone team about back-compat between WP8 and 7. Especially interesting is the section named "Runtime behavior changes" in that post.
How can I create a dump of an application on widows phone , in case it crashes , so I cad debug it later.
I know there is App.UnhandledException event , but I don't know how to dump the application.
Why even bother doing this yourself? There are tools like Bugsense out there that do this perfectly for you.
There is also Little Watson, part of the NorthernLights WP7 Toolkit. But Bugsense looks interesting and I'm going to have to check it out. +1
Update: the telerik RadDiagnstic control works great too.
Perhaps these answers on previous questions also about app crashes and dumps can help you further:
Application crash when using 3G
Windows Phone 7 EMULATOR Crash Dump or Debugging