Closed
Bug 1037284
Opened 10 years ago
Closed 10 years ago
[NFC] Screen shows wired and NFC function broken when click home button while initial shrinking UI
Categories
(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)
Tracking
(blocking-b2g:2.0+, b2g-v2.0 verified, b2g-v2.1 verified)
People
(Reporter: ashiue, Assigned: gweng)
References
Details
Attachments
(3 files, 1 obsolete file)
Gaia 1bd6e8957ccf310b2f75ba5695b058a2e284df3a
Gecko https://hg.mozilla.org/releases/mozilla-aurora/rev/f0e91a6bfd1b
BuildID 20140710134855
Version 32.0a2
Two phones with NFC
STR:
1. Phone A open browser
2. Tap two phones together
3. At the moment before show shrinking UI, click home button
Expected result:
Nothing strange happen
Actual result:
1. Screen shows wired
2. Could not share browser again
Blocks: NFC-Gaia
Reporter | ||
Comment 1•10 years ago
|
||
Reporter | ||
Updated•10 years ago
|
QA Whiteboard: [COM=NFC]
[Blocking Requested - why for this release]:
blocking-b2g: --- → 2.1?
Comment 3•10 years ago
|
||
qawanted to check if this happens in 2.0
Keywords: qawanted,
regressionwindow-wanted
Reporter | ||
Comment 4•10 years ago
|
||
This case happens in 2.0
Comment 5•10 years ago
|
||
Keywords: qawanted,
regressionwindow-wanted
Comment 6•10 years ago
|
||
Yoshi - Did you mean to nominate this to 2.0, since this bug reproduces there?
Flags: needinfo?(allstars.chh)
[Blocking Requested - why for this release]:
If this also happens on 2.0 we should nominate to 2.0+.
blocking-b2g: 2.1? → 2.0?
Flags: needinfo?(allstars.chh)
Updated•10 years ago
|
blocking-b2g: 2.0? → 2.0+
Assignee | ||
Comment 9•10 years ago
|
||
NI myself to remind to solve. I remember that there is one similar resolved bug, but needs time to survey to see if they're the same.
Flags: needinfo?(gweng)
Assignee | ||
Comment 10•10 years ago
|
||
It's very hard to reproduce (at least for me)...either we can find a stable STR, or it's an very edge case and shouldn't be a blocker. Could you reproduce it easily?
Comment 11•10 years ago
|
||
Hi Alison, what's the reproduce rate here? thanks.
Flags: needinfo?(ashiue)
Reporter | ||
Comment 12•10 years ago
|
||
Always reproduce if you can tap the home button at the right moment, but it's not easy to get the moment.
(The moment is after NFC detect and before screen shows shrinking UI.)
Flags: needinfo?(ashiue)
Assignee | ||
Comment 13•10 years ago
|
||
Yoshi and I tested, and we usually failed to reproduce it. We success about 4 times while failed about 15 times. The moment is really hard to get.
According to the symptom, it looks like the 'back to home' event got triggered, even we're going to trigger shrinking UI and block the home key event. However, when it actually triggers the shrinking UI, the home key get blocked as it should be. So I suspect the problem is the timing to suspend and resume the home key event, but I still don't know what's the correct one.
Flags: needinfo?(gweng)
Assignee | ||
Comment 14•10 years ago
|
||
Possible root cause: when 'shrinking-start' send from NFC manager, the 'home' event get sent immediately after it, too. So before NFC manager set the state as true (shrunk), the 'home' event can be passed without been blocked, and AWM handle it to back to home.
Assignee | ||
Comment 15•10 years ago
|
||
Or the first 'home' event pass and then 'shrinking-start' get fired, so that when AWM is handling the first event to switch to Homescreen, the shrinking start to performing. But I don't know whether it's possible that when AWM is handling Homescreen, the shrinking can do it's job.
Flags: needinfo?(alive)
Assignee | ||
Comment 16•10 years ago
|
||
One possible solution is ShrinkingUI knows whether the previous 'home' event get handled, if it's caused by the 'home'->'shrinking-start' case. Another possible solution is to block 'home' earlier, if it's caused by the 'shrinking-start'->'home' case. However, the timing to start to block the 'home' event now is so early, that I suspect if we can move it to another earlier moment.
Comment 17•10 years ago
|
||
(In reply to Greg Weng [:snowmantw][:gweng][:λ] from comment #15)
> Or the first 'home' event pass and then 'shrinking-start' get fired, so that
> when AWM is handling the first event to switch to Homescreen, the shrinking
> start to performing. But I don't know whether it's possible that when AWM is
> handling Homescreen, the shrinking can do it's job.
It seems the problem is the whole shrinking procedure is not synchronous.
Could we listen to homescreenopened event to discard the shrinking state?
Flags: needinfo?(alive)
Assignee | ||
Comment 18•10 years ago
|
||
OK, I'll try with that. Thanks.
Assignee | ||
Comment 19•10 years ago
|
||
While I'm trying to patch it, I've found I can reproduce it with my WIP patch. So I now may dig deeper to see what's going on.
Assignee | ||
Comment 20•10 years ago
|
||
It looks like the Shrinking UI works as it should be: when it receive shrinking event, perform the UI, and block home key. The problem is now the NFC events fired too frequently in the case, so there is a missing 'home' event can be passed to AWM to make Homescreen appears. Debugging logs shows like this:
JS LOG at app://system.gaiamobile.org/js/shrinking_ui.js:257 in su_start: >>>> ++++ TILING Started ++++
E/GeckoConsole( 2146): Content JS LOG at app://system.gaiamobile.org/js/shrinking_ui.js:131 in su_handleEvent: >>>> NO HOME because of : true true false
E/GeckoConsole( 2146): Content JS LOG at app://system.gaiamobile.org/js/shrinking_ui.js:131 in su_handleEvent: >>>> NO HOME because of : true true false
E/GeckoConsole( 2146): Content JS LOG at app://system.gaiamobile.org/js/shrinking_ui.js:131 in su_handleEvent: >>>> NO HOME because of : true true false
E/GeckoConsole( 2146): Content JS LOG at app://system.gaiamobile.org/js/shrinking_ui.js:263 in su_start/afterTilt<: >>>> ---- Stopped TILTING ----
E/GeckoConsole( 2146): Content JS LOG at app://system.gaiamobile.org/js/shrinking_ui.js:136 in su_handleEvent: >>>> HOME because of : false false false
E/GeckoConsole( 2146): Content JS LOG at app://system.gaiamobile.org/js/app_window_manager.js:529 in awm_handleEvent: >>>> <<<< >>>> <<<< HOME RECEIVIED
E/GeckoConsole( 2146): Content JS LOG at app://system.gaiamobile.org/js/shrinking_ui.js:255 in su_start: >>>> iiiiii IN the start function: false
E/GeckoConsole( 2146): Content JS LOG at app://system.gaiamobile.org/js/shrinking_ui.js:257 in su_start: >>>> ++++ TILING Started ++++
E/GeckoConsole( 2146): Content JS LOG at app://system.gaiamobile.org/js/shrinking_ui.js:131 in su_handleEvent: >>>> NO HOME because of : true true false
E/GeckoConsole( 2146): Content JS LOG at app://system.gaiamobile.org/js/shrinking_ui.js:131 in su_handleEvent: >>>> NO HOME because of : true true false
E/GeckoConsole( 2146): Content JS LOG at app://system.gaiamobile.org/js/shrinking_ui.js:131 in su_handleEvent: >>>> NO HOME because of : true true false
You can see between the next home key blocking, there is one suddend stop tilting request (from the 'shrinking-stop' event). I guess that in such case the stopping animation would still perform, but meanwhile the AWM is doing to back to Homescreen, too.
Assignee | ||
Comment 21•10 years ago
|
||
Update: while in Homescreen, the modified patch can make the tilting window appears. It looks like the 'current' app in shrinking UI also get confused.
Comment 22•10 years ago
|
||
(In reply to Greg Weng [:snowmantw][:gweng][:λ] from comment #21)
> Update: while in Homescreen, the modified patch can make the tilting window
> appears. It looks like the 'current' app in shrinking UI also get confused.
I have an idea for maintaining AppWindows.
So in the past I think it makes sense to maintain a list of windows for every window manager,
but since the instance list in shrinkingUI has no difference from AppWindowManager,
I wish ShrinkingUI is a sub module of AppWindowManager.
That means, AppWindowManager will instantiate the ShrinkingUI and pass itself.
var shrinkingUI = new ShrinkingUI(this);
So in shrinkingUI we could access this.appWindowManager.getApps() and this.appWindowManaget.getActiveApp() directly.
Assignee | ||
Comment 23•10 years ago
|
||
I've fixed it with to set the current app as null while the 'home' event isn't blocked. I'll first re-organize my patch to let it works, and then to see if I can do some change as you said.
Assignee | ||
Comment 24•10 years ago
|
||
Hi Alive, I want to minimize the risk of landing this patch and preventing Shrinking overreacting bug caused by the hardware issue. So I send this patch to fix this issue for master and (later) v2.0, and I would fire another bug to handle the second issue, which may require me to refactor Shrinking UI slightly.
Attachment #8470605 -
Flags: review?(alive)
Comment 25•10 years ago
|
||
Comment on attachment 8470605 [details]
Patch
r+ but we had better to have some test excluding UI part but only state management part..
Attachment #8470605 -
Flags: review?(alive) → review+
Assignee | ||
Comment 26•10 years ago
|
||
The 'follow-up' bug to prevent Shrinking UI overreacting: Bug 1051665.
Yes, I've considered the test issue. However I'm not sure how to test this without UI part... The state I extracted from AppManager on my device, is the current app recorded in Shrinking UI would be the previous app, while the UI shows the current app should be Homescreen. My patch add the test at the 'home' event section.
Assignee | ||
Comment 27•10 years ago
|
||
Assignee | ||
Comment 28•10 years ago
|
||
Waiting CI result.
Assignee | ||
Comment 29•10 years ago
|
||
The two patches only failed at one intermittent test:
https://tbpl.mozilla.org/?rev=5f7bf59496a8ac18380c1b23e5fd2f0f784dcb2e&tree=Gaia-Try
https://tbpl.mozilla.org/?rev=3f8e625a1809a7af423db6dd9299cae70d531185&tree=Gaia-Try
So I would land the patch.
Assignee | ||
Comment 30•10 years ago
|
||
Assignee | ||
Comment 31•10 years ago
|
||
Correct the v2.0 patch.
Attachment #8470615 -
Attachment is obsolete: true
Assignee | ||
Comment 32•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Reporter | ||
Comment 33•10 years ago
|
||
Verified on
[2.0]
Gaia 1144cdc3a544f81c9bf71598aba1cb67d6c95a29
Gecko https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/6495a7bd61ed
BuildID 20140812000205
Version 32.0
[2.1]
Gaia 8f955d80d175e52283275d3197e4eae2574b389f
Gecko https://hg.mozilla.org/mozilla-central/rev/391f42c733fc
BuildID 20140811160202
Version 34.0a1
Status: RESOLVED → VERIFIED
Updated•10 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•