Search Unity

Cannot see 5.5 iOS builds

Discussion in 'Unity Cloud Diagnostics' started by andymads, Feb 6, 2017.

  1. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Since doing iOS builds with 5.5 I cannot see any exceptions for those builds and I cannot even choose the builds from the dropdown list. I have definitely got Performance Reporting switched on. Previous to 5.5 I used a preview build of 5.3.6.

    See the screenshot below. Game Version numbers 1609231519 and 1612021151 are older iOS builds from 5.3.6 preview but there are 2 newer iOS builds from 5.5 that are just not showing. The other numbers are for editor and Android.

    Screen Shot 2017-02-06 at 14.11.56.png

    Even if there are no exceptions from managed code I expect to see loads from native code.
     
  2. thomasn_unity

    thomasn_unity

    Unity Technologies

    Joined:
    Jun 21, 2016
    Posts:
    60
    Hi there,

    The iOS native crash functionality is not in 5.5. It is expected to be in the final release of 5.6, and is presently in the 5.6 beta.

    However, you should still be seeing managed exception reports from 5.5 on iOS if you have the Script Call Optimization setting set to Slow and Safe.

    Hopefully that explains what you're seeing. If not, let me know and we'll try to figure it out.

    Thanks,

    -Tom
     
  3. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    @thomasn_unity , ok, that explains the native crashes. Although the 4.3.6 preview build you gave me was reporting them I assumed that this would still be the case with 5.5.

    I have 'Fast but no Exceptions' set. This was the case with the preview build too and I saw all the managed exceptions reported in the dashboard. This has also been changed in 5.5 then?

    I was under the impression that 'Fast but no Exceptions' didn't handle exceptions which I why all the managed unhandled exceptions were reported. I have got this wrong then?

    If I set 'Slow and Safe' will my game still crash after an unhandled exception as that is what I want?

    Thanks.

    EDIT:

    Just been doing some testing.

    With
    Screen Shot 2017-02-07 at 11.33.04.png Screen Shot 2017-02-07 at 11.32.47.png
    the game does not crash when I force an exception.

    Does this mean that to be able to view the unhandled managed exceptions reported in the dashboard the game will not crash?

    I don't want my game continuing in an undefined state. I want it to crash immediately.

    In the 5.3.6 preview build it worked exactly as I wanted. Why change it?
     
    Last edited: Feb 7, 2017
  4. thomasn_unity

    thomasn_unity

    Unity Technologies

    Joined:
    Jun 21, 2016
    Posts:
    60
    With Slow and Safe, it will continue execution after an unhandled managed exception (as it does on platforms other than iOS) . You should see the unhandled managed exceptions reported in the dashboard on 5.4+ in this case, or <5.3 if you use the plugin.

    With Fast but no Exceptions, it will cause a crash when there is an unhandled managed exception. Without the native crash reporting functionality, the details of the crash (and managed exception) are lost, as there is not time for it to report the exception details like it does in Slow and Safe mode. The native crash handling functionality was in the preview builds that you were sent, but it didn't make it into the main 5.5 release. I don't expect it to be back-ported to 5.5 at this point either, as it's considered a new feature. It is coming with 5.6 though, and should work like you experienced in the preview builds.
     
  5. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Thanks for explaining Tom.
     
  6. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    @thomasn_unity what does the On .Net UnhandledException setting actually do in relation to the things we've discussed?


    Screen Shot 2017-02-07 at 11.32.47.png
     
  7. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    We released a newer release of an iOS app on 16th Feb but I've not seen 1 single managed exception report for it and it doesn't even show in the dropdown list of versions for that app.

    It was built using 5.5.0 with Performance Reporting enabled and with the Slow and Safe optimization setting.
     
  8. samizzo

    samizzo

    Joined:
    Sep 7, 2011
    Posts:
    487
    So @thomasn_unity does the above mean that 5.4.3f1 does NOT include the native crash handling, and so if you use fast with no exceptions, you get no crash information? So using slow and safe will log the full callstack for managed exceptions?

    If that's the case then I can live with that. I assume I can install my own unhandled exception handler and just call out to native code to call __builtin_trap() to force a crash, because like @andymads said, I don't want my game to continue if there is an unhandled managed exception.
     
  9. thomasn_unity

    thomasn_unity

    Unity Technologies

    Joined:
    Jun 21, 2016
    Posts:
    60
    Yes, native crash reporting is only available in 5.6+. With 5.4 and 5.5, only managed exception are reported.

    The "Script Call Optimization" setting is confusingly named for IL2CPP on iOS. You're correct that with "Fast but no exceptions" you get no managed exception report, because all that setting does is trigger a native crash via __builtin_trap() when there is an unhandled managed exception. That means that the exception reporter doesn't have time to report the managed exception to the server.

    You could try "slow and safe" and install your own AppDomain.UnhandledException handler, but you'd have to ensure you waited long enough for the report to send before calling __builtin_trap(). I haven't tried this method, and it would take some investigation to figure out the best way to do it. You might have to install a callback for .5s later or so. You might be able to just get away with a Thread.Sleep(), as the reports are sent from a background thread, but I'm not sure if AppDomain.UnhandledException is called before or after the log callback that the crash reporter hooks into.

    With 5.6+, this is all moot. There, when using "fast but no exceptions", the native crash that's triggered by __builtin_trap() will be captured and reported, along with the managed stack that led to it. So if upgrading to 5.6 is an option for you, that would be an easy solution.
     
  10. samizzo

    samizzo

    Joined:
    Sep 7, 2011
    Posts:
    487
    Great, thanks very much for the detailed response! Sadly I can't update to 5.6 just yet because we're about to launch :)
     
  11. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Well I didn't realise this. I'm using 5.6 so I can now switch to "fast but no exceptions".