Closed Bug 45074 Opened 24 years ago Closed 24 years ago

Linux: mozilla <URL> -console crashes in gtk/clipboard

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: mcafee, Assigned: pavlov)

References

()

Details

(Keywords: crash, platform-parity, verifyme, Whiteboard: [nsbeta3+])

Attachments

(4 files)

from 40481.

mozilla http://www.mozilla.org -console crashes on linux.
Adding crash keyword
Keywords: crash
m20, pavlov
Assignee: mcafee → pavlov
Summary: mozilla http://www.mozilla.org -console crashes on linux. → Linux: mozilla <URL> -console crashes in gtk/clipboard
Target Milestone: --- → M20
#0  0x40a45da7 in ?? () from /usr/X11R6/lib/libX11.so.6
#1  0x409e219e in ?? () from /usr/lib/libgdk-1.2.so.0
#2  0x4083d8f4 in nsClipboard::Init (this=0x80f6198) at nsClipboard.cpp:167
#3  0x4083d607 in nsClipboard::nsClipboard (this=0x80f6198)
    at nsClipboard.cpp:87
#4  0x408539d8 in nsClipboardConstructor (aOuter=0x0, aIID=@0x80623dc,
    aResult=0xbffff524) at nsWidgetFactory.cpp:58
#5  0x4010b14e in nsGenericFactory::CreateInstance (this=0x80fd3f0,
    aOuter=0x0, aIID=@0x80623dc, aResult=0xbffff524) at nsGenericFactory.cpp:47
#6  0x40107f53 in nsComponentManagerImpl::CreateInstance (this=0x8065088,
    aClass=@0xbffff580, aDelegate=0x0, aIID=@0x80623dc, aResult=0xbffff524)
    at nsComponentManager.cpp:1237
#7  0x40112bb4 in nsComponentManager::CreateInstance (aClass=@0xbffff580,
    aDelegate=0x0, aIID=@0x80623dc, aResult=0xbffff524) at nsRepository.cpp:81
#8  0x40113dbf in nsServiceManagerImpl::GetService (this=0x8064b48,
    aClass=@0xbffff580, aIID=@0x80623dc, result=0xbffff60c,
    shutdownListener=0x0) at nsServiceManager.cpp:346
#9  0x4011430a in nsServiceManagerImpl::GetService (this=0x8064b48,
    aProgID=0x805f860 "component://netscape/widget/clipboard",
    aIID=@0x80623dc, result=0xbffff60c, shutdownListener=0x0)
    at nsServiceManager.cpp:493
#10 0x40114700 in nsServiceManager::GetService (
    aProgID=0x805f860 "component://netscape/widget/clipboard",
    aIID=@0x80623dc, result=0xbffff60c, shutdownListener=0x0)
    at nsServiceManager.cpp:606
#11 0x401132f7 in nsGetServiceByProgID::operator() (this=0xbffff66c,
    aIID=@0x80623dc, aInstancePtr=0xbffff60c) at nsServiceManager.cpp:66
#12 0x8058e8c in nsCOMPtr<nsIClipboard>::assign_from_helper (this=0xbffff668,
    helper=@0xbffff66c, aIID=@0x80623dc) at ../../dist/include/nsCOMPtr.h:856
#13 0x805b7f5 in nsCOMPtr<nsIClipboard>::nsCOMPtr (this=0xbffff668,
    helper=@0xbffff66c) at ../../dist/include/nsCOMPtr.h:552
#14 0x80523fd in DoOnShutdown () at nsAppRunner.cpp:614
#15 0x805434b in main (argc=3, argv=0xbffff6f4) at nsAppRunner.cpp:1097
#16 0x4056bcb3 in ?? () from /lib/libc.so.6
Target Milestone: M20 → ---
this works in todays build.. although -console doesn't really seem to do
much...  i brought up the javascript console incase thats what I was supposed to
do... marking works for me
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Well, this doesn't work for me... Re-opening.

(gdb) set args http://www.mozilla.org -console
(gdb) run
Starting program: /project/omega/mozilla/m18/0801/./mozilla-bin
http://www.mozilla.org -console
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
Usage: apprunner <url>
        <url>:  a fully defined url string like http:// etc..
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x406b407a in XInternAtom () from /usr/X11R6/lib/libX11.so.6
(gdb) bt
#0  0x406b407a in XInternAtom () from /usr/X11R6/lib/libX11.so.6
#1  0x4064d53e in gdk_atom_intern (atom_name=0x404f58fa "CLIPBOARD", 
    only_if_exists=0) at gdkproperty.c:46
#2  0x404d1b3a in inflate_mask ()
   from /project/omega/mozilla/m18/0801/components/libwidget_gtk.so
#3  0x404d18fa in inflate_mask ()
   from /project/omega/mozilla/m18/0801/components/libwidget_gtk.so
#4  0x404dfe30 in inflate_mask ()
   from /project/omega/mozilla/m18/0801/components/libwidget_gtk.so
#5  0x400ae779 in nsGenericFactory::CreateInstance ()
   from /project/omega/mozilla/m18/0801/./libxpcom.so
#6  0x400ac37a in nsComponentManagerImpl::CreateInstance ()
   from /project/omega/mozilla/m18/0801/./libxpcom.so
#7  0x400b34c8 in nsComponentManager::CreateInstance ()
   from /project/omega/mozilla/m18/0801/./libxpcom.so
#8  0x400b403f in nsServiceManagerImpl::GetService ()
   from /project/omega/mozilla/m18/0801/./libxpcom.so
#9  0x400b441d in nsServiceManagerImpl::GetService ()
   from /project/omega/mozilla/m18/0801/./libxpcom.so
#10 0x400b4698 in nsServiceManager::GetService ()
   from /project/omega/mozilla/m18/0801/./libxpcom.so
#11 0x400b392c in nsGetServiceByProgID::operator() ()
   from /project/omega/mozilla/m18/0801/./libxpcom.so
#12 0x400bd9d1 in nsCOMPtr_base::assign_from_helper ()
   from /project/omega/mozilla/m18/0801/./libxpcom.so
#13 0x804c1e5 in JS_PushArguments ()
#14 0x804d83d in JS_PushArguments ()
#15 0x40254213 in __libc_start_main (main=0x804d72c <JS_PushArguments+10924>, 
    argc=3, argv=0xbffff2f4, init=0x804a860 <_init>, fini=0x8051fd0 <_fini>, 
    rtld_fini=0x4000ac30 <_dl_fini>, stack_end=0xbffff2ec)
    at ../sysdeps/generic/libc-start.c:90
(gdb) 
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
ok, i see it now.  what is happening is the error being generated by the invalid
command line arguments is causing the clipboard to be told to force data to the
clipboard, which is causing it to be created, blah blah blah... basically, stuff
is happening before gtk_init is getting called.

looking in to how to fix this.
another bug should be filed on this...  `mozilla -console
http://www.mozilla.org` works, but `mozilla http://www.mozilla.org -console`
doesn't.  i'm attaching a patch to fix this crash now though
Attached patch patchSplinter Review
smfr, please take a look at this patch.
Status: REOPENED → ASSIGNED
Keywords: nsbeta3, patch
The patch looks OK, but I wonder what else in main1() can fail, and perhaps leave 
us in a partially initialized state which requires some shutdown which will now 
be missed? Can the clipboard and other code themselves store a flag to say that 
they were initted properly, and only if this flag is set do we attempt to shut 
them down?

I'm worried that this is a very fundamental logic change to fix what is, after
all, a toolkit issue.
nsbeta3+, P3 for M18, only need to stop the crash.
Whiteboard: [nsbeta3+]
Target Milestone: --- → M18
Attached patch new patchSplinter Review
so i went through, and made sure that everything that is returning failure is
something bad(tm).  I believe that this new patch makes sure that we return the
right thing as well as cleans up some code ;)
fixed
over to keyboard nav... pav, looks like bugzilla didn't get your resolution, so
i'll set it fixed per your comment above.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago24 years ago
Component: Browser-General → Keyboard Navigation
Keywords: pp
QA Contact: doronr → sairuh
Resolution: --- → FIXED
Reopening. PC/Linux build 2000082708 still segfaults.
Details are the same as in my comment from 2000-08-01 19:41.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
doh, i put rv instead of mainResult when I checked in.  I have a fix
Attached patch 1 line changeSplinter Review
Patch looks good.
Status: REOPENED → ASSIGNED
fixed.. for real this time ;)
fixed i say
Status: ASSIGNED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Verified fixed on 2000082908.
Status: RESOLVED → VERIFIED
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: