Search Unity

Official Game Performance Reporting Preview FAQ

Discussion in 'Unity Cloud Diagnostics' started by andyk-unity, Mar 3, 2015.

  1. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @fhickman

    I've just tried this with our latest internal version of Unity at 5.3. This version is not released yet, but it is working for iOS/IL2CPP. So I'm curious to have a look at your test case to see what might be going on.
     
  2. fhickman

    fhickman

    Joined:
    Feb 10, 2016
    Posts:
    9
    @ChrisLundquist

    I'm working on a small reproducible test case of that problem, but I did notice something else interesting while developing it...

    I created a simple test scene, which throws a System.Exception when a button is pressed. When I create a Mono2x build of that scene, everything operates as expected. When I create a build with the IL2CPP scripting backend (ARM64), the stack trace that is reported (both in the Xcode console log and in GamePerf) is wrong... which of course is rather troublesome when I'm trying to debug issues from their stack traces.

    EDIT:
    Nevermind, the stack trace issue was cured when upgrading from 5.2.4f1 to 5.3.3p1. Looks like issue 754539 may have been to blame: iOS/IL2CPP: Correct stack traces in exception messages, which could sometimes miss managed frames.
     
    Last edited: Mar 3, 2016
  3. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @fhickman

    I was planning to ask which Unity version you were using, but you beat me to it! Let me know if you see incorrect stack traces in another situations. Thanks!
     
  4. fhickman

    fhickman

    Joined:
    Feb 10, 2016
    Posts:
    9
    @JoshPeterson

    My apologies, but the Mono2x/IL2CPP distinction seems to have been a red herring (at least as of Unity 5.3.3p1).

    The problem that I'm seeing is that an exception thrown from say, a UI.Button OnClick handler, is properly caught and logged, whereas an identical exception thrown from a GUI.Button handler causes a crash, and the exception is never logged.

    I've submitted a bug report with a tiny sample project, at #776577.
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @fhickman

    It is not a problem. Thanks for submitting this bug report!
     
  6. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Seconding this. There's one ancient pirated version of my game in particular that sends a bunch of error reports that I'd love to filter out, since every legit buyer is auto-updating on Steam and that version can never be updated.

    Nice to hear that some upgrades are coming. In the meantime I might just change to a new app ID actually.
     
  7. Aram-Azhari

    Aram-Azhari

    Joined:
    Nov 18, 2009
    Posts:
    142
    This seems to be a great idea. I have one question though, Is it COPPA compliant ?
    Or does it let us make it COPPA compliant?

    Thanks.
     
  8. Sevenate

    Sevenate

    Joined:
    Mar 10, 2016
    Posts:
    16
    Any chance to have some sort of a "trial mode" for those who are not on PRO boat yet?
    The service seems useful addition to subscription, but before signing up for long term it would be nice to try it first.
     
  9. ChrisLundquist

    ChrisLundquist

    Unity Technologies

    Joined:
    Mar 2, 2015
    Posts:
    55
    @Aram Azhari I am not a lawyer, I would need to check with legal to give you a definitive answer.

    What I can tell you though is that no personal identifying information is deliberately stored.
    We only store that some error happened on these operating systems, with these processors, etc.
    We do not currently store any unique ad or device tracking identifiers.
    The "user_id" on initialize is actually not honored and will probably be removed from future versions.

    It is possible to abuse the service to store such information though.
    E.G. On start, throw an exception with the player's in game name in the message, etc.
    To me, that would be an abuse of the service for a variety of reasons.

    I'll see if I can get clarification on COPPA status from legal.

    Hope this helps,
    Chris Lundquist
     
    Aram-Azhari likes this.
  10. ChrisLundquist

    ChrisLundquist

    Unity Technologies

    Joined:
    Mar 2, 2015
    Posts:
    55
    @Nition @iomac

    I need some help with the angular side and the UI team has been pretty busy.

    Chris Lundquist
     
  11. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    One other thing that might be nice is a method for reporting something without throwing an exception. Sometimes there's something that should never happen and you'd want to know about it, but isn't really exception-worthy, like "player is out of bounds on the map".
     
  12. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    I have some occasional StackOverflowException error reports coming in and unlike other exceptions they don't come with any stack trace or any other identifying info, so they're a bit of a nightmare to track down.

    In the output_log.txt of a build, even a non-dev one, StackOverflowExceptions come with a stack trace, so the data seems to be there. Is there any chance we could please get that data into the Game Performance Reporting report as well?
     
    Last edited: Mar 27, 2016
  13. v-houbraken

    v-houbraken

    Joined:
    Oct 26, 2015
    Posts:
    15
    Hey all,
    I was just testing this feature out. In unity 5.3.2 it seems i cannot do this when iOS is set to fast but no exceptions. Is this already fixed in newer versions? (It conflicts with UnityEngine.CrashReport which needs it to be on to work)

    Besides that, i am trying to catch things like out of memory on iOS devices. Both this exception plugin, and using UnityEngine.CrashReport seem to catch nothing whatsoever. Is there a way to get some more blanket coverage on iOS? Analytics from apple dev dashboard is really useless besides telling you "all devices have crashes sometimes". Which doesn't get me any more specific info then that.

    Thanks in advance!
     
  14. tkoknordic

    tkoknordic

    Joined:
    Jan 31, 2013
    Posts:
    93
    I'm getting some very strange crashing on Windows Phone. It happens only with built version of game that is downloaded from store. Any change this Performance tools is ever going to be on Windows Phone platform?
     
  15. Nicolas1212

    Nicolas1212

    Joined:
    Dec 18, 2014
    Posts:
    139
    Hi,

    Two quick questions:
    • Is there any progress on the `UnityEngine.CrashLog.ConfigService+d__0.MoveNext ()` race condition. Huge number of errors coming in from it
    • Is there any way to get a stack trace on iOS. At the minute we just get reports like "NullReferenceException:", but nothing more, which isn't very helpful. It's possible that this is the same error as above (MoveNext), but I can't be sure. At the minute, it seems like the best thing to do is remove it from iOS as it's not really adding anything?
    Thanks
     
    nxtboyIII likes this.
  16. quixotic

    quixotic

    Administrator

    Joined:
    Nov 7, 2013
    Posts:
    122
    This week we pushed an update to the developer dashboard now you can filter by version number and by platform! I hope you'll check it out and let us know what you think.
     
  17. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    I've been unable to view the Unity cloud page on Firefox, Chrome or Internet Explorer for the past 4 days now. It seems to work on Edge for some bizarre reason. It seems to happen when you're not logged in.

    https://developer.cloud.unity3d.com/

    It's just a blank page. On Edge we're getting a text-only login page that seems to work if we click on the 'click here to login text' which just appears as regular non-hyperlinked text.

    Clearing my cache does not help.

    Console output:

     
  18. Brian-3D

    Brian-3D

    Unity Technologies

    Joined:
    Oct 27, 2013
    Posts:
    9
    Hi @JJJohan,

    To help diagnose, could you try the website in an incognito window? Also, do you have any browser plugins common to the browsers? (ad blocker, etc)

    With the error you're seeing, plus the mention of seeing the login page without CSS -- seems like something on the network is preventing files from downloading. (Are there errors in the browser network tab you could send?)
     
  19. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    No such luck in incognito mode either.

    No errors in the network tab, it looks like the CSS is actually loading fine too.

     
  20. Brian-3D

    Brian-3D

    Unity Technologies

    Joined:
    Oct 27, 2013
    Posts:
    9
    Thanks JJJohan, I haven't been able to reproduce and trying to think of some new things to try. Seems like all the files are coming down.

    Can you try this on a fellow colleague's machine to try and rule out a potential problem specific to your machine?
     
  21. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    We've tried it on a few machines and even on a separate network, just using my phone's mobile data - after clearing the cache of course. I'm not sure why it seems to be local to us but I think we'll just use our little workaround for now of opening it in Edge. Thanks for taking a look though - I think unless anyone else experiences this problem I wouldn't worry about it.
     
  22. Brian-3D

    Brian-3D

    Unity Technologies

    Joined:
    Oct 27, 2013
    Posts:
    9
    Thanks @JJJohan -- we'll keep an eye our for any other clues. Sorry for the hassle, I'm glad you discovered a workaround for the time being.
     
  23. quinnbot

    quinnbot

    Joined:
    Sep 18, 2014
    Posts:
    10
    Just tuning into this thread now. I saw a post indicating that only exceptions are reported, not hard-crashes.

    Is that still the case?

    If so, any plans to report hard crashes in the future?
     
    nxtboyIII likes this.
  24. cr4y

    cr4y

    Joined:
    Jul 12, 2012
    Posts:
    44
    One question: you have added option to filter by game version, but removed function that let user to select which version does he use.

    public static void Init(string projectId, string version = "", string userId = "");

    What is logic behind that? Can we somehow set version manually in Unity 5.5?
     
  25. thomasn_unity

    thomasn_unity

    Unity Technologies

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

    The version value is now pulled from the Version field in player settings. However, the player settings inspector currently only shows this field for some platforms (I believe only iOS and Android). If you're using a different platform, you'd currently have to switch to a platform that supports the field, set it, and then switch back. Game perf will still use the value even if you're on a platform where the inspector doesn't show it.

    We realize that doesn't really make sense and are working on providing a proper cross-platform version field.

    Thanks,

    -Tom
     
  26. cr4y

    cr4y

    Joined:
    Jul 12, 2012
    Posts:
    44
    Thanks for your answer. If I may suggest something, (re)adding customizable field that can be registered through API would be extremely useful.
    What we were doing in 90 Minute Fever was setting server name (dev/beta/live) as prefix to version name (despite that it was same build). That way we could prioritize things causing crashes to users of stable version and paying users.
    Basically you have great searcher and best way to use it disappeared with Unity 5.4. Adding customizable tag that developer could set through code would be great.
     
  27. mmortall

    mmortall

    Joined:
    Dec 28, 2010
    Posts:
    89
    How to specify version string in new embedded version of performance report (started from Unity 5.4). There are no any way to set the version. We app verision is based on revision number so we need to have an option to define version string.
    Thanks.
     
  28. mdickheiser

    mdickheiser

    Joined:
    Jan 4, 2016
    Posts:
    1
    Nice feature. Is there a way to add custom fields to the exception reporting? e.g. If I want to incorporate a game level name or ID into every reported exception, or a string representing the game mode ("single-player"), or a character type, etc.
     
  29. berzerk

    berzerk

    Joined:
    Dec 23, 2014
    Posts:
    18
    @thomasn_unity
    On the topic of "Game Version" ID in Performance Reporting -> I have a Windows 10 UWP game, so all versioning of the app is done on the Visual Studio side of things, not in Unity. It would be VERY nice to have a way to send the version number to Unity Services from code directly. Thanks.
     
  30. berzerk

    berzerk

    Joined:
    Dec 23, 2014
    Posts:
    18
    @mdickheiser , I just learned how to do that myself. Here is the way to send custom strings attached to exceptions in Unity Analytics:

    Code (CSharp):
    1. try
    2. {
    3.     // some code
    4. }
    5. catch (Exception e)
    6. {
    7.     UnityEngine.Debug.LogException(new Exception("CUSTOM MESSAGE", e));
    8. }
     
  31. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    While it is useful to throw custom exceptions, it would be very handy if we were able to add a small amount of metadata to all exceptions - even if limited to say 3 or 4 short strings to help further identify issues for all exceptions - similar how for example the version number is available to all versions. This would help in complex applications and we'd be able to associate issues to a particular client by being able to, for example, append a user ID - or another example; appending a graphics driver version as sometimes we find strange edge-case issues on some machines that can trickle down to exceptions if they're not properly handled.

    Perhaps something like PerformanceReporting.SetMetadata(string key, string value).

    I am already aware of the hardware info that's accessible through the browser's dev tools.
     
  32. dave_oak

    dave_oak

    Joined:
    Oct 7, 2015
    Posts:
    26
    Does this work with WebGL? We're currently using 5.5.2f2 and the services panel lists WebGL but we are getting no exceptions reported to the dashboard, only from Android and iOS.
     
  33. dave_oak

    dave_oak

    Joined:
    Oct 7, 2015
    Posts:
    26
    A suggestion - could you give each exception a unique ID (or allow us to add one in the dashboard). This would allow us to reference them from our change control system. A lot of the exceptions have the same error message and it makes tracking bug fixes a bit trickier.
     
  34. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    Have mentioned it in two posts but no one seems to offer any advice.

    Stack traces do not show in my unity game reporting interface. I am using 5.6.1f1 and this issue still persists.

    Any ideas?
     

    Attached Files:

  35. Yousician_unity_assets

    Yousician_unity_assets

    Joined:
    Dec 9, 2011
    Posts:
    11
    Hi, we just updated our game from Unity 5.4 to 5.6 and suddenly we stopped receiving Error events for no obvious reason. Should we change something when upgrading? Thanks for any help!
     
  36. thomasn_unity

    thomasn_unity

    Unity Technologies

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

    There were no significant changes between 5.4 and 5.6 with regards to how Performance Reporting sends managed exception events. I would double check that your project still has Performance Reporting enabled in the Services window. If that doesn't work, you can always submit a bug report with your project attached.
     
  37. Yousician_unity_assets

    Yousician_unity_assets

    Joined:
    Dec 9, 2011
    Posts:
    11
    It was indeed turned on, but turning it Off and then On fixed the issue :( Classic.
     
  38. frank-ijsfontein

    frank-ijsfontein

    Joined:
    Sep 11, 2015
    Posts:
    16
    I'm using Performance Reporting on a lot of applications that run in a museum (Windows standalone executables). I do get error reports from applications that run inside our office, but I don't seem to get any from the ones inside the museum. Is there a firewall port that needs to be open for these reports to get through? Any other possible causes?
     
  39. thomasn_unity

    thomasn_unity

    Unity Technologies

    Joined:
    Jun 21, 2016
    Posts:
    60
    The reports are sent via https, port 443. I would assume most firewalls have that open for outgoing traffic, but it wouldn't hurt to double check. If you're seeing reports from the same application deployed in your office, but not when deployed on site, that certainly points to a network issue on site and not an application issue.
     
  40. AlexNanomonx

    AlexNanomonx

    Joined:
    Jan 4, 2017
    Posts:
    41
    Hey, I have a question about how we set the version number that is reported along with our exception for Unity Cloud builds. On iOS and local standalone builds, the version that is returned is Application.Version, but on Unity Cloud standalone builds we get 1.0.{build number}. It's useful to have the build number, but if we're getting the same error on iOS and Windows 32 and 64-bit (3 different builds for us), it's useful to be able to easily collate them.
     
  41. mitchmeyer1

    mitchmeyer1

    Joined:
    Sep 19, 2016
    Posts:
    32
    @thomasn_unity Does Unity Performance Reporting work with WebGL for non development builds?
     
  42. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    I've seen a number of WebGL exceptions come through in the dashboard, definitely non-development builds.
     
  43. mitchmeyer1

    mitchmeyer1

    Joined:
    Sep 19, 2016
    Posts:
    32
    @JJJohan
    So i found out the difference - You need "Exceptions Enabled" for Performance Reporting on non-development builds to work. Kind of a bummer because it gives you a warning saying it "costs a lot of performance" and "Only use this for debugging", so seems like WebGL Performance Reporting for production builds is not supported after all? I know the code is compressed so i was hoping there was a features similar to iOS where there is some sort of symbol file to map the addresses to the code
     
  44. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    I've only got 'Explicit exceptions' enabled and have not been able to differentiate any noticeable performance results between that and exception support completely disabled. I believe the performance impact comes from having full exception support enabled on a CPU-intensive non-game project.

    Besides the Unity docs, I could only find a thread from 2015 which may not have the same impact as the current WebGL implementation.
    https://forum.unity.com/threads/webgl-exceptionsupport-performance.307713/

    It would be nice if it could be clarified by a WebGL dev if 'explicitly thrown exceptions' still have a noticeable performance impact.
     
  45. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    How do we provide users with the option to disable this as a "privacy" option, regardless of how extremely anonymous the reports are. I'm trying to find an on/off switch via code.

    found it:

    Analytics.enabled
     
  46. Pavel_kino-mo_com

    Pavel_kino-mo_com

    Joined:
    Jul 8, 2018
    Posts:
    2
    Hello, when is the planned development of Native Crash Reporting (WebGL) ???