Closed Bug 1038131 Opened 10 years ago Closed 10 years ago

latin.js failed to deactivate and continue to respond to selectionchange

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

x86
macOS
defect
Not set
normal

Tracking

(blocking-b2g:2.1+, b2g-v1.4 unaffected, b2g-v2.0 unaffected, b2g-v2.1 verified)

VERIFIED FIXED
2.0 S6 (18july)
blocking-b2g 2.1+
Tracking Status
b2g-v1.4 --- unaffected
b2g-v2.0 --- unaffected
b2g-v2.1 --- verified

People

(Reporter: timdream, Assigned: rudyl)

References

Details

(Keywords: regression, Whiteboard: [p=1])

Attachments

(2 files)

STR:

1. Enable English and Pinyin layout
2. Go to Contact -> Add new contact
3. Focus on |First name|, waiting for English layout to pop.
4. Type "Gh", waiting for word suggestions
5. Tap "En" to switch to Pinyin
6. Tap "t"

Expected:

1. Showing Chinese characters candidates beginning with spelling "f"

Actual:

1. The candidates show up briefly but quickly covers up by English word suggestions for "Ghf".

qawanted for 2.0 branch check to make sure we don't have regression on the branch.
regressionwindow-wanted to locate the regressed bug on 2.1 branch.
It has been 2 days since qawanted and regressionwindow-wanted so I decided to do this myself.

The regressed bug is bug 1015541. Rudy, are you aware of this?

==

$ git bisect log
git bisect start
# bad: [d29773d2a011825fd77d1c0915a96eb0911417b6] Merge pull request #21172 from yurenju/multilocale-manifest
git bisect bad d29773d2a011825fd77d1c0915a96eb0911417b6
# good: [32ffcf9b8e01b350ba26673e6cbd1f61572b3265] Revert "Merge pull request #20532 from timdream/keyboard-modify-layout" for most likely causing a really frequent gaia-ui test failure
git bisect good 32ffcf9b8e01b350ba26673e6cbd1f61572b3265
# bad: [5b8def74f2b90b100cde80b8c5ff4cf7bca04e6d] Merge pull request #21316 from KevinGrandon/bug_1033220_verticalhome_collection_intermittent_debug
git bisect bad 5b8def74f2b90b100cde80b8c5ff4cf7bca04e6d
# bad: [952b1e06fdb6eeade76f28aed78ee9eb070876e1] Merge pull request #21132 from KevinGrandon/bug_1023950_apply_tests
git bisect bad 952b1e06fdb6eeade76f28aed78ee9eb070876e1
# bad: [8fe134dcd032e5af1a82cdb3ab14ca312dea8834] Merge pull request #21035 from vingtetun/backout-bug1027266-reland
git bisect bad 8fe134dcd032e5af1a82cdb3ab14ca312dea8834
# bad: [002c73b3de9ed5f217e6d24b50abec255da71de0] Merge pull request #20508 from yzen/bug-1018214
git bisect bad 002c73b3de9ed5f217e6d24b50abec255da71de0
# good: [5c8e30c3ce60c39dfa7a1bcb149576beac90206e] Merge pull request #20911 from lightsofapollo/1029280
git bisect good 5c8e30c3ce60c39dfa7a1bcb149576beac90206e
# good: [0f2ac3827f9bab8673dc934977424b0907d47941] Merge pull request #20794 from yurenju/metadata
git bisect good 0f2ac3827f9bab8673dc934977424b0907d47941
# bad: [af73d21999bc2e3ddc02c470d5534179891cbdda] Merge pull request #20799 from julienw/1028118-dont-build-profile-twice
git bisect bad af73d21999bc2e3ddc02c470d5534179891cbdda
# bad: [f99a96a063f7569c3ba4921757b48e0e303884f1] Merge pull request #20913 from yurenju/branding
git bisect bad f99a96a063f7569c3ba4921757b48e0e303884f1
# bad: [73b9c780c54ec1c6fcf47c2ce467672d3c5aaded] Merge pull request #20750 from RudyLu/keyboard/Bug1015541
git bisect bad 73b9c780c54ec1c6fcf47c2ce467672d3c5aaded
Blocks: 1015541
blocking-b2g: 2.1? → 1.4?
Flags: needinfo?(rlu)
Assign to Rudy.
Assignee: timdream → rlu
Summary: Failed Switch between two layouts of different IMEngines → latin.js failed to deactivate and continue to respond to selectionchange
I could not reproduce this issue at my side, and we think the difference might be caused by bug 1016283, which is not uplifted to v2.0/v1.4.
 - with that patch, the inputContext would NOT be refreshed after you changed the layout (and the IME engine), so that you won't receive selectionchange event.

