Skip to content

[Bug]: App Crashes after clicking on Explore in bottom Navigation #5547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shashankiitbhu opened this issue Feb 14, 2024 · 6 comments · Fixed by #5550
Closed

[Bug]: App Crashes after clicking on Explore in bottom Navigation #5547

shashankiitbhu opened this issue Feb 14, 2024 · 6 comments · Fixed by #5550
Assignees
Labels

Comments

@shashankiitbhu
Copy link
Contributor

shashankiitbhu commented Feb 14, 2024

Summary

App Crashes after clicking on "Explore" in the bottom Navigation Bar

Steps to reproduce

  1. Open App
  2. Click on the "Explore" Navigation Item

Expected behaviour

Explore Tab Opens

Actual behaviour

App Crashes

Device name

Xaomi 11 Lite NE

Android version

13

Commons app version

4.2.1-debug-main

Device logs

No response

Screen-shots

WhatsApp.Video.2024-02-14.at.4.55.08.PM.mp4

Would you like to work on the issue?

Yes

@shashankiitbhu
Copy link
Contributor Author

Seems like the Issue arose due to one of the recent commits, performing git bisect to find out more

@kanahia1
Copy link
Contributor

Hey @shashankiitbhu, I think it is caused by https://github.com/commons-app/apps-android-commons/pull/5546/files#diff-c3e9d0acd2bc44a047fc23500518a5914f2b129d9e79de699cbe42802734cd9b

Hopefully code seems good to me, idk what is causing an issue.

Changing the code in PageableMediaFragment.kt helped me fix crashing but the screen keeps on loading. Can you please look into it.

override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        super.onCreateView(inflater, container, savedInstanceState) // Add this line
        _binding = FragmentSearchPaginatedBinding.inflate(inflater, container, false)
        return binding.root
    }
WhatsApp.Video.2024-02-15.at.11.15.48_fe5bf432.mp4

@shashankiitbhu
Copy link
Contributor Author

shashankiitbhu commented Feb 15, 2024

Hi @kanahia1 thanks for taking the time on this , I already found out that it was caused by #5546 yesterday (as I mentioned this in the duplicate closed issue, sorry for typo there😅) ,I am currently fixing this, what I have understood till now is that this issue was caused particularly due to binding not loading (in BasePagerFragment ) , will give an update soon on this one, thanks 👍

@shashankiitbhu
Copy link
Contributor Author

Changing the code in PageableMediaFragment.kt helped me fix crashing but the screen keeps on loading. Can you please look into it.

@kanahia1 That is not fixing the issue, it's just calling the onCreateView() of the superclass (BasePagingFragment in this case) which is not really needed here, it is merely escaping the issue (the core problem with binding still remains ). That Same result can be achieved in other ways too but that won't fix the issue at all, which is with the binding. Our goal here is not find stop the crashing but to fix the core problem with the binding so that compose binding migration is successful.

I am pretty close to fixing the issue and have come to a possible solution, I will be adding a PR soon regarding this, thanks 👍🏼

@kanahia1
Copy link
Contributor

Ah!, I got it

Best of luck @shashankiitbhu

@shashankiitbhu
Copy link
Contributor Author

@nicolas-raoul Please Review the above PR and merge so that this crucial Crash can be resolved soon, thanks

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

Successfully merging a pull request may close this issue.

2 participants