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

Some uncaught exceptions just show generic RuntimeException instead of the root cause #171

Open
edenman opened this issue Aug 1, 2017 · 4 comments

Comments

@edenman
Copy link
Contributor

edenman commented Aug 1, 2017

I'm migrating to Bugsnag and I'm a bit disappointed by the detail raised in this issue.

In case you can't see that link:
screen shot 2017-08-01 at 4 34 06 pm
screen shot 2017-08-01 at 4 34 21 pm

What's weird is that other issues display the root cause just fine. Is there a setting that I can use to control which exception is displayed at the top level?

The full stacktrace of the first issue:

08-01 16:04:00.010 E/AndroidRuntime(26311): java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
08-01 16:04:00.010 E/AndroidRuntime(26311): Caused by: java.lang.reflect.InvocationTargetException
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at java.lang.reflect.Method.invoke(Native Method)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	... 1 more
08-01 16:04:00.010 E/AndroidRuntime(26311): Caused by: java.lang.reflect.InvocationTargetException
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at java.lang.reflect.Method.invoke(Native Method)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at paperparcel.PaperParcelable$DefaultImpls.writeToParcel(PaperParcelable.kt:29)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at co.recharge.consumer.screen.RechargeScreenWrapper.writeToParcel(RechargeScreenWrapper.kt:12)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeParcelable(Parcel.java:1496)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeValue(Parcel.java:1402)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeArrayMapInternal(Parcel.java:724)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1408)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Bundle.writeToParcel(Bundle.java:1157)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeBundle(Parcel.java:764)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeValue(Parcel.java:1393)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeList(Parcel.java:812)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeValue(Parcel.java:1424)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeArrayMapInternal(Parcel.java:724)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1408)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Bundle.writeToParcel(Bundle.java:1157)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeBundle(Parcel.java:764)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeValue(Parcel.java:1393)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeArrayMapInternal(Parcel.java:724)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1408)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Bundle.writeToParcel(Bundle.java:1157)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeBundle(Parcel.java:764)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.app.FragmentState.writeToParcel(Fragment.java:149)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeTypedArray(Parcel.java:1307)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.app.FragmentManagerState.writeToParcel(FragmentManager.java:381)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeParcelable(Parcel.java:1496)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeValue(Parcel.java:1402)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeArrayMapInternal(Parcel.java:724)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1408)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Bundle.writeToParcel(Bundle.java:1157)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeBundle(Parcel.java:764)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:3633)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3774)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Handler.handleCallback(Handler.java:751)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Handler.dispatchMessage(Handler.java:95)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Looper.loop(Looper.java:154)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.app.ActivityThread.main(ActivityThread.java:6121)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	... 3 more
08-01 16:04:00.010 E/AndroidRuntime(26311): Caused by: java.lang.reflect.InvocationTargetException
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at java.lang.reflect.Method.invoke(Native Method)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at paperparcel.PaperParcelable$DefaultImpls.writeToParcel(PaperParcelable.kt:29)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at co.recharge.consumer.screen.Screen$DefaultImpls.writeToParcel(Screen.kt)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at co.recharge.consumer.screen.InviteContactsScreen.writeToParcel(InviteContactsScreen.kt:10)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeParcelable(Parcel.java:1496)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at paperparcel.internal.ParcelableAdapter.writeToParcel(ParcelableAdapter.java:54)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at paperparcel.internal.ParcelableAdapter.writeToParcel(ParcelableAdapter.java:25)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at co.recharge.consumer.screen.PaperParcelRechargeScreenWrapper.writeToParcel(PaperParcelRechargeScreenWrapper.java:46)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	... 39 more
08-01 16:04:00.010 E/AndroidRuntime(26311): Caused by: java.lang.reflect.InvocationTargetException
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at java.lang.reflect.Method.invoke(Native Method)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at paperparcel.PaperParcelable$DefaultImpls.writeToParcel(PaperParcelable.kt:29)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at co.recharge.consumer.domain.PromoCodes$ReferralInfoWrapper.writeToParcel(PromoCodes.kt:70)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at android.os.Parcel.writeParcelable(Parcel.java:1496)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at paperparcel.internal.ParcelableAdapter.writeToParcel(ParcelableAdapter.java:54)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at paperparcel.internal.ParcelableAdapter.writeToParcel(ParcelableAdapter.java:25)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	at co.recharge.consumer.screen.PaperParcelInviteContactsScreen.writeToParcel(PaperParcelInviteContactsScreen.java:38)
08-01 16:04:00.010 E/AndroidRuntime(26311): 	... 47 more
08-01 16:04:00.013 E/AndroidRuntime(26311): Caused by: java.lang.reflect.InvocationTargetException
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at java.lang.reflect.Method.invoke(Native Method)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at paperparcel.PaperParcelable$DefaultImpls.writeToParcel(PaperParcelable.kt:29)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at co.recharge.consumer.api.generated.GetReferralInfoResponse.writeToParcel(APIObjectsGenerated.kt:991)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at android.os.Parcel.writeParcelable(Parcel.java:1496)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at paperparcel.internal.ParcelableAdapter.writeToParcel(ParcelableAdapter.java:54)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at paperparcel.internal.ParcelableAdapter.writeToParcel(ParcelableAdapter.java:25)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at co.recharge.consumer.domain.PaperParcelPromoCodes_ReferralInfoWrapper.writeToParcel(PaperParcelPromoCodes_ReferralInfoWrapper.java:42)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	... 54 more
08-01 16:04:00.013 E/AndroidRuntime(26311): Caused by: java.lang.reflect.InvocationTargetException
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at java.lang.reflect.Method.invoke(Native Method)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at paperparcel.PaperParcelable$DefaultImpls.writeToParcel(PaperParcelable.kt:29)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at co.recharge.consumer.api.generated.PromoCode.writeToParcel(APIObjectsGenerated.kt:2157)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at paperparcel.internal.ParcelableAdapter.writeToParcel(ParcelableAdapter.java:51)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at paperparcel.internal.ParcelableAdapter.writeToParcel(ParcelableAdapter.java:25)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at co.recharge.consumer.api.generated.PaperParcelGetReferralInfoResponse.writeToParcel(PaperParcelGetReferralInfoResponse.java:49)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	... 61 more
08-01 16:04:00.013 E/AndroidRuntime(26311): Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at paperparcel.internal.ListAdapter.writeToParcel(ListAdapter.java:44)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at paperparcel.internal.ListAdapter.writeToParcel(ListAdapter.java:25)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	at co.recharge.consumer.api.generated.PaperParcelPromoCode.writeToParcel(PaperParcelPromoCode.java:98)
08-01 16:04:00.013 E/AndroidRuntime(26311): 	... 67 more
@kattrali
Copy link
Contributor

kattrali commented Aug 4, 2017

Thanks for the report, @edenman. There is a lot of options here. Potentially we could mark reflection exception frames as not likely being the root cause, which would then surface the NPE in this particular case. 🤔 Might have to think about this one more to determine the general case.

@JakeWharton
Copy link
Contributor

JakeWharton commented Aug 5, 2017 via email

@kattrali
Copy link
Contributor

kattrali commented Aug 5, 2017

That makes sense to me. Thanks, @JakeWharton.

@kattrali
Copy link
Contributor

Update for visibility: The change is something we should make during event processing, rather than have the client process and discard exceptions or stack frames. Investigating how we should detect and better surface the underlying exception.

lemnik pushed a commit that referenced this issue Jun 2, 2021
Update plugin to extract SO files from transitive dependencies
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