1

I'm writing this post because I don't know what I can do.

I'm developing an big app for iOS with a lot of users for my company; to log error and crashes I'm using Microsoft MobileCenter (Analytics and Crashed ver. 0.6), Xamarin.Forms ver. 2.3.3.168 and a lot of components such as Xam.Plugins, SQLite, PCLStorage, SharpZipLib.

As MobileCenter request the minimum target version for the app is 8.

Apart from minor bugs, the big problem is difficult to explain. I'm trying to ask you an advice.

The app is working fine. If I test it, I can't have any problems. At same point the app crashed for any apparently reason. No logs, no crashed, no nothing in MobileCenter. From this moment it's impossible to start the app and I can't have any logs about it: I can see the splash screen but after than the app is crashed again. It seems the problem raises after taking photo with camera.

When the app starts, it deletes images (if there are any in the folder), send a file to my server, and check with CrossDeviceInfo what the OS version is. Then the first page is called.

I tried to understand the problem to read the log in Xcode after connecting my device to my iMac but it's incomprehensible.

XCode devices

If I try to read the View Device Logs I can find one crash for my app but the log is still incomprehensible for me.

View Device Log

Then from Xcode I tried to open Organizer and under Crashes...

Organizer

If I connect the device with this issue to my iMac and I deploy the app on it, the app is working fine. How can I understand where the problem is to fix it?

Update

In my App.xaml.cs I initialise MobileCenter like the following code:

public partial class App : Application
{
    public App() {
        // my code
    }

    protected override void OnStart()
    {
        MobileCenter.LogLevel = LogLevel.Verbose;
        MobileCenter.Start(typeof(Analytics), typeof(Crashes));
    }
}
Brandon Minnick
  • 13,342
  • 15
  • 65
  • 123
Enrico
  • 3,592
  • 6
  • 45
  • 102
  • Did you check Mobile Center integration was working for other crashes before? Can you set `MobileCenter.LogLevel = LogLevel.Verbose` before the `Configure` call? Does the crash happens without MobileCenter? – Guillaume Perrot Mar 02 '17 at 21:54
  • The app is usually working, this is the problem. If it doesn't start at all, I have to check properly the `App` or `AppDelegate`. But in this case when the app crashes for any reason, it doesn't work any more. – Enrico Mar 02 '17 at 22:46
  • Hi, I get that but that's not what I meant. You have device logs just before it crashes the first time but the problem might be that those logs are not informative enough as by default the SDK does not log much, hence the need to increase loglevel to verbose before. Also my other question remains: do you have the issue if MobileCenter SDK is removed completely? (To see if the crash itself is caused by it somehow). And my first question too: did you check the SDK integration worked at all, like did you try to report another type of crash with this app? – Guillaume Perrot Mar 03 '17 at 03:02
  • I've noticed that my app is crashed sometimes when the user rotates the iPad but in this case the app restarts without problem. – Enrico Mar 03 '17 at 14:09
  • And do you see the crash in Mobile Center for the rotate use case? Did you validate the SDK integration with any other crash? Did you try to enable verbose logs and only then try to reproduce your camera crash to see if you can collect more device logs this time? – Guillaume Perrot Mar 03 '17 at 17:30
  • I don't see any crashes about it. In Mobile Center I see errors occur in a view model for example (then it is installed correctly I think). Yes, I enable verbose logs. – Enrico Mar 06 '17 at 11:01
  • I should know where the problem is without any real evidence. When the app starts, it shows a list of appointments with a picture. If I connect an iPad for example and I deploy the app on it, the app is working fine. I stop the build it on Xamarin Studio. If I disconnect the iPad and I tap on the icon app, the app shows the splash screen and then crashes without any debug info. What I thought is the app uses a lot of memory for images or takes too time to load them and then iOS shut down it without writing anything. – Enrico Mar 06 '17 at 15:20
  • Hi, without your source code we can investigate only with logs. Now that you enabled verbose logs, what are the last MobileCenter logs you can fetch from the device when that crash occurs? – Guillaume Perrot Mar 06 '17 at 19:08
  • I updated Mobile Center to 0.7 and I still don't see any crash logs. Maybe in this case can't Mobile Center collect any details about the crash? – Enrico Mar 07 '17 at 10:17
  • Hi, what are the client side verbose logs you can retrieve on the device when that crash occurs? We can't answer you if we cannot look at any MobileCenter log that the SDK prints. – Guillaume Perrot Mar 07 '17 at 17:26
  • When the app crashes at the beginning (basically when I see the splash screen and nothing else) I don't have any logs in MobileCenter. – Enrico Mar 08 '17 at 08:54
  • I mean before that, you said you have a initial crash with the camera. What I'd like you to do is at the very moment the initial camera crash occurs, with verbose logs previously enabled, get the device logs at that time to see all the MobileCenter logs that were printed before. – Guillaume Perrot Mar 08 '17 at 20:12

1 Answers1

1

It's Benjamin. I've already replied to you issues in our intercom but I wanted to reply to your issue here.

This scenario is not an actual crash but a kill of the app process by the operation system. The SDK runs as part of the app process and therefor can’t ever figure out that this kill even happened because the process is fully removed right away. Technically this is not a crash from an SDK perspective that it can detect and provide details for. Every single 3rd party SDK has this limitation and there is no way around it as Apple doesn’t provide the technical possibilities to do so.

In addition, none of your provided crash reports contain any reference to Mobile Center thus I can rule out our SDK is the cause of the kill.

I hope you find the cause for the issue.