question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NPE in obfuscated code after calling trace.stop()

See original GitHub issue

Describe your environment

  • Android Studio version: 3.6.1
  • Firebase Component: Performance
  • Component version: 19.0.0

Describe the problem

Crashlytics is reporting 80 users experiencing a null pointer exception When calling trace.stop(); We haven’t seen this during development and trace object itself itsn’t null; the crash comes in the obfuscated firebase code. Is there anything we can to prevent the crash?

Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'com.google.android.gms.internal.firebase-perf.zzcr com.google.firebase.perf.internal.zzq.zzbf()' on a null object reference
com.google.firebase.perf.internal.zzq.zza (zzq.java:39)
com.google.firebase.perf.metrics.zzd.zzcd (zzd.java:20)
com.google.firebase.perf.metrics.Trace.stop (Trace.java:87)

app-level build.gradle:

implementation 'com.google.firebase:firebase-perf:19.0.0'
...
apply plugin: 'com.google.firebase.firebase-perf'

I don’t see anything in the Trace docs about NPEs, and didn’t find any mention of this in the issues for this repo.

I also looked at the release notes for Performance Monitoring for 19.0.1, 19.0.2, 19.0.3, 19.0.4, and 19.0.5 for mention of a NPE to see if upgrading would fix the issue, but don’t see any mention of it.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ramanpreetSinghKhindacommented, Mar 27, 2020

Thanks @sn-michiyo for the details.

I am preparing a fix for this and plan to rollout in the upcoming release. Will update here with more details on that.

0reactions
ramanpreetSinghKhindacommented, Apr 27, 2020

This should be fixed in v19.0.6.

Release Notes

Please reopen if the issue persists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android proguard obfuscated code is causing ... - Stack Overflow
Now I realize why my user submitted crash/stack traces seem to end at a method signature instead of the actual line of code...
Read more >
ProGuard Manual: Troubleshooting - Guardsquare
Class names not being obfuscated​​ If the names of some classes in your obfuscated code aren't obfuscated, you should first check all your...
Read more >
Understanding Stack Traces and Debugging them Further
Reading stack traces is directly related to your experience with a specific project. But there are some things you can do to debug...
Read more >
Shrink, obfuscate, and optimize your app - Android Developers
Learn how to shrink code in your release build to remove unused code and resources.
Read more >
Java Obfuscator - Zelix KlassMaster™ - FAQ
After being obfuscated why does my code get the runtime errors "ClassFormatError" ... Can Zelix KlassMaster™ automatically handle Java Reflection API calls?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found