Skip to content

Conversation

pedrofsn
Copy link
Contributor

What does it fix?

Closes #177

How has it been tested?

I don't know how to test this. But I've fixed a very close problem in other project with this same approach.

You can decline this PR if was not good or not running well in tests!
I'm just trying to help and we need a good and executable code. :)

@aniri
Copy link
Member

aniri commented Oct 27, 2020

The app crashes with the following error when opening the guide from the menu:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: ro.code4.monitorizarevot, PID: 16720
    java.lang.IllegalStateException: Fragment ProgressDialogFragment{23185ec} (f4d93270-89a4-4b50-be5c-b6bd86c465d3)} not associated with a fragment manager.
        at androidx.fragment.app.Fragment.getParentFragmentManager(Fragment.java:945)
        at androidx.fragment.app.DialogFragment.dismissInternal(DialogFragment.java:271)
        at androidx.fragment.app.DialogFragment.dismiss(DialogFragment.java:228)
        at ro.code4.monitorizarevot.ui.guide.GuideFragment$onViewCreated$$inlined$apply$lambda$1.onPageFinished(GuideFragment.kt:55)
        at Y5.b(PG:2)
        at Vm.handleMessage(PG:65)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:237)
        at android.app.ActivityThread.main(ActivityThread.java:8125)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)

Could you please check? @pedrofsn

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@pedrofsn
Copy link
Contributor Author

Hello @aniri, now it's working!

ezgif-2-82e763b80289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] ProgressDialogFragment crash the app when fast switching to fragments
2 participants