Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

(2018.3.14) Native Crash - UnityEngine::Analytics::DataDispatcher::DoBasicJsonValidation

Discussion in 'Unity Analytics' started by Pronetizen, Aug 25, 2019.

  1. Pronetizen

    Pronetizen

    Joined:
    Nov 11, 2018
    Posts:
    6
    Dear Unity forum moderators,

    We got some problem report from our customer that the game almost immediately crashed after 2-4 seconds. From the stacktrace of crashed thread, we suspect that it might be related to
    UnityEngine::Analytics::DataDispatcher::DoBasicJsonValidation()
    .

    Is this issue already known/fixed or is there any workaround?

    Thank you.


    UNITY VERSION
    2018.3.14f1

    Thread 42 (crashed)
    0 sushi 0x0000000100597224 UnityEngine::Analytics::DataDispatcher::DoBasicJsonValidation(core::basic_string<char, core::StringStorageDefault<char> > const&)
    1 sushi 0x0000000100596404 UnityEngine::Analytics::DataDispatcher::FormatEventDataAsJson(dynamic_array<core::basic_string<char, core::StringStorageDefault<char> >, 0ul> const&, unsigned int, unsigned int, UnityEngine::Analytics::DispatchFormat, unsigned int, bool, core::StringBuilder&, unsigned int*, unsigned int*)
    2 sushi 0x00000001005960c4 UnityEngine::Analytics::DataDispatcher::PrepareDataBlockToDispatch(unsigned int, unsigned int, core::StringBuilder&, core::basic_string<char, core::StringStorageDefault<char> >*)
    3 sushi 0x0000000100595408 UnityEngine::Analytics::DataDispatcher::SetupDataBlockToDispatch(unsigned int)
    4 sushi 0x00000001005952c4 UnityEngine::Analytics::DataDispatcher::HandleDispatcherProcessingStep()
    5 sushi 0x00000001007a88f0 JobQueue::Exec(JobInfo*, long long, int)
    6 sushi 0x00000001007a884c JobQueue::Steal(JobGroup*, JobInfo*, long long, int, bool)
    7 sushi 0x00000001007a8cb0 JobQueue::ExecuteJobFromQueue()
    8 sushi 0x00000001007a8d88 JobQueue::ProcessJobs(void*)
    9 sushi 0x00000001007a824c JobQueue::WorkLoop(void*)
    10 sushi 0x000000010081b268 Thread::RunThreadWrapper(void*)
    11 libsystem_pthread.dylib 0x00000001b3e2d2c0 _pthread_body
    12 libsystem_pthread.dylib 0x00000001b3e2d220 _pthread_start
    13 libsystem_pthread.dylib 0x00000001b3e30cdc thread_start
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,648
    We have not heard of this behavior. Can you provide steps to reproduce?
     
  3. Pronetizen

    Pronetizen

    Joined:
    Nov 11, 2018
    Posts:
    6
    We would like to, however, we only have these crash logs reported by Unity Analytics at this time. We assume that this kind of crash is very rare since it affects only a single user out of thousands. For now, we are trying to retrieve the dump of persistent data (including player prefs) from the affected user. We will post progress if there are any.
     
  4. Pronetizen

    Pronetizen

    Joined:
    Nov 11, 2018
    Posts:
    6
    Unfortunately, we could not retrieve the dump... However, after we delivered a new game build that Unity Analytics is turned off to that user through TestFlight, the crash did not occurred, hence the issue seemed to be resolved. We do not have any further information to investigate, so... our only guess for now is that somewhat malformed data used by Unity Analytics causing this crash. We hope that Unity devs look into
    DoBasicJsonValidation
    function for any potential native crashes. Thank you!
     
  5. awesomeda

    awesomeda

    Joined:
    May 10, 2017
    Posts:
    6
    We have the same issue for 3 users, ios only. If it helps I can provide the json from Cloud diagnostics.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,648
    Specifically steps to reproduce. The iOS version would be most helpful.
     
  7. yu-uwano

    yu-uwano

    Joined:
    Aug 7, 2019
    Posts:
    1
    There are crashes on our product built in Unity2018.4.8f1 that seems to come with the same cause written above; we have no idea to reproduce them, though.
    0.5% of users seem to encounter the crash.

    iOS versions with the problem are:
    13.1.3
    13.1.2
    12.4.1
    12.4.2
    12.1.2
    12.3.1
    12.0
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,648
    Got it, I will follow up with the team here
     
  9. ThisGuise

    ThisGuise

    Joined:
    Oct 20, 2015
    Posts:
    8
    Hi, has there been any progress made on this issue? Is there a fix in a release since 2018.4.8f1?
     
  10. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,648
    Yes, we have identified the issue and in the process of rolling it out. It should first appear in Unity 2019, I'm checking to see what other Unity versions.
     
  11. Jerry_SAS

    Jerry_SAS

    Joined:
    Jan 10, 2020
    Posts:
    4
    We also have a crash, with the same call stack, on one Windows 10 machine. We are running on 2019.2.4f. Is there maybe a known workaround in the meantime?
     
  12. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,648
    Can you try with the latest 2019 release?
     
  13. Jerry_SAS

    Jerry_SAS

    Joined:
    Jan 10, 2020
    Posts:
    4
    We tried 2019.2.21 and it still seems to have the same crash.
    At the moment we can't upgrade to 2019.3 as it has some issues with third-party plugins we use which cant be easily replaced.
     
  14. Jerry_SAS

    Jerry_SAS

    Joined:
    Jan 10, 2020
    Posts:
    4
    After some debugging, we found out that the locallow company folder had a corrupt file in it that caused the crash. After deleting the folder Unity works fine again.
     
  15. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,648
    What was the specific folder name? (you can obscure the user name if in the path)
     
  16. Jerry_SAS

    Jerry_SAS

    Joined:
    Jan 10, 2020
    Posts:
    4
    `C:\Users\%username%\AppData\LocalLow\stillalive studios GmbH`
    After deleting that one or using a different company name the crashes didn't happen anymore. The crashes where also present if you would make a new Empty project and just use the same `ProjectSettings.asset`. That is how we found it out. Unfortunately we missed to save whatever was in there, but we still have the crash dumps if that would help you.
     
  17. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,648
    Sorry no, but I'm glad you found it! Perhaps a non-ascii character in the path.
     
unityunity