Crash Report 3.3.3: Dagger component not initialised in activity creation
Caused by: kotlin.UninitializedPropertyAccessException:
at org.kiwix.kiwixmobile.core.CoreApp$Companion.getCoreComponent (CoreApp.java:44)
at org.kiwix.kiwixmobile.core.base.BaseActivity.onCreate (BaseActivity.java:43)
at org.kiwix.kiwixmobile.core.splash.CoreSplashActivity.onCreate (CoreSplashActivity.java:30)
This seems like a device bug, the CoreComponent is created in the onCreate of the Application class which happens on the main thread, is one of the leading causes of slow startup times in apps and absolutely should happen before any activity's onCreate.
The only thing I can really think of here is just not using the component here, perhaps reparenting away from BaseActivity and manually constructing some objects for the SplashActivity only. Then also praying the component is initialised before the next screen.
@macgills What should we do with that one?
This might go away with SplashActivity not really existing as the Single Activity Architecture is being migrated to by Frans.
We could also attempt to migrate to Hilt, the newest Dagger library from the jetpack team. I haven't seen any explicit mention of how it works in a multi module scenario but maybe it is just fine
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
@MohitMaliFtechiz An update here would be welcome
hi @kelson42 @macgills ,
I am unable to reproduce this bug on latest develop build.
@MohitMaliFtechiz Please check in Google Play store reports if this still happen
hi @kelson42 ,
The reports suggest it is occurring on version 3.4.5 , but last playstore build was 3.4.4 but no crash report for 3.5.0 and 3.6.0.
Ok for closing rhen.