Skip to content

Conversation

@konraddysput
Copy link
Collaborator

@konraddysput konraddysput commented Feb 24, 2021

Backtrace-Unity 3.3.1 update

This patch adjusts the approach Backtrace-unity uses to detect low memory situations. Previously Backtrace report low memory warning to Backtrace when the lowMemoryWarning callback occurred. This updated approach allows the system to detect out-of-memory crashes via a native OS library and adjustments to the data collected by Backtrace.

On iOS - The system reports the out-of-memory exception when the lowMemoryWarning occurred and when the application unexpectedly exits. On the next application startup, Backtrace will analyze the status file. If the status file is available and the following conditions are met, then the Backtrace-Unity integration sends an OutOfMemory exception to Backtrace. The conditions that are checked are:

  • application version is the same,
  • system version is the same,
  • debugger wasn't connected on the last session,
  • out of memory warning occurred,
  • out of memory resource is available

On Android - The report generated was extended with attributes to let developers know the following information:

  • memory warning occurred,
  • last time when memory warning occurred

Testing strategy

  1. Integration/Unit tests
  • make sure all of them are passing
  1. Manual tests
  • on Android (oom enabled)
    Run the application that generates a lot of textures to see how the application performs with out of memory exception and try to generate crash with attributes

  • on iOS (oom enabled)
    validate if the status file is generated on application startup with basic information about the application
    validate if the status file has application version, systemVersion, debug information on the application startup,
    validate if application stores low memory warning when the lowMemoryWarning event occurred,
    validate if application stores report attributes when the lowMemoryWarning event occurred,
    validate if application upload the out of memory report when application version, systemVersion, debugging information are the same,
    validate if the application doesn't upload the out of memory report when application version, systemVersion, debugging information are the same,

  • on iOS (oom disabled)
    check if status json file is generated,
    check if notification are generated when lowMemoryWarning or other events happening.

@rqbacktrace
Copy link

Looks good, just found some spacing issues

Copy link
Contributor

@jasoncdavis0 jasoncdavis0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the change log and description of PR.

@konraddysput konraddysput merged commit a5c4dc9 into master Feb 25, 2021
@konraddysput konraddysput deleted the feature/native-improvements branch February 28, 2021 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants