New issue
Advanced search Search tips

Issue 737285 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

[TTS] assertion error in showContextualSearch

Project Member Reported by donnd@chromium.org, Jun 27 2017

Issue description

I noticed an assertion error when interacting in a corner case: tap to select text, without scrolling longpress on a link to show the Context Menu (TTS hides), then longpress select and manually adjust the selection.

The CSM should probably check that there's a longpress or tap selection before calling showContextualSearch.

06-27 15:10:20.240  4380  4380 W System.err: java.lang.AssertionError
06-27 15:10:20.241  4380  4380 W System.err: 	at org.chromium.chrome.browser.contextualsearch.ContextualSearchManager.showContextualSearch(ContextualSearchManager.java:481)
06-27 15:10:20.241  4380  4380 W System.err: 	at org.chromium.chrome.browser.contextualsearch.ContextualSearchManager.access$2400(ContextualSearchManager.java:66)
06-27 15:10:20.241  4380  4380 W System.err: 	at org.chromium.chrome.browser.contextualsearch.ContextualSearchManager$6.showContextualSearchLongpressUi(ContextualSearchManager.java:1551)
06-27 15:10:20.241  4380  4380 W System.err: 	at org.chromium.chrome.browser.contextualsearch.ContextualSearchInternalStateController.startWorkingOn(ContextualSearchInternalStateController.java:228)
06-27 15:10:20.241  4380  4380 W System.err: 	at org.chromium.chrome.browser.contextualsearch.ContextualSearchInternalStateController.transitionTo(ContextualSearchInternalStateController.java:208)
06-27 15:10:20.241  4380  4380 W System.err: 	at org.chromium.chrome.browser.contextualsearch.ContextualSearchInternalStateController.transitionTo(ContextualSearchInternalStateController.java:190)
06-27 15:10:20.241  4380  4380 W System.err: 	at org.chromium.chrome.browser.contextualsearch.ContextualSearchInternalStateController.finishWorkingOn(ContextualSearchInternalStateController.java:306)
06-27 15:10:20.241  4380  4380 W System.err: 	at org.chromium.chrome.browser.contextualsearch.ContextualSearchInternalStateController.notifyFinishedWorkOn(ContextualSearchInternalStateController.java:174)
06-27 15:10:20.241  4380  4380 W System.err: 	at org.chromium.chrome.browser.contextualsearch.ContextualSearchManager.onTextSurroundingSelectionAvailable(ContextualSearchManager.java:595)
06-27 15:10:20.241  4380  4380 W System.err: 	at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
06-27 15:10:20.241  4380  4380 W System.err: 	at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:41)
06-27 15:10:20.241  4380  4380 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:102)
06-27 15:10:20.241  4380  4380 W System.err: 	at android.os.Looper.loop(Looper.java:148)
06-27 15:10:20.241  4380  4380 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
06-27 15:10:20.241  4380  4380 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
06-27 15:10:20.241  4380  4380 W System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
06-27 15:10:20.241  4380  4380 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ae01e3f319b3d133c7c54c84519dc753b4922cf2

commit ae01e3f319b3d133c7c54c84519dc753b4922cf2
Author: donnd <donnd@chromium.org>
Date: Wed Jun 28 18:24:05 2017

[TTS] Fix assert after TTS and Context Menu.

ContextualSearchSelectionController was checking whether the context menu
had been shown to sort out confusing event sequences.  This is
causing the CSM to assert because the selection type is not set up
when a long-press follows Context Menu dismissal.

BUG= 737285 , 628436 

Review-Url: https://codereview.chromium.org/2957213002
Cr-Commit-Position: refs/heads/master@{#483068}

[modify] https://crrev.com/ae01e3f319b3d133c7c54c84519dc753b4922cf2/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java

Comment 2 by donnd@chromium.org, Jun 28 2017

Status: Fixed (was: Started)

Sign in to add a comment