Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in Bugsnag.init() when getResouces() is null #78

Closed
duncanhewett opened this issue Dec 8, 2015 · 0 comments
Closed

Exception in Bugsnag.init() when getResouces() is null #78

duncanhewett opened this issue Dec 8, 2015 · 0 comments
Labels
bug Confirmed bug

Comments

@duncanhewett
Copy link
Contributor

In some circumstances an exception can be thrown during initialization when Context.getResources() is null.

It appears that this only happens when the App's onCreate is triggered by a widget refresh.

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.util.DisplayMetrics android.content.res.Resources.getDisplayMetrics()' on a null object reference
at com.bugsnag.android.DeviceData.<init>(DeviceData.java:33)
at com.bugsnag.android.Client.<init>(Client.java:87)
at com.bugsnag.android.Client.<init>(Client.java:45)
at com.bugsnag.android.Bugsnag.init(Bugsnag.java:35)
@kattrali kattrali added the bug Confirmed bug label Dec 8, 2015
kattrali added a commit to bugsnag/bugsnag-unity that referenced this issue Apr 15, 2016
Android Changelog
====

## 3.4.0 (2016-03-09)

### Enhancements

- Limit the number of stored errors
  [Duncan Hewett](https://github.com/duncanhewett)
  [#97](bugsnag/bugsnag-android#97)

### Bug Fixes

- Fix `ConcurrentModificationException` which could occur when saving
  breadcrumbs
  [Duncan Hewett](https://github.com/duncanhewett)
  [#98](bugsnag/bugsnag-android#98)

- Localize all numbers in error metrics
  [Delisa Mason](https://github.com/kattrali)
  [#100](bugsnag/bugsnag-android#100)

3.3.0 (2016-01-18)
-----

### Enhancements

- Change distribution method to be .aar only
  [Lars Grefer](https://github.com/larsgrefer)
  [#91](bugsnag/bugsnag-android#91)

- Skip sending empty device data values
  [Matthias Urhahn](https://github.com/d4rken)
  [#96](bugsnag/bugsnag-android#96)

- Remove the need for synthetic methods
  [Jake Wharton](https://github.com/JakeWharton)
  [#87](bugsnag/bugsnag-android#87)

3.2.7 (2015-12-10)
-----

### Enhancements

- Add additional check to ensure the cache of uploaded errors are deleted
  [#80](bugsnag/bugsnag-android#80)

### Bug Fixes

- Fix exception which occurs when `appContext.getResources()` is null
  [#78](bugsnag/bugsnag-android#78)

- Fix bug preventing `maxBreadcrumbs` from being set
  [David Wu](https://github.com/wuman)
  [#70](bugsnag/bugsnag-android#70)

3.2.6
-----
-   Add blocking API
-   Fix NPE issue
-   Concurrent adding to tabs
-   Thread Safe DateUtils#toISO8601
rich-bugsnag pushed a commit that referenced this issue Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants