Firefox 15 crashing when started from Command line in Windows 15
I have been loading my work space via a batch file everyday for the past 4 years.
One of the apps I start is Firefox using the following command:
@start /D"C:\Program Files\Mozilla Firefox\" firefox.exe
My batch file would run, and close with no issue.
As of Firefox 15, using the same command now ties Firefox to the console. When I close the console, Firefox closes, when I open it again from the standard shortcut, I get the "Firefox has crashed"
I also notice that since upgrading to Firefox 15, some console.log calls go to the Windows Console while firefox is loading. Most notably is HTTPSEverywhere.
When I rolled back to Firefox 14, the issue disappeared
Изменено
Выбранное решение
As a temporary work-around, you can change the start command to create a new command shell and start Firefox from within that command shell. The following command will do what you need:
start "TempShell" /D "C:\Program Files\Mozilla Firefox" /B "CMD /C start ""Firefox"" firefox.exe"
NOTE: Thunderbird 15 also has the same problem ... and the same work-around.
Прочитайте этот ответ в контексте 👍 4Все ответы (10)
@start /D"C:\Program Files\Mozilla Firefox\" firefox.exe
Why is there a space before firefox.exe, and why are the end quotes not at the end of the filename?
With start /dPath you can specify the working directory via Path as an alternative to specifying the full path for the program.
It isn't really necessary to specify the working directory.
- start "" "C:\Program Files\Mozilla Firefox\firefox.exe"
Back in the WinXP days, the /Dpath appeared to be needed to get it to load the right profile. Before opening this defect, I had already put the whole path & filename in a quote and was getting the same results.
Выбранное решение
As a temporary work-around, you can change the start command to create a new command shell and start Firefox from within that command shell. The following command will do what you need:
start "TempShell" /D "C:\Program Files\Mozilla Firefox" /B "CMD /C start ""Firefox"" firefox.exe"
NOTE: Thunderbird 15 also has the same problem ... and the same work-around.
b_sleeth, thank you! This appears to be working with no downside that I can see yet. The original console is able to close without crashing Firefox, and I am not seeing any orphaned processes.
Thanks!
I experienced the same problem (as that reported by JohnJimenezHD above) with Firefox 15 (and 15.0.1) under Windows XP SP3, with (some of my) batch files using either of the following formats:
start " " "<web address>"
or
start <web address>
However, I would describe the symptoms slightly differently: The batch file CMD window remains open until all Firefox windows invoked by the batch file are closed. Then it closes automatically. Conversely, if the batch file CMD window is closed (by clicking the "Close" button at the top right of the window), all the Firefox windows suddenly close, and the next invocation of Firefox opens them all with an apology for ending abnormally.
Since some of my batch files still worked, I did a bit of experimenting and determined that Firefox 15 will properly handle a batch file with 4 "start browser" commands, but will fail with a batch file containing 5-6 or more. And sometimes it will properly process a batch file with which it will usually fail.
As per the work-around solution proposed by b_sleeth above, the following modifications appear to work:
cmd /c start " " "<web address>"
or
cmd /c start <web address>
Based on my experimentation, it would appear this is some sort of semi-random stack overflow problem in FF 15.
I really wish "software developers" would spend more time testing before releasing software.
Изменено
A quick addition to the solution provided by b_sleeth. I was trying to open an URL in Firefox using his/her solution but was getting error messages in the console. Turns out that when using the ampersand (&) character, you need to escape it with ^ (^&).
start "TempShell" /B "CMD /C start "" "http://website?arg1=10^&arg2=20""
howdy b_sleeth,
thank you! that workaround of yours has me back to running smoothly. here's hoping the devs find out what they broke - and fix it ... soon.
take care, lee
Hi,
I'm really sorry to have caused this regression. Thanks for reporting this issue, I've done various tests before submitting my patch but I totally missed that issue...
It is now matter of getting my fix reviewed and landed, but in the meantime, I tried to craft an addon that would hopefully fix your issues.
You can download it here: https://bugzilla.mozilla.org/attachment.cgi?id=660206
And follow the fixing progress here: https://bugzilla.mozilla.org/show_bug.cgi?id=787313
++ Alex
using 16.0.1 downloaded yesterday; got the same problem, plus: litters the window with zillions of messages ;-)
I'm starting all programs from the command-line
- i.e. "I'm working there".
Once I started Firefox, using Firefox, it spams the console window (stuff like: >> Z:\>warn: Failed to remove handler from Inputter.onResize warn: Failed to remove handler from CommandAssignment.onAssignmentChange << >> Z:\>error In screenshot/fullpage: boolean parameters can not have a defaultValue. Ignoring <<
This prevents me from reading the stuff I need to read in the cmd/console.
My, when I last programmed system pipes, I did that with assembler. Let me try to add some help, if I can.
My suggestion for Firefox is to follow the normal procedure, being: on program start check - if the caller wants
STDIN/STDOUT/STDERROR redirection
(Firefox ignores that currently; eg: Firefox.exe >NUL)
I suggest for example:
dir xxxxxxxxxxxxxx
dir xxxxxxxxxxxxxx >NUL
- ^->this redirects STDOUT to NUL
dir xxxxxxxxxxxxxxxx >NUL 2>NUL
- ^->redirects STDOUT and STDERR to NUL
FWIW, in Dos/Windows(cmd.exe) the (file)handles where: 0 STDIN (like: "copy con test.txt" redirects stdin to file test.txt) 1 STDOUT (can be ommited like in: "dir xxx 1>NUL" == "dir xxx >NUL") 2 STDERR (e.g. dir xxxxxxxxx 1>NUL 2>NUL)
I'm stumped at Firefox because it takes control of its parent console:
I usually handle similar problems by spawning a child process; e.g.: start "title-of-this-cmd" %COMSPEC% /k dir c:\*.* (/k leaves the cmd open for demonstration purposes here; normally I'd use:/c see: cmd /? start /? for infos ) (BTW: what happened to: Firefox /? I'd adore if Firefox would output some command-line help, like we did the first 20 years in computing, before silly things like the computer-mouse happend and everything got so slow... ROFL/;-)
(this is a child process because it inherits the environment from the parent - you can check this with SET test=XXX and find that the child cmd.exe will have %test% set to XXX, too)
So I'm setting variables in the normal cmd and then go spawn the child cmd.exe which then starts the firefox.exe.
Bummer!
The pain is that I have to keep that extra cmd.exe If I would CTRL+C close that window, then: ALL Firefox instances/windows crash-close immediately! (and upon starting the next firefox, it pops up the error that it has crashed)
So there is no way to get rid of the spawned-child cmd;
and that child cmd gets littered with all those funny messages
as mentioned at the start (as if it was a log file)