Apps-android-commons: App is crash when Backbutton is pressed

Created on 7 Dec 2020  路  6Comments  路  Source: commons-app/apps-android-commons

Summary:

App is crash when we are at Contributions,Favorities page and then backButton is pressed

Steps to reproduce:
->Go to contributions,Favorities
->Backbutton pressed
What did you expect the app to do, and what did you see instead?
App does not crash we backbutton pressed

Device and Android version:
Android Device :Redmi
API :29
LogCat
2020-12-07 11:56:58.628 8131-8131/fr.free.nrw.commons.beta E/ACRA: ACRA caught a NullPointerException for fr.free.nrw.commons.beta
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean fr.free.nrw.commons.media.MediaDetailPagerFragment.isVisible()' on a null object reference
at fr.free.nrw.commons.contributions.ContributionsFragment.backButtonClicked(ContributionsFragment.java:610)
at fr.free.nrw.commons.contributions.MainActivity.onBackPressed(MainActivity.java:241)

at android.app.Activity.onKeyUp(Activity.java:3147)
at android.view.KeyEvent.dispatch(KeyEvent.java:2733)
at android.app.Activity.dispatchKeyEvent(Activity.java:3430)
at androidx.core.app.ComponentActivity.superDispatchKeyEvent(ComponentActivity.java:122)
at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:84)
at androidx.core.app.ComponentActivity.dispatchKeyEvent(ComponentActivity.java:140)
at androidx.appcompat.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:558)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)

Commons app version:
2.13.1-debug-master~b24ed1cf6
Screen-shots:
20201207_115241 1

Would you like to work on the issue?
YES
Please let us know whether you want to fix the issue by yourself. If not, anyone can get the issue assigned to them.
YES

bug

All 6 comments

I want to work on this issue
assinged me

Thanks @Prince-kushwaha , please feel free to work on this.

@misaochan review my pull request #4074

Anyone view my pull request -#4085 and #4092 and #4074

I can reproduce this on master.

yes

Was this page helpful?
0 / 5 - 0 ratings