nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.28k stars 1.77k forks source link

Crash when returning to UI a day later after playing video: NPE via `ExtendedListFragment.onCreateOptionsMenu` #8840

Open zell-mbc opened 3 years ago

zell-mbc commented 3 years ago

Steps to reproduce

  1. Start app, navigate to video stored locally
  2. Watch the video
  3. Dont close the video but keep on doing other stuff
  4. return to ui to watch another video (in my case a day later)
  5. ui is showing still of previous video but is unresponsive and crashes eventually

Expected behaviour

Actual behaviour

Can you reproduce this problem on https://try.nextcloud.com?

Environment data

I'm using my tablet, will add these details later when at my PC Android version:

Device model:

Stock or customized system:

Nextcloud app version:

Nextcloud server version:

Reverse proxy:

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

AlvaroBrey commented 3 years ago

This looks like a duplicate of #8686, since it's still media player related. Can you try to get some logs, or reproduce it with the steps defined in #8686? (Play a short MP3 file until it ends, and then hit Back)

zell-mbc commented 3 years ago

Things reliably crashed for a while until I finally decided to log an error, but ever since I haven't seen another one? Maybe an update came along since, I can't remember. But given that things were working for a month now I think it's fair to close this issue for now. I can always reopen (with a proper log) in case it comes back again.

zell-mbc commented 3 years ago

Finally managed to grab the crash log:

**** CAUSE OF ERROR ****

java.lang.NullPointerException: Attempt to invoke interface method 'android.view.View android.view.MenuItem.getActionView()' on a null object reference
    at androidx.core.view.MenuItemCompat.getActionView(MenuItemCompat.java:188)
    at com.owncloud.android.ui.fragment.ExtendedListFragment.onCreateOptionsMenu(ExtendedListFragment.java:192)
    at androidx.fragment.app.Fragment.performCreateOptionsMenu(Fragment.java:3100)
    at androidx.fragment.app.FragmentManager.dispatchCreateOptionsMenu(FragmentManager.java:3181)
    at androidx.fragment.app.FragmentController.dispatchCreateOptionsMenu(FragmentController.java:391)
    at androidx.fragment.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:288)
    at androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:94)
    at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onCreatePanelMenu(AppCompatDelegateImpl.java:3084)
    at androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:94)
    at androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:456)
    at androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:57)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:999)
    at android.view.Choreographer.doCallbacks(Choreographer.java:797)
    at android.view.Choreographer.doFrame(Choreographer.java:728)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:984)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:237)
    at android.app.ActivityThread.main(ActivityThread.java:8107)
    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)

**** APP INFORMATION **** ID: com.nextcloud.client Version: 30170090 Build flavor: generic

**** DEVICE INFORMATION **** Brand: samsung Device: gts4lwifi Model: SM-T830 Id: QP1A.190711.020 Product: gts4lwifixx

**** FIRMWARE **** SDK: 29 Release: 10 Incremental: T830XXU5CUE2 ` Same situation again:

  1. returned to the nextcloud client
  2. Video was still playing / started again from two days ago
  3. I think I pressed the back arrow
  4. Crash