Page MenuHomePhabricator

Crash when Highlighting History
Closed, ResolvedPublic

Description

  1. Open the app fresh
  2. Copy some text from the front page article
  3. Highlight something else on the front page article
  4. Slide open the left hand menu
  5. Select history
  6. Long press in the search history field
  7. Tap paste
  8. Long press on the first word

Stacktrace (from dev build):

E  org.wikipedia fatal error : Attempt to invoke virtual method 'org.wikipedia.page.Page org.wikipedia.page.PageViewFragmentInternal.getPage()' on a null object reference                                             
E  java.lang.NullPointerException: Attempt to invoke virtual method 'org.wikipedia.page.Page org.wikipedia.page.PageViewFragmentInternal.getPage()' on a null object reference
E      at org.wikipedia.page.snippet.ShareHandler.createFunnel(ShareHandler.java:39)                                                                                                                                   
E      at org.wikipedia.page.snippet.TextSelectedShareAdapter.onTextSelected(TextSelectedShareAdapter.java:122)
E      at org.wikipedia.page.PageActivity.onSupportActionModeStarted(PageActivity.java:858)
E      at android.support.v7.app.ActionBarActivityDelegateBase.startSupportActionModeFromWindow(ActionBarActivityDelegateBase.java:667)
E      at android.support.v7.app.ActionBarActivityDelegate$1.startActionMode(ActionBarActivityDelegate.java:99)
E      at android.support.v7.widget.WindowCallbackWrapper.startActionMode(WindowCallbackWrapper.java:69)
E      at android.support.v7.internal.app.ToolbarActionBar.startActionMode(ToolbarActionBar.java:206)
E      at android.support.v7.app.ActionBarActivityDelegateBase.startSupportActionMode(ActionBarActivityDelegateBase.java:581)
E      at android.support.v7.app.ActionBarActivityDelegateHC.startActionModeForChild(ActionBarActivityDelegateHC.java:62)
E      at android.support.v7.internal.widget.NativeActionModeAwareLayout.startActionModeForChild(NativeActionModeAwareLayout.java:44)
E      at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:700)
E      at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:700)
E      at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:700)
E      at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:700)
E      at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:700)
E      at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:700)
E      at android.view.View.startActionMode(View.java:4881)
E      at android.widget.Editor.startSelectionActionMode(Editor.java:1558)
E      at android.widget.Editor.performLongClick(Editor.java:890)
E      at android.widget.TextView.performLongClick(TextView.java:8689)
E      at android.view.View$CheckForLongPress.run(View.java:19840)
E      at android.os.Handler.handleCallback(Handler.java:739)
E      at android.os.Handler.dispatchMessage(Handler.java:95)
E      at android.os.Looper.loop(Looper.java:135)
E      at android.app.ActivityThread.main(ActivityThread.java:5257)
E      at java.lang.reflect.Method.invoke(Native Method)
E      at java.lang.reflect.Method.invoke(Method.java:372)
E      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Details

Related Gerrit Patches:
apps/android/wikipedia : masterFix crash when rotating with highlighted text.

Event Timeline

Niedzielski raised the priority of this task from to Needs Triage.
Niedzielski updated the task description. (Show Details)
Niedzielski added a subscriber: Niedzielski.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 4 2015, 3:36 AM
Dbrant triaged this task as High priority.May 4 2015, 10:00 PM
Dbrant moved this task from Needs Triage to Bug Backlog on the Wikipedia-Android-App-Backlog board.
Dbrant added a subscriber: Dbrant.

I failed to reproduce this in production in 5.1, repro'd on my first try in the production version on 4.4 and wrote a possible fix, but now I've unable to repro again after about a dozen tries on multiple configurations. Are you able to reproduce this crash without fail? Is there a missing step?

Niedzielski added a comment.EditedMay 28 2015, 11:20 PM

Hrm :/ This was 100% reproducible with these steps previously. I just tried the latest alpha on an API 19 device and was unable to repro.

Change 221824 had a related patch set uploaded (by Dbrant):
Fix crash when rotating with highlighted text.

https://gerrit.wikimedia.org/r/221824

Change 221824 merged by jenkins-bot:
Fix crash when rotating with highlighted text.

https://gerrit.wikimedia.org/r/221824

Checked on 2.0.105-alpha-2015-06-30 on Samsung Tablet Ce0168(Android 4.0.4 - no crashes with the given steps.

Dbrant closed this task as Resolved.Jul 7 2015, 7:21 PM