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

NPE in getConfigFromIntent #56

Closed
rubengees opened this issue Mar 31, 2018 · 3 comments
Closed

NPE in getConfigFromIntent #56

rubengees opened this issue Mar 31, 2018 · 3 comments
Milestone

Comments

@rubengees
Copy link

I received several crash reports in the Developer Console.

This is the relevant part of the stacktrace:

Caused by: java.lang.NullPointerException: 
  at cat.ereza.customactivityoncrash.config.CaocConfig.isLogErrorOnRestart (CaocConfig.java:90)
  at cat.ereza.customactivityoncrash.CustomActivityOnCrash.getConfigFromIntent (CustomActivityOnCrash.java:280)

It seems that this is caused by a missing null check here:

@gavingt
Copy link

gavingt commented Sep 7, 2018

I'm getting the same error on the same line. It's only happening on a Nexus 4 running Android 6.0.1. This same user is also having trouble receiving an intent extra in another Activity, which seems to also be what's happening here since this is line 279:

CaocConfig config = (CaocConfig) intent.getSerializableExtra(CustomActivityOnCrash.EXTRA_CONFIG);

@gavingt
Copy link

gavingt commented Sep 18, 2018

I'm beginning to think that this is the result of some sort of Google crawler bot. The one user this happens to is based in Czechia, and always seems to update my app and use it within a couple hours of me pushing a new version (regardless of time of day). I haven't had any users buy my app in Czechia. And the only way this could be happening is if the user is opening Activities programmatically (like using ADB), and thus the intent extras aren't being sent/received as they should.

@Ereza Ereza added this to the 2.3.0 milestone Feb 19, 2020
@Ereza
Copy link
Owner

Ereza commented Feb 19, 2020

Yep, seems that something is launching the ErrorActivity directly and not from inside the library. I added however a null checkso it should not happen anymore.

This will be fixed in the next release. Thanks for your report!

@Ereza Ereza closed this as completed Feb 19, 2020
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

No branches or pull requests

3 participants