Skip to content

Conversation

@konraddysput
Copy link
Collaborator

@konraddysput konraddysput commented Mar 15, 2021

Update 3.4.0-rc summary

  • native/managed attachment support - user can add path to attachments via BacktraceClient Initialize method or via Unity Editor Backtrace Window. Once user add them on the initialization method/game object - it will be available in every report that BacktraceClient will send to Backtrace.
  • background thread support - now BacktraceClient will report exceptions/unhandled exceptions generated by any background thread.
  • ANR detection improvements - BacktraceClient won't report anymore ANRs detected when the application goes to the background.
  • thread.main attribute support - attribute stores an identifier of a main thread. In this situation user can use value available in this attribute to detect main thread.
  • Backtrace native integration will set _mod_faulting_tid attribute for ANR reports to set default faulting thread.

* Background thread support

* Fixed exception flow

* Removed renamed file
…ng them (#66)

* Detect false-positive ANRs report and prevent ANR watchdog from sending them + anr thread improvements

* Fixed typos + better documentation - added Samy's advices
* Attachment support on Android - iOS shouldn't compile

* Updated the latest version of backtrace-android libraries and also adjust iOS integration code - code should now compile on iOS

* Native attachment support

* Attachment improvements

* Updated label

* Native client updates

* Android libraries
@@ -1,5 +1,12 @@
# Backtrace Unity Release Notes

## Version 3.4.0
Copy link
Contributor

Choose a reason for hiding this comment

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

3.4.0-rc1 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good-catch I will update a version.

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.

suggest we clarify 3.4.0-rc1 as the version.

@vlussenburg
Copy link
Contributor

Tested on iOS

  • ANR triggers
  • OOM triggers
  • native crash triggers
  • Managed crash triggers

@vlussenburg
Copy link
Contributor

Native attachment tested:
image

CHANGELOG.md Outdated
# Backtrace Unity Release Notes

## Version 3.4.0-rc1
- native/managed attachment support - user can add path to attachments via BacktraceClient Initialize method or via Unity Editor Backtrace Window. Once user add them on the initialization method/game object - it will be available in every report that BacktraceClient will send to Backtrace.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not to be too pedantic here, but you should change "Unity Editor Backtrace Window" to "Unity Editor in the BacktraceClient's inspector. In Unity: Inspector <> Window.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks, Will make a change.

Comment on lines 244 to 247
foreach (var path in AttachmentPaths)
{
result.Add(ClientPathHelper.GetFulLPath(path));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@konraddysput Corner case you should handle (sorry if I missed it elsewhere: Check for null / empty items in the AttachmentPaths list. Given the user can create that list + amend it via the inspector, they could accidentally leave one of the items empty. I dont think this will throw a null reference exception in that case because I am pretty sure the list would just contain an empty string, but might be worth handling (or at least testing). Let me know what you think

Might make sense to put this in the Initialize method when you assign the value in the config to the client's AttachmentPath property instead. Ill leave that up to you.

Copy link
Collaborator Author

@konraddysput konraddysput Mar 16, 2021

Choose a reason for hiding this comment

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

User attachment never will be null. Reference:

If the list is empty in both examples - it's fine. If list has empty values it's also fine - we will check if file exists before uploading it to Backtrace. We wont want to check if file exists here in this function because user might want to create them after backtrace client initialization.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok great, makes sense. Thanks

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Dautery91 it won't cost us anything to anyway prevents from setting empty strings in editor. I will add anyway a check on the startup. Thanks for pointing this out.

Comment on lines +338 to +339
AndroidJNI.NewStringUTF("error.type"),
AndroidJNI.NewStringUTF("Hang"));
Copy link
Contributor

Choose a reason for hiding this comment

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

[General Note. Making a change not necessary for this pull request] Reading through this made me think: Why are your attribute strings defined in line like this? In your editor code, you have an entire file where you define all of the Labels in one place, and yet these are in line. Seems like following a similar pattern would be a good change both from the perspective of organization AND maintaining documentation. If you have all of the attribute definitions in one place, would be easier for us to ensure any docs are up to date + give users a place in the code to see all of the attributes + quickly link to how they are used. Let's discuss this as an aside

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It should be defined in const variables in class definition I agree - but this change might be important/usefull once we will merge implementations for native clients. I think it't an item on my to do list while we will work on native client refactor.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok sounds good. Yeah I view this change as primarily a documentation improvement than anything else, so we should just be keeping this in the back of our minds + slot in the work when and where it makes sense.
@vlussenburg

Copy link
Contributor

@Dautery91 Dautery91 left a comment

Choose a reason for hiding this comment

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

See my comments

* Fixed invalid date in log manager when calendar is unsupported

* Use single method to generate UTC timestamps + move it from extension code to static class to avoid unnecessary allocation

* Fixed line endings

* Updated native library

* Removed debug logs from native library

* Updated library version

* Added invariant culture to rest of the code

* native library update

* Fixed issue in the readme file
* Correct attachment name

* Moved constants to const variables
@konraddysput konraddysput merged commit ebe06b3 into master Apr 6, 2021
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