google / dagger

A fast dependency injector for Android and Java.
https://dagger.dev
Apache License 2.0
17.42k stars 2.01k forks source link

v2.48: android.util.SuperNotCalledException... did not call through to super.onCreate() #4076

Closed tapet-app closed 1 year ago

tapet-app commented 1 year ago

Hi,

Since I updated to the latest version (2.48), I started seeing many of these exceptions. I reverted to 2.47 and they were all gone.

I wasn't personally able to repro any of the exceptions but I saw thousands in Crashlytics.

Galaxy A21s, Android 12 Honor 8X, Android 9 Pova 4, Android 12 Redmi 9, Android 12 Mi 11, Android 13 Galaxy M12, Android 13 And more...

Here's the code:

image

RootActivity is empty. It's only this one line ^

image

Here's the stack trace:

Fatal Exception: android.util.SuperNotCalledException: Activity {com.sharpregion.tapet/com.sharpregion.tapet.root.RootActivity} did not call through to super.onCreate()
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4609)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4845)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:113)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2931)
       at android.os.Handler.dispatchMessage(Handler.java:117)
       at android.os.Looper.loopOnce(Looper.java:205)
       at android.os.Looper.loop(Looper.java:293)
       at android.app.ActivityThread.main(ActivityThread.java:9685)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1211)
Chang-Eric commented 1 year ago

I don't think anything in Hilt has changed here. Has the generated code for your activity (should be called Hilt_RootActivity) changed between 2.47 and 2.48? If not, then I feel like this would be a coincidence.

tapet-app commented 1 year ago

Makes sense as indeed I don't see any custom onCreate code added to the generated activity. I will try again with the new version and monitor.

bjjwon commented 1 week ago

"I'm also experiencing this issue on version 2.48 and above."