Closed Bug 1205920 Opened 9 years ago Closed 9 years ago

Homescreen fails to display on initial launch

Categories

(B2GDroid Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fabrice, Assigned: fabrice)

Details

Attachments

(3 files, 1 obsolete file)

Since we enabled OOP, the homescreen loads properly but fails to display anything. Events are triggered as expected so it was possible to launch another app (that worked fine) and then to go back to the homescreen which then repainted properly.
Attached patch homescreen-startup.patch (obsolete) — Splinter Review
Cervantes, it seems that on Android there is some interaction with the compositor triggered by BrowserElementChildPreload that needs to happen after the fork. I'm not sure about the memory usage impact there - if it's bad we can file a follow-up to understand the root cause.
Assignee: nobody → fabrice
Attachment #8662728 - Flags: review?(cyu)
Comment on attachment 8662728 [details] [diff] [review]
homescreen-startup.patch

Review of attachment 8662728 [details] [diff] [review]:
-----------------------------------------------------------------

We don't have Nuwa on b2gdroid, so moving BrowserElementChildPreload.js into DoPreloadPostfork() only makes it happen right after the 2 Services.io.getProtocolHandler(). DoPreloadPostFork() is invoked after we load preload.js to maintain its behavior on non-Nuwa platforms: https://mxr.mozilla.org/mozilla-central/source/dom/ipc/TabChild.cpp#572

What revision are you using? This doesn't look like fixing the problem to me.
I'm on tip of b2g-inbound. Do you get the homescreen to show up without the patch?
(In reply to [:fabrice] Fabrice Desré from comment #3)
> I'm on tip of b2g-inbound. Do you get the homescreen to show up without the
> patch?

I don't have the icons shown with or without the patch so I don't think it fixes the problem.
Hm, weird. So moving the call after the 2 Services.io.getProtocolHandler() doesn't fix the issue for me, while the attached patch does. I guess we're doing something with the event loop when we are synchronously loading the script.

Which device and OS version are you on Cervantes?
Hm, I spend some more time looking at that, and it seems that with this patch applied we don't open the keyboard anymore... I have no idea why.

Cervantes, do you mind taking a look at what's happening there? I'm running out of ideas.
Attachment #8662728 - Flags: review?(cyu)
Attachment #8662728 - Attachment is obsolete: true
I am on the latest m-c, and disabling OOP for homescreen still make it display the icons. I enabled IPC log and found that PImageBridge seems to be broken in the homescreen app. That might explain why the homescreen is still partially functional (long press works and brings up the menu, but the icons in the menu are missing). I need to check why ImageBridge isn't working correctly.
PTexture doesn't work correctly in OOP homescreen. I guess OMTC isn't setup correctly. Fabrice, could you enable IPC log and send me the one for homescreen process?

You may just Change LoggingEnabled() and LoggingEnabledFor() to return true unconditionally and get it from logcat.
Flags: needinfo?(fabrice)
Attached file IPC logs
Cervantes, here's a log with IPC debugging.
The parent process is PID 21288 and the homescreen is PID 21399
Flags: needinfo?(fabrice)
Debugging the homescreen with WebIDE shows that gfx is not the right direction of this bug. The elements are all there, but their widths are 0 because the homescreen fails to load the background URLs. If I replace the background image of an icon with a PNG data URI, the icon shows correctly as the attached image. So we need to find out why URLs like blob:app://verticalhome.gaiamobile.org/80ffd39f-1200-4782-9240-188ec72268e9 are not loaded correctly.
So... it looks like this is a gaia issue: the system app doesn't do the launch sequence properly when a ftu.manifestURL is set but the ftu app is not present. Using NOFTU=1 works, but I'd like everything to be done in distros/b2gdroid so I'm overriding ftu.manifestURL in settings.json instead for now.
https://github.com/mozilla-b2g/gaia/commit/b819b99851e95f73ee5786cb1f15f72f2fdc2acc
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: