Automattic / Automattic/simplenote-android

Crash when opening note in debug in trunk

Open
#1,762 1 comment 0 reactions 0 assignees View on GitHub
crash
Dominant language
Java
Stars
1.9k
Forks
318
Avg merge
15h 23m
Merged PRs (30d)
5

Description

### Expected
no crashes, app works flawlessly

### Observed
```

2025-08-01 12:32:00.482 8603-8603 AndroidRuntime pid-8603 E FATAL EXCEPTION: main (Ask Gemini)
Process: com.automattic.simplenote.debug, PID: 8603
android.view.InflateException: Binary XML file line #52 in com.automattic.simplenote.debug:layout/fragment_note_editor: Binary XML file line #52 in com.automattic.simplenote.debug:layout/fragment_note_editor: Error inflating class com.automattic.simplenote.widgets.SimplenoteEditText
Caused by: android.view.InflateException: Binary XML file line #52 in com.automattic.simplenote.debug:layout/fragment_note_editor: Error inflating class com.automattic.simplenote.widgets.SimplenoteEditText
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:866)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1018)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:973)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1135)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1096)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1138)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1096)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1138)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1096)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1138)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1096)
at android.view.LayoutInflater.inflate(LayoutInflater.java:694)
at android.view.LayoutInflater.inflate(LayoutInflater.java:538)
at com.automattic.simplenote.NoteEditorFragment.onCreateView(NoteEditorFragment.java:427)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:3119)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:577)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:286)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2214)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2109)
at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:2002)
at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:323)
at androidx.fragment.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:249)
at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1244)
at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1092)
at androidx.viewpager.widget.ViewPager.onMeasure(ViewPager.java:1622)
at android.view.View.measure(View.java:27122)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:1031)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
at android.view.View.measure(View.java:27122)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7008)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:760)
at com.google.android.material.appbar.HeaderScrollingViewBehavior.onMeasureChild(HeaderScrollingViewBehavior.java:100)
at com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior.onMeasureChild(AppBarLayout.java:2365)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:831)
at android.view.View.measure(View.java:27122)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7008)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:141)
at android.view.View.measure(View.java:27122)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7008)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:27122)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7008)
2025-08-01 12:32:00.486 8603-8603 AndroidRuntime pid-8603 E at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) (Ask Gemini)
at android.view.View.measure(View.java:27122)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7008)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1608)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:878)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
at android.view.View.measure(View.java:27122)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7008)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:750)
at android.view.View.measure(View.java:27122)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:4182)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2759)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3086)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2465)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9305)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1339)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1348)
at android.view.Choreographer.doCallbacks(Choreographer.java:952)
at android.view.Choreographer.doFrame(Choreographer.java:882)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1322)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.automattic.simplenote.utils.LinkTokenizer.findTokenStart(java.lang.CharSequence, int)' on a null object reference
at com.automattic.simplenote.widgets.SimplenoteEditText.enoughToFilter(SimplenoteEditText.java:76)
at android.widget.AutoCompleteTextView.refreshAutoCompleteResults(AutoCompleteTextView.java:961)
at android.widget.AutoCompleteTextView$MyWatcher.afterTextChanged(AutoCompleteTextView.java:927)
at android.widget.TextView.sendAfterTextChanged(TextView.java:12365)
at android.widget.TextView.setText(TextView.java:7196)
at android.widget.TextView.setText(TextView.java:6994)
at android.widget.EditText.setText(EditText.java:149)
at android.widget.TextView.setText(TextView.java:6946)
at android.widget.TextView.setEditableFactory(TextView.java:6903)
at androidx.emoji2.viewsintegration.EmojiEditTextHelper$HelperInternal19.(EmojiEditTextHelper.java:269)
at androidx.emoji2.viewsintegration.EmojiEditTextHelper.(EmojiEditTextHelper.java:110)
at androidx.appcompat.widget.AppCompatEmojiEditTextHelper.(AppCompatEmojiEditTextHelper.java:52)
at androidx.appcompat.widget.AppCompatMultiAutoCompleteTextView.(AppCompatMultiAutoCompleteTextView.java:100)
at androidx.appcompat.widget.AppCompatMultiAutoCompleteTextView.(AppCompatMultiAutoCompleteTextView.java:77)
at com.automattic.simplenote.widgets.SimplenoteEditText.(SimplenoteEditText.java:92)
... 74 more
2025-08-01 12:39:02.462 8733-8733 AndroidRuntime pid-8733 E FATAL EXCEPTION: main (Ask Gemini)

```

### Reproduced
I could not see this more than once.

Contributor guide

Open the contributing guide

Research direction

Reproduce the crash by opening a note in the debug app, then start at app/src/main/res/layout/fragment_note_editor.xml line 52 and com.automattic.simplenote.widgets.SimplenoteEditText. Trace the constructor failure from NoteEditorFragment.onCreateView at line 427 and obtain the full underlying exception. Done means opening a note in debug no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.