Per my own test, I could not reproduce this on v1.4.
--
Gaia      393d72937727ad20e82b2ff7b13e3d7ff077a9f0
Gecko     https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/rev/932c37978d37
BuildID   20140716000202
Version   30.0
ro.build.version.incremental=eng.cltbld.20140623.194406
ro.build.date=Mon Jun 23 19:44:23 EDT 2014

--
Adding qawanted back to double confirm this won't affect both v1.4 and v2.0.
Flags: needinfo?(rlu)
Keywords: qawanted
Cannot repro with v2.0 on Flame
================================
Gaia      db0358b53488a941ced352d890802342d7ced00e
Gecko     https://hg.mozilla.org/releases/mozilla-aurora/rev/0874ec920408
BuildID   20140715160201
Version   32.0a2
ro.build.version.incremental=eng.cltbld.20140603.191906
ro.build.date=Tue Jun  3 19:19:16 EDT 2014
(In reply to Rudy Lu [:rudyl] from comment #3)
> I could not reproduce this issue at my side, and we think the difference
> might be caused by bug 1016283, which is not uplifted to v2.0/v1.4.
>  - with that patch, the inputContext would NOT be refreshed after you
> changed the layout (and the IME engine), so that you won't receive
                                                       ^^ will
> selectionchange event.
> 
> Per my own test, I could not reproduce this on v1.4.
> --
> Gaia      393d72937727ad20e82b2ff7b13e3d7ff077a9f0
To be clear, this is still a valid bug for 2.1.
In the end we found this issue is related to Gecko change in bug 1001325.
(Thanks to Xulei for the discussion on this topic)

[Root Cause]
------------
1. Without the patch from bug 1001325, somehow we would get different instances of inputcontext from inputmethod API with this line,  
https://github.com/mozilla-b2g/gaia/blob/d8b8d48fccefeb4345ca8a99b9f57f1263ec5133/apps/keyboard/js/keyboard.js#L890
   That is why this issue would not occur on v1.4 and v2.0.

2. And with that patch, the inputcontext would be the same instance after switching from latin IME to pinyin, and so we would still receive selectionchange in latin IME, that is a bug from bug 1015541.
Attached file Patch V1
Tim,

This is still a band-aid patch to amend what I did in bug 1015541.

I know this is not ideal, but I'll need some time to move the states out of IME engines and even sort Bug 975992 out.

Thanks.
Attachment #8457915 - Flags: review?(timdream)
(In reply to Rudy Lu [:rudyl] from comment #3)
> Per my own test, I could not reproduce this on v1.4.
> --
> Adding qawanted back to double confirm this won't affect both v1.4 and v2.0.



Issue DOES repro in the latest 2.1

Environmental Variables:
Device: Flame Master
Build ID: 20140717103932
Gaia: Unknown
Gecko: be05446d4fd2
Version: 33.0a1 (Master)
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0

--------------------------------------------------------------------------------------

Issue does NOT repro in 1.4 and 2.0

Environmental Variables:
Device: Flame 1.4
Build ID: 20140716000202
Gaia: 393d72937727ad20e82b2ff7b13e3d7ff077a9f0
Gecko: 932c37978d37
Version: 30.0 (1.4)
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0

Environmental Variables:
Device: Flame 2.0
Build ID: 20140717085706
Gaia: 9977a02ea62ba96425a1cc4d1bfb54a909f68905
Gecko: cc563253a046
Version: 32.0a2 (2.0)
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
Keywords: qawanted
Comment on attachment 8457915 [details] [review]
Patch V1

This is far from I ideal but it could fix breakage of bug 1015541, so r=me.

I want to see your next bug after the blocker to be the proper fix of this one and bug 1015541. On the IMEngine API front, I want to move out input sequence queue out of the script and see API being simplified, eventually putting the script inside a worker. If this is the first time you hear about this we are in deep deep trouble.
Attachment #8457915 - Flags: review?(timdream) → review+
blocking-b2g: 1.4? → 2.1?
Landed to Gaia master,
https://github.com/mozilla-b2g/gaia/commit/ee728cc66678d6f1988e43bddc2c6ef340f25cc3
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [p=?] → [p=1]
bug 1040548 created to address what comment 10 stated.
blocking-b2g: 2.1? → 2.1+
Attached video video of issue verify
This issue has been verified successfully on Flame 2.1
STR:
1. Enable English and Pinyin layout
2. Go to Contact -> Add new contact
3. Focus on "name", waiting for English layout to pop.
4. Type "Gh", waiting for word suggestions
5. Tap "En" to switch to Pinyin
6. Tap "y"
**Showing Chinese characters candidates beginning with spelling "y"
See attachment: verify_video.MP4
Reproducing rate: 0/5
Flame 2.1 versions:
Gaia-Rev        8ae086c39011bc8842b2a19bb5267906fa22345a
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/ebbd5c65c3c1
Build-ID        20141124094013
Version         34.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141124.130744
FW-Date         Mon Nov 24 13:07:55 EST 2014
Bootloader      L1TC00011880
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: