Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null pointer dereference when saving new note (going to preview mode from edit mode) #2568

Open
4 of 6 tasks
ceskyDJ opened this issue Jan 31, 2025 · 2 comments
Open
4 of 6 tasks

Comments

@ceskyDJ
Copy link

ceskyDJ commented Jan 31, 2025

This issue respects the following points:

Describe the bug

  1. Open the app
  2. Create a new note (set a name, give it some content)
  3. Save the note by switching to preview mode from the edit mode

Expected behavior

It just works without failing on unhandled null pointer dereference exceptions.

Notes Android version

4.3.1

Notes server version

4.11.0

Nextcloud Android version

3.30.8

Nextcloud version

30.0.5

Device

Samsung Galaxy S22

Android Version

14

App Store

  • Google Play Store
  • F-Droid
  • Huawei App Gallery

Stacktrace

App Version: 4.3.1
App Version Code: 40030190
App Flavor: fdroid

Files App Version Code: 30300890 (PROD)

---

OS Version: 5.10.223-android12-9-29544049-abS901BXXUDEXK5(S901BXXUDEXK5)
OS API Level: 34
Device: r0s
Manufacturer: samsung
Model (and Product): SM-S901B (r0sxeea)

---

java.lang.NullPointerException: Attempt to invoke virtual method 'long it.niedermann.owncloud.notes.persistence.entity.Note.getId()' on a null object reference
	at it.niedermann.owncloud.notes.edit.BaseNoteFragment.onCloseNote(BaseNoteFragment.java:305)
	at it.niedermann.owncloud.notes.edit.EditNoteActivity.close(EditNoteActivity.java:374)
	at it.niedermann.owncloud.notes.edit.EditNoteActivity.onBackPressed(EditNoteActivity.java:332)
	at android.app.Activity.onKeyUp(Activity.java:4180)
	at android.view.KeyEvent.dispatch(KeyEvent.java:3529)
	at android.app.Activity.dispatchKeyEvent(Activity.java:4528)
	at androidx.core.app.ComponentActivity.superDispatchKeyEvent(ComponentActivity.kt:103)
	at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:85)
	at androidx.core.app.ComponentActivity.dispatchKeyEvent(ComponentActivity.kt:117)
	at androidx.appcompat.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:604)
	at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:60)
	at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:3413)
	at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:696)
	at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:8559)
	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8419)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7752)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7809)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7775)
	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7978)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7783)
	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:8035)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7756)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7809)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7775)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7783)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7756)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7809)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7775)
	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:8011)
	at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:8253)
	at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:4596)
	at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:4030)
	at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:4021)
	at android.view.inputmethod.InputMethodManager.-$$Nest$mfinishedInputEvent(Unknown Source:0)
	at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:4573)
	at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:154)
	at android.os.MessageQueue.nativePollOnce(Native Method)
	at android.os.MessageQueue.next(MessageQueue.java:335)
	at android.os.Looper.loopOnce(Looper.java:187)
	at android.os.Looper.loop(Looper.java:319)
	at android.app.ActivityThread.main(ActivityThread.java:9063)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

@ceskyDJ
Copy link
Author

ceskyDJ commented Jan 31, 2025

When I reopened the Notes app (on Android), it looked like everything was saved and interesting.

@ceskyDJ
Copy link
Author

ceskyDJ commented Feb 1, 2025

Here is a screenshot of the screen appeared just after I wanted to save my note:
Screenshot_20250201_060632_Nextcloud Notes.jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant