Android: Trying to copy a file crahes the app

Created on 14 Jan 2020  路  6Comments  路  Source: nextcloud/android

Steps to reproduce

  1. Go to a folder
  2. Select a file with a long tap
  3. Select Copy

Expected behaviour

  • A prompt is open to chose where to copy the file

Actual behaviour

  • the app crashes

Environment data

Android version: 9 (may patch)

Device model: lg g6

Stock or customized system: stock plus magisk

Nextcloud app version: 3.10.0 RC2

Nextcloud server version: 16.0.6

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Can't find it

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

bug

All 6 comments

@llucax do you see a crash log in the app you can post here? Couldn't reproduce the issue. Cc @tobiasKaminsky

OK, now I saw there is a stacktrace after the crash (when I selected to report the issue the traceback was lost, but it's 100% reproducible for me):

************ CAUSE OF ERROR ************

java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.MenuItem.setVisible(boolean)' on a null object reference
    at com.owncloud.android.ui.fragment.OCFileListFragment.onPrepareOptionsMenu(OCFileListFragment.java:796)
    at androidx.fragment.app.Fragment.performPrepareOptionsMenu(Fragment.java:2723)
    at androidx.fragment.app.FragmentManagerImpl.dispatchPrepareOptionsMenu(FragmentManagerImpl.java:2743)
    at androidx.fragment.app.FragmentController.dispatchPrepareOptionsMenu(FragmentController.java:398)
    at androidx.fragment.app.FragmentActivity.onPreparePanel(FragmentActivity.java:489)
    at androidx.appcompat.view.WindowCallbackWrapper.onPreparePanel(WindowCallbackWrapper.java:99)
    at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onPreparePanel(AppCompatDelegateImpl.java:2857)
    at androidx.appcompat.view.WindowCallbackWrapper.onPreparePanel(WindowCallbackWrapper.java:99)
    at androidx.appcompat.app.ToolbarActionBar$ToolbarCallbackWrapper.onPreparePanel(ToolbarActionBar.java:522)
    at androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:456)
    at androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:56)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:205)
    at android.app.ActivityThread.main(ActivityThread.java:6991)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:884)

************ APP INFORMATION ************
ID: com.nextcloud.client
Version: 30100052
Build flavor: gplay

************ DEVICE INFORMATION ************
Brand: lge
Device: lucye
Model: LG-H870
Id: PKQ1.190522.001
Product: lucye_global_com

************ FIRMWARE ************
SDK: 28
Release: 9
Incremental: 1930916292597

I also went to the app and cleared the logs and then reproduced the crash, reopened the app and saved the logs. I'm not super comfortable with sharing the logs because it has a lot of personal information (like folders I'm visiting, etc.) I'm not very happy to share publicly.

Is there any way I can send you the logs in a more private way?

The stack is just fine. This is a known issue which has already been fixed and will be released with rc3 馃憤 thanks for taking the time to report and find the stack trace.

I'm closing the issue since the fix is already done.

Cool! Thanks for taking the time to have a look at this!

My pleasure and again thanks for testing and report, this is highly appreciated 鉂わ笍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daywalk3r666 picture daywalk3r666  路  3Comments

Tie-fighter picture Tie-fighter  路  3Comments

tobiasKaminsky picture tobiasKaminsky  路  3Comments

rainer042 picture rainer042  路  3Comments

tobiasKaminsky picture tobiasKaminsky  路  3Comments