Android: Crash creating folder

Created on 30 Dec 2019  路  10Comments  路  Source: nextcloud/android

*** CAUSE OF ERROR ***

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.owncloud.android.datamodel.OCFile.canWrite()' on a null object reference
at com.owncloud.android.ui.activity.ReceiveExternalFilesActivity.onCreateOptionsMenu(ReceiveExternalFilesActivity.java:1030)
at android.app.Activity.onCreatePanelMenu(Activity.java:3465)
at androidx.fragment.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:325)
at androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:94)
at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onCreatePanelMenu(AppCompatDelegateImpl.java:2830)
at androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:94)
at androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:455)
at androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:56)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:655)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
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)

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

*** DEVICE INFORMATION ***
Brand: samsung
Device: herolte
Model: SM-G930F
Id: R16NW
Product: heroltexx

*** FIRMWARE ***
SDK: 26
Release: 8.0.0
Incremental: G930FXXS6ESJ2

Steps to reproduce

  1. Share file
  2. Change serveur
  3. Create folder
bug needs infdiscussion stale

Most helpful comment

Based on what @AndyScherzinger said I revisited it.
I believe him when he states that this is not the same as the issue #4792 and have looked more carefully and updated that ticket with more info.

To that end, you may ignore my comments on this issue but other's may have more to say on it.

All 10 comments

Reproduced easily for me... on two diff devices.

  1. Select _Auto upload_
  2. Select _Set up a custom folder_
  3. Select _Remote folder_
  4. Select _New folder_
  5. Enter any name press _Create_

BOOM


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

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.owncloud.android.datamodel.OCFile.getRemotePath()' on a null object reference
at com.owncloud.android.ui.dialog.CreateFolderDialogFragment.onClick(CreateFolderDialogFragment.java:139)
at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

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

*** DEVICE INFORMATION ***
Brand: google
Device: manta
Model: Nexus 10
Id: LMY49J
Product: mantaray

*** FIRMWARE ***
SDK: 22
Release: 5.1.1
Incremental: 2640980
~~~


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

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.owncloud.android.datamodel.OCFile.getRemotePath()' on a null object reference
at com.owncloud.android.ui.dialog.CreateFolderDialogFragment.onClick(CreateFolderDialogFragment.java:139)
at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7073)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)

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

*** DEVICE INFORMATION ***
Brand: samsung
Device: dream2qltesq
Model: SM-G955U
Id: PPR1.180610.011
Product: dream2qltesq

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

~~~

@MichaelTiernan your error has no link to the one reported here, see ReceiveExternalFilesActivity within the initial post which posts to files shared to Nextcloud via Androids share Action from within another app. Yours is a duplicate of #4792 - please comment over there so we have all info in one central place and it be important where you create the folder (root, or sub-directory for example).

@zicmama do you know when an how this occurs? Can you reliable reproduce it?

@MichaelTiernan your error has no link to the one reported here, s

Thanks for the correction.

I'll revist this more carefully.

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

Based on what @AndyScherzinger said I revisited it.
I believe him when he states that this is not the same as the issue #4792 and have looked more carefully and updated that ticket with more info.

To that end, you may ignore my comments on this issue but other's may have more to say on it.

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@Shagequi does your fix also work in this scenario (create folder NPE)

Reproduced easily for me... on two diff devices.

1. Select _Auto upload_

2. Select _Set up a custom folder_

3. Select _Remote folder_

4. Select _New folder_

5. Enter any name press _Create_

I tested this with 3.11 RC2, and it worked.
Can you verify? :-)

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JSoko picture JSoko  路  3Comments

ikke-t picture ikke-t  路  3Comments

eppfel picture eppfel  路  3Comments

rainer042 picture rainer042  路  3Comments

AndyScherzinger picture AndyScherzinger  路  3Comments