Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more..
    Dismiss Notice
  3. Dismiss Notice

Bug CrashReport API generating empty reports

Discussion in 'iOS and tvOS' started by kyriuch, Dec 6, 2021.

  1. kyriuch

    kyriuch

    Joined:
    Jul 3, 2017
    Posts:
    9
    Hello. I hope you're all doing fine.

    Recently I tried to implement CrashReport API for iOS: https://docs.unity3d.com/ScriptReference/CrashReport.html

    I did everything that had to be done according to the documentation - Script Optimization Calls to Fast but no Exceptions, enabled CrashReport API, defined ENABLE_CUSTOM_CRASH_REPORTER to be one, also built my application as a debug/development one. But even though I did all of this stuff, all my reports generate with an empty message and a date of 01/01/1970 12:00. I tried several checkboxes, some stuff related to logging, symlinking Libraries but none of these helped.

    One thing that's worth mentioning that it's surprising that they in fact generate when I crash the app, only the contents is empty/broken. Also I have other crashlytics services in my Project like Firebase Crashlytics, I thought maybe that would break things?

    I tried it on Unity 2019.4.21f1, Unity 2019.4.33f1, XCode 12.4, XCode 13, iOS 15.1, iPhone 12. If any further information is needed to investigate it, feel free to ask. I'd love it to finally work for me.
     
  2. kyriuch

    kyriuch

    Joined:
    Jul 3, 2017
    Posts:
    9
    Hello. Any chance someone knows the reason for those empty reports with invalid date? I'm still experiencing the issue.
     
  3. kyriuch

    kyriuch

    Joined:
    Jul 3, 2017
    Posts:
    9
    I can add that these are my commands, I ran them on an empty project and I still have empty reports.


    case 0: Utils.ForceCrash(ForcedCrashCategory.FatalError);
    break;
    case 1: Utils.ForceCrash(ForcedCrashCategory.AccessViolation);
    break;
    case 2: Utils.ForceCrash(ForcedCrashCategory.Abort);
    break;
    case 3: Utils.ForceCrash(ForcedCrashCategory.PureVirtualFunction);
    break;
    case 4: MemoryCrash();
    break;
    case 5: new System.Threading.Thread(() => throw new Exception("Forced exception")).Start();
    break;


    0 crashes the app and there is an empty crashreport
    1 crashes the app and there is an empty crashreport
    2 crashes the app and there is an empty crashreport
    3 crashes the app and there is an empty crashreport
    4 crashes the app and there is no new report (neither correct nor empty)
    5 doesn't crash the app and there is no new report (neither correct nor empty)
     
  4. OriginatorRyan

    OriginatorRyan

    Joined:
    Feb 28, 2022
    Posts:
    3
    Bump, I am seeing this same issue. still in Unity version 2020.3.18f1. We need to track down crashes for our apps and we wanted to use Unity Cloud Diagnostics but we aren't seeing any crash reports coming in and I suspect this is the culprit.
     
  5. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    My problem is the CrashReport.reports always returns 0 , any update on this ?
     
  6. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    Is this API dead or something?
     
  7. lucky_zlf

    lucky_zlf

    Joined:
    Apr 18, 2022
    Posts:
    1
    I'm facing this issue too. My Unity version is Unity2022.3.38f1, and XCode version is 14.0.
    I got the original crash file "live_report.plcrash", used PLCrashReporter to parse the crash file, but failed with message "
    Could not decode crash log: An unknown error occured decoding the crash report". And In my app setup, I got the log in XCode that "data too short after length-prefix of 96\nCrashReporter: failed to init crash report".
    Everytime my app crashed, the plcrash size is always 64kb. So I think this issue is because of crash log out of the max crash file size