kiwix-android icon indicating copy to clipboard operation
kiwix-android copied to clipboard

Crash Report 3.3.3: Dagger component not initialised in activity creation

Open macgills opened this issue 5 years ago • 5 comments

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 avatar Jul 10 '20 10:07 macgills

@macgills What should we do with that one?

kelson42 avatar Aug 16 '20 06:08 kelson42

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

macgills avatar Aug 17 '20 08:08 macgills

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.

stale[bot] avatar Oct 17 '20 02:10 stale[bot]

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.

stale[bot] avatar Sep 21 '22 04:09 stale[bot]

@MohitMaliFtechiz An update here would be welcome

kelson42 avatar Sep 21 '22 05:09 kelson42

hi @kelson42 @macgills ,

I am unable to reproduce this bug on latest develop build.

MohitMaliFtechiz avatar Nov 23 '22 13:11 MohitMaliFtechiz

@MohitMaliFtechiz Please check in Google Play store reports if this still happen

kelson42 avatar Nov 23 '22 13:11 kelson42

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.

MohitMaliFtechiz avatar Nov 25 '22 13:11 MohitMaliFtechiz

Ok for closing rhen.

kelson42 avatar Nov 25 '22 13:11 kelson42