Closed Bug 1089951 Opened 10 years ago Closed 10 years ago

[Midori 2.0][Homescreen]The main interface menus overlap when MS quits games

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect, P2)

defect

Tracking

(blocking-b2g:2.1+, tracking-b2g:+, b2g-v2.1 verified, b2g-v2.2 verified)

VERIFIED FIXED
2.2 S1 (5dec)
blocking-b2g 2.1+
tracking-b2g +
Tracking Status
b2g-v2.1 --- verified
b2g-v2.2 --- verified

People

(Reporter: sync-1, Unassigned)

References

Details

Attachments

(10 files)

Created an attachment (id=988471)
 jrdlog
 
 DEFECT DESCRIPTION:
 The main interface menus overlap  after press Home key to quits games.
 
  REPRODUCING PROCEDURES:
 1.Inter into Marketplace->Download Games:Fly with my car,Guloide Runner.
 2.Click APK icon->When it appear APK icon,press Home key->Quit the games->The main interface menus overlap->KO
 
  EXPECTED BEHAVIOUR:
 The interface should be vertical and menus display independent.
 
 
  ASSOCIATE SPECIFICATION:
 
  TEST PLAN REFERENCE:
 
  TOOLS AND PLATFORMS USED:
 
  USER IMPACT:
 
  REPRODUCING RATE:5/5
 
  For FT PR, Please list reference mobile's behavior:
 
 
  REPRODUCING PROCEDURES:
 
  EXPECTED BEHAVIOUR:
 
  ASSOCIATE SPECIFICATION:
 
  TEST PLAN REFERENCE:
 
  TOOLS AND PLATFORMS USED:
 
  USER IMPACT:
 
  REPRODUCING RATE:4/5
 
  For FT PR, Please list reference mobile's behavior:
Attached image screen shot on error
Attached file jrdlog
[Blocking Requested - why for this release]:It's bad UE and blocking internal QA.
blocking-b2g: --- → 2.0?
Flags: needinfo?(wehuang)
Attached file logcat
According to issue steps, on Flame v2.1 and v2.2, the vertical Home display as landscape mode can be reproduced, but the main interface menus overlap can't be reproduced.
See attachment: v2.1_logcat_1139.txt & v2.2_logcat_1047.txt & video.MP4
reproducing rate:3/5

FLame 2.1 build:
Gaia-Rev        7154f9aa0a69af56c8bd89be0c98d9791449527b
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/452db1a0c9a0
Build-ID        20141111001201
Version         34.0

Flame 2.2 build:
Gaia-Rev        5f8206bab97cdd7b547cc2c8953cadb2a80a7e11
Gecko-Rev       https://hg.mozilla.org/mozilla-central/rev/d380166816dd
Build-ID        20141110040206
Version         36.0a1
Attached file logcat
Attached video video
The 2.2 video shows a different issue than the screenshot does.
Can we keep this bug around for fixing the 2.0 issue and file a followup for the 2.2 regression?
Tends to be device-specific as can't repro in Flame, candidate for de-tag.

@Shine: per comment#7 could you help file a bug for 2.2 based on the video you attached? Thank you.
Flags: needinfo?(wehuang) → needinfo?(yue.xia)
Hi Hubert,
Please help with this bug and file a new bug for 2.2. 
Thank you.
Flags: needinfo?(yue.xia) → needinfo?(hlu)
I can reproduce the issue seen in the video on 2.0 with flame as well. If I start the game and press the home button right after I get the homescreen in landscape mode. It took me maybe 10 tries to get it to reproduce.
The screenshot might just be another undefined behavior with the same root cause. Lets hold off with filing a follow-up.

sync-1, do you always get the overlapped icons on 2.0 or do you also see the behavior as seen in the video?

