Closed
Bug 266292
Opened 20 years ago
Closed 20 years ago
strange behaviour with command line, or even sometimes crash, when using gtk handled arguments
Categories
(Toolkit :: Startup and Profile System, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: glandium, Assigned: benjamin)
Details
(Keywords: fixed-aviary1.0, regression, Whiteboard: [have patch] - has review, needs approval)
Attachments
(2 files)
438 bytes,
patch
|
Details | Diff | Splinter Review | |
893 bytes,
patch
|
darin.moz
:
review+
jst
:
superreview+
jst
:
approval-aviary+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041027 Firefox/0.10.1 (Debian package 0.10.1+1.0PR-5)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041027 Firefox/0.10.1 (Debian package 0.10.1+1.0PR-5)
./firefox-bin --display=:0.0 segfaults
while
./firefox-bin --display=:0.0 http://mozilla.org/
displays the usage
The explanation is that gtk_init removes the arguments it treated and thus
updates argc and argv. But nsCmdLineService::Initialize gets a value that has
been saved _before_ the update, so, in the first case, it tries to read from a
NULL pointer (--display=:0.0 is replaced by NULL by gtk), and in the second, it
sees twice http://mozilla.org/ (the --display=:0.0 being replaced by
http://mozilla.org/, argc decreased, but the second argument not NULLed)
Saving argc again after gtk_init call, so that it gets the new value, fixes the
issue.
Fix will follow.
Note that #183640 is the same problem in an other bunch of code (the viewer
seems outdated, though)
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Reporter | ||
Comment 1•20 years ago
|
||
Assignee | ||
Comment 2•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #163591 -
Flags: review?(darin)
Assignee | ||
Comment 3•20 years ago
|
||
This is a regression since 0.9, that nobody caught. Three cheers for long
testing cycles!
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-aviary1.0+
Keywords: regression
Whiteboard: [have patch] - need review darin
Reporter | ||
Comment 4•20 years ago
|
||
True, argc is not used anywhere else.
It probably got into there when adding support for -register without X support
needed.
![]() |
||
Updated•20 years ago
|
Attachment #163591 -
Flags: review?(darin) → review+
Assignee | ||
Updated•20 years ago
|
Whiteboard: [have patch] - need review darin → [have patch] - has review, needs approval
Assignee | ||
Updated•20 years ago
|
Attachment #163591 -
Flags: approval-aviary?
Comment 5•20 years ago
|
||
trying to shutdown on changes for 1.0, lets get this for 1.1.
jay, can you try and generate a crash, check talkback for top crash just to make
sure.
renominate if we thing this is high visability
Flags: blocking-aviary1.0+ → blocking-aviary1.0-
![]() |
||
Comment 6•20 years ago
|
||
If anyone has been able to reproduce this with a Talkback enabled build, please
post your incident ids. Or if there are stack traces out there, please post one
here so I can get an idea of what to look for in the Talkback data. Thanks.
Assignee | ||
Comment 7•20 years ago
|
||
chofmann, can I disagree here? This is a basic correctness patch, and it would
affect anyone who uses GTK flags to start Firefox.
Flags: blocking-aviary1.0- → blocking-aviary1.0?
Assignee | ||
Comment 8•20 years ago
|
||
And this crash happens before the talkback client is initialized, so it will
never show up in talkback.
Assignee | ||
Comment 9•20 years ago
|
||
This is fixed on trunk, but I'm going to leave it open to make sure it stays on
the aviary radar.
Updated•20 years ago
|
Flags: blocking-aviary1.0? → blocking-aviary1.0-
Comment 10•20 years ago
|
||
Comment on attachment 163591 [details] [diff] [review]
Alternate fix, call gtk_init with gArgv, gArgc
approval-aviary+ per discussion with Ben, and sr=jst
Attachment #163591 -
Flags: superreview+
Attachment #163591 -
Flags: approval-aviary?
Attachment #163591 -
Flags: approval-aviary+
Assignee | ||
Updated•20 years ago
|
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
![]() |
||
Comment 12•20 years ago
|
||
tested with 2004110309-0.11 bits on linux fc2 (gnome). when I issue
./firefox-bin --display=:0.0
or
./firefox-bin --display=:0.0 http://www.mozilla.org
all I get is this:
./firefox-bin: error while loading shared libraries: libmozjs.so: cannot open
shared object file: No such file or directory
is that expected?
Comment 13•20 years ago
|
||
try:
./firefox --display=:0.0
or just
./firefox
you shouldn't run firefox-bin directly.
![]() |
||
Comment 14•20 years ago
|
||
thanks, Andrew!
yep, running with those commands works nicely (launches firefox, and at the
targeted url if provided).
Status: RESOLVED → VERIFIED
Updated•17 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•