OpenTracksApp / OpenTracks

OpenTracks is a sport tracking application that completely respects your privacy.
https://OpenTracksApp.com
Apache License 2.0
1.07k stars 190 forks source link

Pressing 'Select All' button from menu crashes app #1712

Closed virginiaprivacycoalition closed 1 year ago

virginiaprivacycoalition commented 1 year ago

App information

Device information

Firmware

Cause of error

Exception in thread "main": java.lang.NullPointerException: Attempt to invoke virtual method 'void de.dennisguse.opentracks.ui.TrackListAdapter$ViewHolder.setSelected(boolean)' on a null object reference
    at de.dennisguse.opentracks.ui.TrackListAdapter.setAllSelected(TrackListAdapter.java:135)
    at de.dennisguse.opentracks.TrackListActivity.handleContextItem(TrackListActivity.java:434)
    at de.dennisguse.opentracks.TrackListActivity.-$$Nest$mhandleContextItem(Unknown Source:0)
    at de.dennisguse.opentracks.TrackListActivity$1.onClick(TrackListActivity.java:104)
    at de.dennisguse.opentracks.ui.TrackListAdapter.onActionItemClicked(TrackListAdapter.java:116)
    at androidx.appcompat.app.AppCompatDelegateImpl$ActionModeCallbackWrapperV9.onActionItemClicked(AppCompatDelegateImpl.java:3022)
    at androidx.appcompat.view.StandaloneActionMode.onMenuItemSelected(StandaloneActionMode.java:140)
    at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:836)
    at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:159)
    at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:987)
    at androidx.appcompat.view.menu.MenuPopup.onItemClick(MenuPopup.java:128)
    at android.widget.AdapterView.performItemClick(AdapterView.java:330)
    at android.widget.AbsListView.performItemClick(AbsListView.java:1222)
    at android.widget.AbsListView$PerformClick.run(AbsListView.java:3236)
    at android.widget.AbsListView.onTouchUp(AbsListView.java:4256)
    at android.widget.AbsListView.onTouchEvent(AbsListView.java:3981)
    at androidx.appcompat.widget.DropDownListView.onTouchEvent(DropDownListView.java:236)
    at androidx.appcompat.widget.MenuPopupWindow$MenuDropDownListView.onTouchEvent(MenuPopupWindow.java:140)
    at android.view.View.dispatchTouchEvent(View.java:15067)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3135)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3148)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2816)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3148)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2816)
    at android.widget.PopupWindow$PopupDecorView.dispatchTouchEvent(PopupWindow.java:2578)
    at android.view.View.dispatchPointerEvent(View.java:15342)
    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:7028)
    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6798)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6217)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6274)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6240)
    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6405)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6248)
    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6462)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6221)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6274)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6240)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6248)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6221)
    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:9400)
    at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:9351)
    at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:9319)
    at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:9539)
    at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:298)
    at android.os.MessageQueue.nativePollOnce(Native Method)
    at android.os.MessageQueue.next(MessageQueue.java:341)
    at android.os.Looper.loopOnce(Looper.java:169)
    at android.os.Looper.loop(Looper.java:300)
    at android.app.ActivityThread.main(ActivityThread.java:8395)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
virginiaprivacycoalition commented 1 year ago

This seems like the same bug as #1711 so I'll close as duplicate and post under that issue.