Closed phansier closed 4 years ago
This is a problem in the Androidx Fragment library, not in Moxy. At line 32 MvpAppCompatActivity
just calls through to super.onStart()
. You could try to fix this issue by updating the Fragment library to a more recent version.
Updated Moxy to '2.1.2', Fragment to '1.2.4' (most recent stable now is '1.2.5', but seems there are no bugfixes). NullPointerException is not reproduced in console anymore, but appeared similar to it (by stacktrace) IllegalStateException:
java.lang.IllegalStateException:
at androidx.fragment.app.DialogFragment.requireDialog (DialogFragment.java:302)
at androidx.fragment.app.DialogFragment.onGetLayoutInflater (DialogFragment.java:425)
at androidx.fragment.app.Fragment.performGetLayoutInflater (Fragment.java:1484)
at androidx.fragment.app.FragmentStateManager.createView (FragmentStateManager.java:320)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1187)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1356)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState (FragmentManager.java:1434)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1497)
at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:2625)
at androidx.fragment.app.FragmentManager.dispatchActivityCreated (FragmentManager.java:2577)
at androidx.fragment.app.Fragment.performActivityCreated (Fragment.java:2722)
at androidx.fragment.app.FragmentStateManager.activityCreated (FragmentStateManager.java:346)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1188)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1356)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState (FragmentManager.java:1434)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1497)
at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:2625)
at androidx.fragment.app.FragmentManager.dispatchActivityCreated (FragmentManager.java:2577)
at androidx.fragment.app.FragmentController.dispatchActivityCreated (FragmentController.java:247)
at androidx.fragment.app.FragmentActivity.onStart (FragmentActivity.java:541)
at androidx.appcompat.app.AppCompatActivity.onStart (AppCompatActivity.java:201)
at moxy.MvpAppCompatActivity.onStart (MvpAppCompatActivity.java:32)
at android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1395)
at android.app.Activity.performStart (Activity.java:7374)
at android.app.ActivityThread.handleStartActivity (ActivityThread.java:3186)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:180)
at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:165)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:142)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1993)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:216)
at android.app.ActivityThread.main (ActivityThread.java:7266)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:975)
at com.android.internal.os.Device.fp (Device.java)
Any ideas?
This bug is not related to Moxy, so I'm afraid we can't help you.
There are multiple crashes in Google Play Console with no stacktrace of the application and only visible problem in
moxy.MvpAppCompatActivity.onStart
. Here it callssuper.onStart()
, where super is AppCompatActivity. Moxy version is 2.0.0. However, no changes in this class were made since then.Possible fix could be wrap this call with check on null. We will try to up version and monitor the situation.
Full stacktrace: