Nextcloud-notes: App crashes when select folder

Created on 7 Jan 2020  Â·  7Comments  Â·  Source: stefan-niedermann/nextcloud-notes

Since the last two updates everytime I choose a folder the app crashed.
It leaves a message as follows:

Version: 2.4.0

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Object.equals(java.lang.Object)' on a null object reference
    at it.niedermann.owncloud.notes.android.activity.NotesListViewActivity$3.selectItem(NotesListViewActivity.java:391)
    at it.niedermann.owncloud.notes.android.activity.NotesListViewActivity$3.onItemClick(NotesListViewActivity.java:380)
    at it.niedermann.owncloud.notes.model.NavigationAdapter$ViewHolder.lambda$new$1$NavigationAdapter$ViewHolder(NavigationAdapter.java:77)
    at it.niedermann.owncloud.notes.model.-$$Lambda$NavigationAdapter$ViewHolder$OkYHxuu6q_bonF1t_PKsj8z8N5U.onClick(Unknown Source:4)
    at android.view.View.performClick(View.java:6597)
    at android.view.View.performClickInternal(View.java:6574)
    at android.view.View.access$3100(View.java:778)
    at android.view.View$PerformClick.run(View.java:25889)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6692)
    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:858)
![](null)
Bug

All 7 comments

Thank you for the bug report. I will have a look as soon as i can.

Workaround until this bug has been fixed: Create a dummy note (content doesn't matter) without any category.

Selecting should then work properly.

NotesListView, line 391 needs a null check on itemUncategorized. Maybe you want to create a Pull Request? :)

That's a bit weird, ain't it? I mean, why should I need an uncategorised
note? Wouldn't be better not to have that obligation?
Anyway, great app!!!

El mié., 8 ene. 2020 8:29, Niedermann IT-Dienstleistungen <
[email protected]> escribió:

Workaround this bug has been fixed: Create a dummy note (content doesn't
matter) without any category.

Selecting should then work properly.

NotesListView, line 391 needs a null check on itemUncategorized. Maybe
you want to create a Pull Request? :)

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/stefan-niedermann/nextcloud-notes/issues/669?email_source=notifications&email_token=AB2IGP7WAIMPUEXIPFG2TPDQ4V6HBA5CNFSM4KD7XZS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEILOJZY#issuecomment-571925735,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB2IGP3WDPUULSG6EQZRXADQ4V6HBANCNFSM4KD7XZSQ
.

Yes, of course :) This is a bug, not a wanted behavior and its origin is a refactoring i did a few releases ago.

It's just a workaround for you, so you can work without problems until the next release comes with the fix :)

Sounds like you know what's wrong, and your workaround worked for me as well, but I'll contribute my info anyway just in case it may help:

Android version: LineageOS 16 (Android 9) with MindtheGAPPS

Device: Google Pixel

System language: English (US)

App version: e. g. v0.8.1

App source: F-droid

Steps to reproduce:

  1. open the app
  2. click on a folder

Errorlog:

Version: 2.4.0

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Object.equals(java.lang.Object)' on a null object reference
    at it.niedermann.owncloud.notes.android.activity.NotesListViewActivity$3.selectItem(NotesListViewActivity.java:391)
    at it.niedermann.owncloud.notes.android.activity.NotesListViewActivity$3.onItemClick(NotesListViewActivity.java:380)
    at it.niedermann.owncloud.notes.model.NavigationAdapter$ViewHolder.lambda$new$1$NavigationAdapter$ViewHolder(NavigationAdapter.java:77)
    at it.niedermann.owncloud.notes.model.-$$Lambda$NavigationAdapter$ViewHolder$OkYHxuu6q_bonF1t_PKsj8z8N5U.onClick(Unknown Source:4)
    at android.view.View.performClick(View.java:6597)
    at android.view.View.performClickInternal(View.java:6574)
    at android.view.View.access$3100(View.java:778)
    at android.view.View$PerformClick.run(View.java:25906)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6718)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Thank you :) Yes i know what's wrong and it's easy to fix. Hope i have time to implement and release it today in the evening.

Issue has been fixed in version 2.4.4.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

returntrip picture returntrip  Â·  4Comments

frederiiiic picture frederiiiic  Â·  8Comments

edrohler picture edrohler  Â·  4Comments

kamni picture kamni  Â·  6Comments

quthla picture quthla  Â·  4Comments