willowtreeapps / Hyperion-Android

App Debugging & Inspection Tool for Android
MIT License
1.95k stars 144 forks source link

NPE: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText #212

Open ber4444 opened 3 years ago

ber4444 commented 3 years ago
Caused by:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
   com.willowtreeapps.hyperion.core.internal.HyperionPluginView.<init>(HyperionPluginView.java:46)
   com.willowtreeapps.hyperion.core.internal.HyperionPluginView.<init>(HyperionPluginView.java:36)
   com.willowtreeapps.hyperion.core.internal.HyperionPluginView.<init>(HyperionPluginView.java:32)
   com.willowtreeapps.hyperion.core.internal.InstallationLifecycleDelegate.onActivityCreated(InstallationLifecycleDelegate.java:56)
   com.willowtreeapps.hyperion.core.internal.Lifecycle.onActivityCreated(Lifecycle.java:24)
   com.willowtreeapps.hyperion.core.internal.HyperionIgnoreFilter.onActivityCreated(HyperionIgnoreFilter.java:26)
   android.app.Application.dispatchActivityCreated(Application.java:417)
   android.app.Activity.dispatchActivityCreated(Activity.java:1202)
   android.app.Activity.onCreate(Activity.java:1475)
   androidx.core.app.ComponentActivity.onCreate(ComponentActivity.java:85)
   androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:154)
   androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:312)
   androidx.appcompat.app.AppCompatActivity.onCreate(AppCompatActivity.java:115)
michaelmwhite commented 3 years ago

Can you provide more info on this? What actions were you doing when you encountered this, what Android version were you using, and what device was this on? @ber4444

ushi3 commented 3 years ago

In the past, we had the same exception. In our environment, when this happens, by doing a clean build and install app again to solved.

Our Study

In our study, this exception may not by Hyperion.

The cause is unknown, the Resource IDs into resource XML may not be updated when building the app. Referenced Resource ID in resource XML are expanded to inline resource ID at app building. (ex. @+id/foo to @ref/0x7f090103)

And when that happens, cause issue's exception on runtime. However, Hyperion is the first to reference any resource ID at runtime, so occur this issue's problem. This is a coincidence. if the resource ID is not updated, the resource string may be different at runtime.

We couldn't fix this problem. but we no longer see occur it. so that's why we stopped looking into this. that all the information we can given.

Toubap commented 3 years ago

same thing happening to me

nishtahir commented 3 years ago

@Toubap Have you got any more information about what actions were you doing when you encountered this, what Android version were you using, and what device was this on?

HectorCardoso53 commented 1 year ago

tambem aconteceu comigo