Lets hope that the fix on master will solve the issues on 2.1 and 2.0 as well.
I believe thats a race-condition in the window-management code and not actually something we can fix in the home screen.
Alive, can you help out here?
Component: Gaia::Homescreen → Gaia::System::Window Mgmt
Flags: needinfo?(sync-1)
Flags: needinfo?(alive)
Dear Gregirm,

Overlap is occur on Horizontal homescreen, verticalhome not overlay.
Flags: needinfo?(sync-1)
(In reply to Guoqiang.CHEN from comment #11)
> Dear Gregirm,
> 
> Overlap is occur on Horizontal homescreen, verticalhome not overlay.

2.0 ships with the new vertical home screen. Are you testing with the old horizontal homescreen?
Could you help?
Flags: needinfo?(alive) → needinfo?(gduan)
Assignee: nobody → gduan
Flags: needinfo?(gduan)
I've observed that they both are using c2runtime.js and it will lockOrientation to landscape in app itself after launching.
https://raw.githubusercontent.com/jgmy/jigsawpuzzle/master/openwebapp/c2runtime.js

I think it can be reproducible in all landscape app if they try to call lockOrientation after launching.
The root cause is, 
https://github.com/jgmy/jigsawpuzzle/blob/master/webapp/c2runtime.js#L3072
app try to set orientation to landscape after pressing home.
I suggest to modify the app itself or waiting for bug 1034001 and bug 1043102.
See Also: → 1100287
Flags: needinfo?(hlu)
[Blocking Requested - why for this release]:

[Triage] per discussion above it tends to be a valid issue however considering current 2.0 phase we nom. to 2.1 for further consideration.
blocking-b2g: 2.0? → 2.1?
This is an API issue we want to address in bug 1043102 - to prevent the app to lock the orientation at the wrong timing. Without platform support we are not able to do anything in v2.1
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You can't dupe it to a feature bug that is going to be implemented in the future.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Whats the RM standpoint here? how much risk would we take to fix this issue?
Flags: needinfo?(bbajaj)
(In reply to Gregor Wagner [:gwagner] from comment #19)
> Whats the RM standpoint here? how much risk would we take to fix this issue?

If we are able to repro it consistently and it results in a screenshot like in comment #1, we should definitely try to see if we can have a low risk work around in place instead of shipping this way. Alive/George, have we explored all options/workarounds here?
Flags: needinfo?(gduan)
Flags: needinfo?(bbajaj)
Flags: needinfo?(alive)
I don't think we have a low risk workaround.

* The app is trying to lock orientation while doing app switching(they should not), but gaia has no way to prevent that. The orientation API allow/deny is controlled by gecko.
* If we send the app to background 'right away' before any app switching, which will cause a bad UX also.
* Because of some visibility/process priority coupling in gecko side, we cannot guarantee any app which is not visible to the user is background; that is to say, if an app like the game is trying to lock the orientation when it is calling an activity, we have no way to prevent.

Please understand that I had tried to address all the platform issues the first day I noticed them from long time ago in dev-webapi/bugs, but not too much cares so we are falling into such difficulty today. This is a good chance to raise them up.
Flags: needinfo?(gduan)
Flags: needinfo?(alive)
Maybe some fresh eyes can help here. Kevin, you have a long flight coming up. Mind taking a look? :)
Flags: needinfo?(kgrandon)
We looked at this in triage, and watched the video a couple of times and its preety ugly. Hoping :kgrandon has some ideas here.

Also NI Harald here to see if we can do a workaround on app games side per comment #15?
Flags: needinfo?(hkirschner)
There is nothing the game can do here as it just declares its orientation in its manifest. The OS screws up resetting orientation.
Flags: needinfo?(hkirschner)
Hi Alive,
I try to put a fix in below commit, but I'm not sure if there's any side effect. Could you take a look?
https://github.com/cctuan/gaia/commit/26f29648d6f9fed895eb71f9f6754860d663e5c4
Flags: needinfo?(alive)
(In reply to George Duan [:gduan] [:喬智] from comment #25)
> Hi Alive,
> I try to put a fix in below commit, but I'm not sure if there's any side
> effect. Could you take a look?
> https://github.com/cctuan/gaia/commit/
> 26f29648d6f9fed895eb71f9f6754860d663e5c4

This patch seems to rely on the fact home screen app will always declare it's orientation in manifest, and *not* calling screen.mozLockOrientation() directly. So whenever there is an orientation change and home screen happen to be at foreground, the homescreen appWindow instance will try to fight back and make the screen vertical again.

I think this is a valid workaround for 2.1 but this is definitely not an excuse for us to continue disregard bug 1043102.
Status: REOPENED → ASSIGNED
Therefore, I would add // XXX in the code to denote that this is an workaround.
Just clearing the needinfo flag. I have a couple of other blockers and it looks like George has a patch for this, thanks George! It definitely seems like we should try to solve bug 1043102 so we can remove a lot of workarounds in gaia.
Flags: needinfo?(kgrandon)
Attached file PR to master
Hi Alive,
could you review this patch for me?
It's a workaround as comment 27 mentioned. Thanks.
Attachment #8527288 - Flags: review?(alive)
Comment on attachment 8527288 [details] [review]
PR to master

LGTM, test please
Flags: needinfo?(alive)
Attachment #8527288 - Flags: review?(alive) → review+
Attached file PR to 2.1
[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): Not a regression.
[User impact] if declined: the orientation of homescreen changed to landscape, see attachment 8521157 [details] 
[Testing completed]: Yes
[Risk to taking this patch] (and alternatives if risky): I don't think so.
[String changes made]:
Attachment #8527462 - Flags: approval-gaia-v2.1?
Dear George,

Is it possible to uplift patch to 2.0 branch? 

It is blocking 2.0 product now, your help is appreciated.
Flags: needinfo?(gduan)
Flags: needinfo?(wehuang)
blocking-b2g: 2.1? → 2.1+
Keywords: verifyme
Comment on attachment 8527462 [details] [review]
PR to 2.1

QA please help verify on master and 2.1 once this lands on that branch.
Attachment #8527462 - Flags: approval-gaia-v2.1? → approval-gaia-v2.1+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S1 (5dec)
Attached file PR to 2.0
PR to 2.0, wait for test result.
Flags: needinfo?(gduan)
Original bug does not occur on 2.1 but when I use the STR from bug 1100287 a different issue occurs.

> STR:
> 1.Inter into Marketplace->Download Games:Fly with my car,Guloide Runner.
> 2.Launch games downloaded on step 1, then press hw home key while it is
> launching.

Actual result:
Homescreen responds with a small graphical hitch

Link: https://www.youtube.com/watch?v=IWH5z053yc8

Does this fail 2.1 verify or should a new bug be written?
Flags: needinfo?(gduan)
Dear George,

I mereged your patch, enter browser in vertical homescreen,  rotate the screen to landscape, display error
FFOS 2.0
mozilla build id:20141019000201
(In reply to Corinne Innes [:CorinneI] from comment #38)
> Original bug does not occur on 2.1 but when I use the STR from bug 1100287 a
> different issue occurs.
> 
> > STR:
> > 1.Inter into Marketplace->Download Games:Fly with my car,Guloide Runner.
> > 2.Launch games downloaded on step 1, then press hw home key while it is
> > launching.
> 
> Actual result:
> Homescreen responds with a small graphical hitch
> 
> Link: https://www.youtube.com/watch?v=IWH5z053yc8
wrong video?
> 
> Does this fail 2.1 verify or should a new bug be written?

What my patch does is, when homescreen goes to foreground, if there's any background app try to rotate screen's orientation, my patch will rotate it back. So, you might see a small hitch after step 2 of comment 0. For 2.1, currently I have no idea to fix it due to comment 21, but sure, we can file a new bug for it.
Dear George,

Can you verify your 2.0 patch whether is ok?(according comment 40)
Thanks.
This issue has been verified successfully on Flame 2.1.
See attachment: 1449.MP4
Reproducing rate: 0/10

Step:
1.Inter into Marketplace->Download Games:Fly with my car,Guloide Runner.
2.Click APK icon->When it appear APK icon,press Home key->Quit the games

Actual result:
The interface is vertical and menus display independent.

Flame 2.1 version:
Gaia-Rev        ccb49abe412c978a4045f0c75abff534372716c4
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-2g34_v2_1/rev/18fb67530b22
Build-ID        20141130001203
Version         34.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141130.034738
FW-Date         Sun Nov 30 03:47:49 EST 2014
Bootloader      L1TC00011880
Status: RESOLVED → VERIFIED
Attached video 1449.MP4
Sorry about the link mix up. Here's the correct one.

Link: https://www.youtube.com/watch?v=nLTfjMwkmqQ
Dear Corinne?

Can your help to do this test in 2.1?
Enter browser, rotate screen into landscape mode.
In FFOS 2.0(build id:20141019000201), it display error
screenshot: https://bugzilla.mozilla.org/show_bug.cgi?id=1089951#c39
Flags: needinfo?(cinnes)
As per comment 47, the issue doesn't repro in 2.1 Flame, no display error appears on the screen
2.1 has a different homepage layout and displays fully in landscape mode

"Flame 2.1

Device: Flame 2.1 (319mb) (Kitkat Base)(Full Flash)
BuildID: 20141205001201
Gaia: 38e17b0219cbc50a4ad6f51101898f89e513a552
Gecko: 8b92c4b8f59a
Gonk: 48835395daa6a49b281db62c50805bd6ca24077e
Version: 34.0 (2.1)
Firmware: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0
"
Flags: needinfo?(cinnes)
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Keywords: verifyme
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Dear sarsenyev,

Thanks for your help, can you help me verify it on 2.0 again(with 2.0 patch)?
Thanks.
Flags: needinfo?(sarsenyev)
Need verify it as per comment 47, thanks.
The issue doesn't repro in 2.0(with Patch) as per comment 47, when rotating the browser homepage, it displays in full screen without any errors,
But I see some issues. The browser often doesn't switch to "landscape" view 
And when open the "Fly with my car" game in "landscape" mode and then return to the home screen, the homescreen quickly switching between landscape and portrait view.
See YouTube video http://youtu.be/j8z6N81IWhg

"Flame 2.0

Device: Flame 2.0 (319mb) (KitKat Base)(Full Flash)
Build ID: 20141210000202
Gaia: 856863962362030174bae4e03d59c3ebbc182473
Gecko: 2d0860bd0225
Gonk: 48835395daa6a49b281db62c50805bd6ca24077e
Version: 32.0 (2.0)
Firmware Version: v188-1
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0"
Flags: needinfo?(sarsenyev)
sync-1@bugzilla.tld
Please ignore my previous comment!!!, the verification was implemented without patch, the patch hasn't downloaded due an error.
But after I reinstalled the patch, I see the issue as you commented in the comment 47, the half screen is blank when opening the browser

Device: Flame 2.0 KK 319MB Shallow Flahs
BuildID: 20141210000202
Gaia: 63fbf3bcb8db44ef689a3a3b399acd8cb2661ad1
Gecko: 2d0860bd0225
Version: 32.0 (2.0)
Firmware: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
Dear George,

Per comment 52, can you check your 2.0 patch again?
Thanks.
Hi George:

Thanks for your patch for 2.1, and now partner is working on 2.0 FOTA upgrade SW and this issue is an important one for them, looks your existing 2.0 patch is close to fix the issue and would you help further take a look to have a new one per comment#47 and comment#52? Thank you!
Flags: needinfo?(wehuang)
Assignee: georgeiscoming → nobody
Flags: needinfo?(georgeiscoming)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: