[B2G][Helix][WindowManager][shijinde] Apps appear blank after tapping the notification message on lockscreen

RESOLVED FIXED

Status

P1
critical
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: lecky.wanglei, Assigned: lchang)

Tracking

unspecified

Firefox Tracking Flags

(blocking-b2g:hd+, b2g-v1.1hd fixed)

Details

Attachments

(4 attachments)

(Reporter)

Description

5 years ago
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; aff-kingsoft-ciba; .NET4.0C; .NET4.0E; Zune 4.7; Tablet PC 2.0)

Steps to reproduce:

1、enter setting app icon in home screen.
2、go to setting screen
3、exit setting app
4、do 1, 2, 3 again more 50 Counts


Actual results:

1、it will display white background first, and wait about 20 seconds, show setting app screen


Expected results:

1、go to setting screen directly
(Reporter)

Comment 1

5 years ago
Hi, About this problem, I see the setting module code, I find this module will read many datas when start,
it maybe cause this problem, but not every time. 

Or when start the setting app, the system will cost some memery, and exit setting app, the system don't release all memery, so if we do more operate "start setting app, exit setting app, and again", will show this problem.

Can you give me some suggestion? Or Can you give me a result about this problem "you will analyse? resolve? or not bug, don't resolve?"

Thanks
Flags: needinfo?(wchang)
Flags: needinfo?(brg)
Priority: -- → P2
I can't seem to reproduce this issue.

Could we get a log cat of what you have?  The logcat would help.

If you suspect that it is a memory issue : You could also check the processes by doing an:
adb shell b2g-ps

between each open and close of the settings.  You can see the memory in the VSIZE/RSS columns.
(Reporter)

Comment 3

5 years ago
Created attachment 821400 [details]
LOGS.zip
(Reporter)

Comment 4

5 years ago
Created attachment 821429 [details]
white blank.rar
(Reporter)

Comment 5

5 years ago
Created attachment 821430 [details]
20131011055921baobo-进入设置显示白屏.7z
Lecky,
Can you try this on the Mozilla build?

cc'ing evelyn
Flags: needinfo?(wchang)
(Reporter)

Comment 7

5 years ago
OK. I will try.
Flags: needinfo?(brg) → needinfo?(lecky.wanglei)
(Reporter)

Comment 8

5 years ago
Hi, this bug we can reproduce everytims. 

the step is:

1. open setting app
2. press power button, make phone to seleep.
3. use another phone to send a message.
4. when the target phone receives the message, click the notifaction.
5. unlock the phone, you will see the message you send by another phone.
6. press home key.
7. open setting app.

now you will see the white screen. also you can use other app to test, for example, camera, contact and so on.

Thanks
Flags: needinfo?(wchang)
Flags: needinfo?(lecky.wanglei)
Flags: needinfo?(brg)
(Reporter)

Comment 9

5 years ago
Hi, I find when the screen is lock, and the phone receives a message, the system will send notification to lock
screen, and when user click the notification will send 'CustomEvent', so when you unlock the screen, the phone will show message, and press home key, start setting app, that will show white screen.

if you judge the lock screen state like this:
   
   if(lock screen true)
   {
      don't send 'CustomEvent' event
   }
   else
   {
      send 'CustomEvent'
   }

the code in system\notification.js. the origin code is:

  tap: function ns_tap(notificationNode) {
    var notificationID = notificationNode.dataset.notificationID;

    var event = document.createEvent('CustomEvent');
    event.initCustomEvent('mozContentEvent', true, true, {
      type: 'desktop-notification-click',
      id: notificationID
    });
    window.dispatchEvent(event);          ----- here need to judge.

    this.removeNotification(notificationNode.dataset.notificationID, false);

    if (notificationNode == this.toaster) {
      this.toaster.classList.remove('displayed');
    } else {
      UtilityTray.hide();
    }
  },


So please to check this code or you program flow.

Thanks
Flags: needinfo?(wchang)
Flags: needinfo?(brg)
(Reporter)

Updated

5 years ago
Severity: normal → critical
Flags: needinfo?(wchang)
Flags: needinfo?(brg)
Priority: P2 → P1
Please ni the right people with the right purpose.(In reply to lecky from comment #0)

Evelyn, we're concerned if this is true:

> 1、it will display white background first, and wait about 20 seconds, show
> setting app screen
> 

If it's for a split second, then it's likely not a great impact to the user.
Flags: needinfo?(wchang) → needinfo?(ehung)
(Reporter)

Comment 11

5 years ago
Hi, about this bug, before we can't find method to reproduce everytime, but now we find the method, so I write here. and hope you can check it and process it to resolve.

about white background problems, We find at least five before we can reproduces it everytime. for example,

camera, market, these two apps are also exist this problem.

about the white backgroud, We hope you can pay attention to it.
also observed on other v1.1. blocking after discussing with Evelyn.

Luke, please help here.
blocking-b2g: --- → hd+
Flags: needinfo?(lchang)

Comment 13

5 years ago
It seems window manager in system app mess up the foreground app while the user trying to click the notification pop-up on status bar. Message app is switched to foreground and Settings loses its visibility but doesn't been switched to background. The only question here is why the state is unrecoverable while the user pressing home button and switching between apps.

Luke, can you work with alive and fix the bug here? Thanks.
Flags: needinfo?(ehung)

Comment 14

5 years ago
The correct STR is in comment 8, and you have to click the pop-up notification in step 4 to reproduce the issue.
Thanks Wayne, Evelyn and Lecky for the investigation and priorization.
Flags: needinfo?(brg)
Hi! Evelyn,

Could Luke take this?

--
Keven
Assignee: nobody → ehung
(Assignee)

Comment 17

5 years ago
Hi Keven,

Yes, I'm looking into it so take this.
Assignee: ehung → lchang
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(lchang)
Hi! Luke,

Thanks.

--
Keven
(Assignee)

Comment 19

5 years ago
According to STR in comment 8, I think we need a more specific title for this bug.
Component: Gaia::Settings → Gaia::System::Window Mgmt
Summary: [B2G][Helix][Setting][shijinde]start setting app will show a white background → [B2G][Helix][WindowManager][shijinde] Apps appear blank after tapping the notification message on lockscreen
(Assignee)

Comment 20

5 years ago
Created attachment 831256 [details] [review]
Pull Request: https://github.com/mozilla-b2g/gaia/pull/13645

This problem is caused by the "setVisible" state out of sync.

In v1.1.0hd branch, there are two methods in Window Manager that are used to set visible state on an app window. One is to set the value on "AppWindow" objects and the other is to set the value directly on its childs ("iframe" objects). Window Manager uses the first method when we lock and unlock the screen but uses the second method between app switching. In other words, if we lock the screen from an app "A" and unlock the screen to see another app "B", the "AppWindow" object of app "A" can not be set back to visible so it will appear blank.

I have no idea whether the problem above will happen in other situations or not. But in this bug, we should prevent users from tapping the notification message in lockscreen. So I sent a patch for that.

Alive, could you please help review this patch. Thanks.
Attachment #831256 - Flags: review?(alive)
Comment on attachment 831256 [details] [review]
Pull Request: https://github.com/mozilla-b2g/gaia/pull/13645

I'd like to ignore click event while LockScreen is locked in event handler.
You may encounter race if:
1. Toaster displays before screen dims
2. Turn screen off
3. Turn screen on right away-> Toaster is not protected by 'locked' class.
Attachment #831256 - Flags: review?(alive)
(Assignee)

Comment 22

5 years ago
Comment on attachment 831256 [details] [review]
Pull Request: https://github.com/mozilla-b2g/gaia/pull/13645

Yes, you're right! Thanks.

I've updated my patch for disabling the tap event. In addition, I propose leaving swipe gesture so that users can still clear the notification on lockscreen.

Could you please review it again? Thanks a lot!
Attachment #831256 - Flags: review?(alive)
(Assignee)

Comment 24

5 years ago
merged in gaia v1.1.0hd branch:
https://github.com/mozilla-b2g/gaia/commit/88c7851a20741deaf9ecfcf7c0f82117a6407dbc

Alive, Thanks!
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
status-b2g-v1.1hd: --- → fixed
You need to log in before you can comment on or make changes to this bug.