Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Firefox simulator closes after a few seconds on Windows 8 #380

Open
tobbi opened this Issue · 27 comments

4 participants

@tobbi

Hello,

I installed the latest version of r2d2b2g from the ftp server. However, the simulator ends automatically when I start it.

Here's the console output (not sure if it helps):
http://screencast.com/t/OcuxxGZhm9

@mykmelez mykmelez was assigned
@mykmelez
Owner

Note the other Windows 8 issue #310, although that reporter isn't experiencing a crash, so it looks like these are two different issues. I have a Windows 8 VM now and will investigate this next week.

@mykmelez
Owner

I've been diagnosing several issues with Windows builds, and I found a couple problems, so I created a test build with fixes for them.

https://ftp.mozilla.org/pub/mozilla.org/labs/r2d2b2g/r2d2b2g-3.0pre6dev-windows.xpi

I'm not sure this build will resolve your issue, but please try it out, and let me know how it works for you!

@tobbi

Sorry, no luck here. It still closes after a few seconds.

@mykmelez
Owner

@tobbi Can you use about:config to create the preference extensions.r2d2b2g@mozilla.org.sdk.console.logLevel, setting it to the integer value 0, then try running the simulator again and let me know what messages appear in the Error Console? I'm particularly interested in messages about an exit code. But other messages would also be interesting.

@tobbi

@mykmelez The only really interesting message I get is this one:
info: r2d2b2g: win32/b2g/b2g.exe terminated with 259 (for the first attempt). The subsequent starts show this:
http://screencast.com/t/KOY1qDL08sOr

From what I can read the second output, it suggests that this was a regular exit?

@mykmelez
Owner

Yes, the second exit looks regular. Strange that it would crash the first time and then exit regularly on subsequent invocations.

Sometimes additional information is displayed when you run the Simulator from a terminal window. Can you start cmd.exe, run it from there, and let me know what gets written to the terminal window? Unfortunately, the Simulator is at a quite complex path, and you have to pass it an equally complex path to its Gaia profile, something like the following (replacing USERNAME and PROFILE with your actual username and profile directory name):

C:\Users\USERNAME\AppData\Roaming\Mozilla\Firefox\Profiles\PROFILE\extensions\r2d2b2g@mozilla.org\resources\r2d2b2g\data\win32\b2g\b2g.exe -profile C:\Users\USERNAME\AppData\Roaming\Mozilla\Firefox\Profiles\PROFILE\extensions\r2d2b2g@mozilla.org\profile

When I do that, I get:

 -*- Shell.js: patch RemoteDebugger.start
###################################### forms.js loaded
############################### browserElementPanning.js loaded
 -*- Shell.js: injectStylesheet:
######################## BrowserElementChildPreload.js loaded
[AccessFu] INFO attach
 -*- Shell.js: injectStylesheet:
 -*- Shell.js: sending pingback
###################################### forms.js loaded
############################### browserElementPanning.js loaded
 -*- Shell.js: injectStylesheet:
######################## BrowserElementChildPreload.js loaded
XXX FIXME : Got a mozContentEvent: system-message-listener-ready
XXX FIXME : Got a mozContentEvent: accessibility-screenreader
FTU manifest cannot be found skipping.
###################################### forms.js loaded
############################### browserElementPanning.js loaded
######################## BrowserElementChildPreload.js loaded

Then I see the homescreen, and the Simulator doesn't crash.

@tobbi

That's what I get:
-- Shell.js: patch RemoteDebugger.start
###################################### forms.js loaded
############################### browserElementPanning.js loaded
-
- Shell.js: injectStylesheet:
######################## BrowserElementChildPreload.js loaded
[AccessFu] INFO attach
-*- Shell.js: injectStylesheet:
###################################### forms.js loaded
############################### browserElementPanning.js loaded
######################## BrowserElementChildPreload.js loaded
XXX FIXME : Got a mozContentEvent: system-message-listener-ready
###################################### forms.js loaded
############################### browserElementPanning.js loaded
######################## BrowserElementChildPreload.js loaded
XXX FIXME : Got a mozContentEvent: accessibility-screenreader
FTU manifest cannot be found skipping.
###################################### forms.js loaded
############################### browserElementPanning.js loaded
######################## BrowserElementChildPreload.js loaded
There are no live subprocesses.

@tobbi

I think the issue might be that adb.exe is not running for some reason. But I don't know how to restart it.

@mykmelez
Owner

You shouldn't need ADB to use the Simulator. It's just for communicating with an actual device. And the Simulator should start it for you automatically, the first time you open its Dashboard (to restart it, either restart Firefox or disable/enable the addon in the Add-ons Manager).

I just pushed new preview builds (Windows, Mac, Linux). Unfortunately, I don't have any particular reason to think they resolve this issue. But it's worth checking.

@mykmelez
Owner

@tobbi Just to make sure I understand correctly: after you saw that last console message ("BrowserElementChildPreload.js loaded"), the Simulator closed, and control returned to the terminal?

@tobbi

The last message was actually "There are no live subprocesses". But after that, it returned to the terminal.

@tobbi

Oh, wait, now I got "Subprocesses are still alive. Doing emergency join."

@mykmelez
Owner

Hmm, strange. Those messages are printed by ContentParent::JoinAllSubprocesses, which is called only by PowerManagerService::restart, which itself only seems to be called by UpdatePrompt.restartProcess, which is only called by other code in UpdatePrompt.js.

But the Simulator uses a build of B2G that doesn't even contain UpdatePrompt.js. And even if it did, the line that calls PowerManagerService::restart should be removed by the preprocessor when compiled for an OS other than Gonk. So it shouldn't show up in a Windows build.

Which makes this quite a puzzle.

At the risk of sounding a bit like a broken record, I wonder if you can install the latest preview build that I pushed yesterday and then try to run the Simulator again. I built this latest preview build a bit differently than in the past, and the new procedure might reduce certain kinds of errors that could theoretically cause a problem like this (although I still don't know of any specific reason why it should occur).

Also, this time, please try uninstalling the old version of the Simulator before installing the new one. That shouldn't matter, but I've noticed an issue on Windows when installing a new copy of the addon over an older one.

And cc: @ochameau for his thoughts!

@ochameau
Collaborator

I confirm what you said about UpdatePrompt. Did someone on platform ever tried running b2g on win8?!

Were you able to find a free Win8 ISO to install in a VM?

@mykmelez
Owner

I confirm what you said about UpdatePrompt. Did someone on platform ever tried running b2g on win8?!

Heh, I don't think anyone besides Simulator developers are testing even on Windows 7. :-/

Were you able to find a free Win8 ISO to install in a VM?

Erm, not sure if this question was for me, but I do now have a (not free, but rather purchased) license for Windows 8, which I've installed in a VM and can use to diagnose Windows 8-specific issues.

@mykmelez
Owner

Without being able to reproduce this issue, it's very hard to resolve. That doesn't make it unimportant. To the contrary, if one person is experiencing it, then likely many others are too, which makes it very important to resolve! However, it's also important for us to ship the next release to the folks who can take advantage of it.

So I'm going to move this out of the v3 milestone, but I'm still paying attention to it, and I look forward to hearing about your experience with the latest preview build! I'll also think about ways to improve logging so we can get a better idea about what's going on.

@mykmelez
Owner

@tobbi Any chance the latest preview builds (Windows, Mac, Linux) resolve this issue for you?

@tobbi

I just tried and, no, it doesn't. But maybe I just need to do a clean reinstall of the add-on. If I created a new firefox profile, would that be the equivalent of a clean reinstall?

@mykmelez
Owner

Hmm, it should be, although it should also be sufficient to uninstall the addon and then restart Firefox.

@mykmelez
Owner

@tobbi Did a clean install make any difference?

To see if it's a path issue, you might try creating a Firefox profile in your user directory and installing the Simulator into that profile, i.e. (using cmd.exe):

C:\Users\Myk>mkdir tempprof
C:\Users\Myk>"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -profile tempprof

Then install the latest preview build for Windows into that Firefox profile and try starting the Simulator.

@tobbi

Interesting. I just (re-?) installed the latest version of the Simulator in a new profile, and it doesn't appear to install correctly. I don't have a Firefox OS simulator menu item (in either profile) and if I just enter file:///C:/Users/Tobbi/tempprof/extensions/r2d2b2g@mozilla.org//resources/r2d2b2g/data/content/index.html manually into the location bar, the site loads, but won't open the simulator if I press the button.

@mykmelez
Owner

@tobbi and I chatted on IRC, where he reported that the Simulator now works when he starts it in the release version of Firefox, although it still doesn't work in Nightly. So it seems like we fixed his original problem, and the remaining problem he is encountering is #518. But we're going to leave this issue open until we fix that one and he confirms that the Simulator works in Nightly with that fix.

@mykmelez
Owner

@tobbi I pushed preview builds (Windows, Mac, Linux) yesterday with the fix in #518. Can you try them out and let me know if they work for you on Nightly?

@tobbi

It's weird. Now it again won't work on either Release nor Nightly. It still closes in both, even in a new profile. I don't know what made it work earlier. But at least the menu item shows again now.

@mykmelez
Owner

@tobbi Sometimes a Simulator process will hang, and it keeps the Gaia profile locked, so no new process can start. Check the Task Manager for a b2g.exe process, kill it if you find one there, and then try starting the Simulator again.

If that still doesn't work, or there isn't a b2g.exe process running, you might try deleting the Gaia profile's parent.lock file. If Windows reports that the file can't be deleted because it's in use, then that means some process is holding onto the file. The Gaia profile directory will be something like C:\Users\Tobbi\tempprof\extensions\r2d2b2g@mozilla.org\profile (if you're using the tempprof Firefox profile) or C:\Users\Tobbi\AppData\Roaming\Mozilla\Firefox\Profiles\SOMETHING\extensions\r2d2b2g@mozilla.org\profile (if you're using your regular Firefox profile).

If this turns out to be the problem, then we'll still need to figure out why the process is hanging.

@anefzaoui

Sadly same message here "Subprocesses are still alive. Doing emergency join"
Same conditions: Windows 8 x86

@tobbi

Hey, sorry for the delay:
There was no b2g.exe process in the task manager, so no need to kill one.

There was a parent.lock file in the b2g profile directory, a 0 KB one anyway. I deleted that one, to no avail. So, yeah, Firefox OS still won't start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.