via gplay console:
java.lang.NullPointerException:
at com.owncloud.android.ui.fragment.OCFileListFragment.exitSelectionMode (OCFileListFragment.java:1590)
at com.owncloud.android.ui.fragment.OCFileListFragment.onFileActionChosen (OCFileListFragment.java:950)
at com.owncloud.android.ui.fragment.OCFileListFragment.lambda$onOverflowIconClicked$1$OCFileListFragment (OCFileListFragment.java:417)
at com.owncloud.android.ui.fragment.OCFileListFragment$$Lambda$1.onMenuItemClick (Unknown Source:4
at android.widget.PopupMenu$1.onMenuItemSelected (PopupMenu.java:105)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected (MenuBuilder.java:761)
at com.android.internal.view.menu.MenuItemImpl.invoke (MenuItemImpl.java:172)
at com.android.internal.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:908)
at com.android.internal.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:898)
at com.android.internal.view.menu.MenuPopup.onItemClick (MenuPopup.java:128)
at android.widget.AdapterView.performItemClick (AdapterView.java:350)
at android.widget.AbsListView.performItemClick (AbsListView.java:1683)
at android.widget.AbsListView$PerformClick.run (AbsListView.java:4094)
at android.widget.AbsListView$10.run (AbsListView.java:6582)
at android.os.Handler.handleCallback (Handler.java:789)
at android.os.Handler.dispatchMessage (Handler.java:98)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6944)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
and
java.lang.RuntimeException:
at android.app.ActivityThread.deliverResults (ActivityThread.java:4491)
at android.app.ActivityThread.handleSendResult (ActivityThread.java:4534)
at android.app.ActivityThread.-wrap20 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1752)
at android.os.Handler.dispatchMessage (Handler.java:105)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6940)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
Caused by: java.lang.NullPointerException:
at com.owncloud.android.ui.fragment.OCFileListFragment.exitSelectionMode (OCFileListFragment.java:1590)
at com.owncloud.android.ui.activity.FileDisplayActivity.exitSelectionMode (FileDisplayActivity.java:998)
at com.owncloud.android.ui.activity.FileDisplayActivity.onActivityResult (FileDisplayActivity.java:977)
at android.app.Activity.dispatchActivityResult (Activity.java:7556)
at android.app.ActivityThread.deliverResults (ActivityThread.java:4487)
The code is as:
public void exitSelectionMode() {
mActiveActionMode.finish();
}
So yes, we could just add a null-check while I still don't know why the variable would be null.
GitMate.io thinks possibly related issues are https://github.com/nextcloud/android/issues/2642 ([3.2.0RC1] Back from settings), https://github.com/nextcloud/android/issues/1979 (3.0RC1 Share Icon disappears), https://github.com/nextcloud/android/issues/105 (NPE in OCFileListFragment.isGridViewPreferred), https://github.com/nextcloud/android/issues/2641 ([3.2.0RC1] NPE in FileDetailSharingFragment.setupView:157), and https://github.com/nextcloud/android/issues/2640 ([3.2.0RC1] NPE in ActivitiesActivity.setProgressIndicatorState).
cc @tobiasKaminsky @jmintb
It is null after "finish" is called.
Maybe this is some kind of race condition, where two steps were done at once, e.g. sync files and immediately set them as keep available offline.
But changing this to have a null check is ok. It then only can happen that the selection remains after operation.
This is happening, when clicking on overflow menu on a single file and select download.
When downloading a file, the 3.3.0RC1 immediately crashes on my Android 8.0 HUAWEI P8 Lite 2017. Same crash when changing the sync option. The Nextcloud app does not crash when firsdt viewing an image file and then downloading.
I suppose this is the NPE discussed in this issue. Pls. fix as soon as possible.
Most like this is a doublure: https://github.com/nextcloud/android/issues/2957
@Wikinaut the issue has been fixed by @tobiasKaminsky :heart: Backporting PR is #2976
See also https://github.com/nextcloud/android/issues/2957 .
Please push out a new beta version having this issue fixed; it's a killer bug.
RC2 will be published this afternoon
@Wikinaut the RC2 (with the fix) has just been pushed to GPlay :rocket:
I confirm, that the issue has been fixed! (thanks)
Most helpful comment
I confirm, that the issue has been fixed! (thanks)