Closed Bug 314652 Opened 19 years ago Closed 14 years ago

Crash when opening a new file / saving page with Firefox 1.5 Beta2 on HPUX [@ nsFilePicker::Show]

Categories

(Core :: Widget: Gtk, defect)

1.8 Branch
HP
HP-UX
defect
Not set
critical

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: gowrisharmi.kandasamy, Unassigned)

References

()

Details

(Keywords: crash)

Crash Data

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 (No IDN) Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 (No IDN) Firefox/1.0.6

First time when tried to save any web page using the file/savepafe as  menu , I get the following javascript error. Next time , when I tried to save the file , firefox dumps core .  Looks like it is not able to bring the file chooser menu. This works fine with Firefox 1.0.7. Looks like firefox 1.5 specific issue.

JavaScript error: , line 0: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIFilePicker.init]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: chrome://global/content/contentAreaUtils.js :: getTargetFile :: line 507"  data: no]


 The following is the stack trace , when the core is generated.

Core File information:
Program received signal SIGBUS, Bus error
  si_code: 0 - BUS_UNKNOWN - Unknown Error.
0x794dfed0 in $$dyncall_external+0 () from /opt/fire-debug/firefox/components/libwidget_gtk2.sl
(gdb) bt
#0  0x794dfed0 in $$dyncall_external+0 () from /opt/fire-debug/firefox/components/libwidget_gtk2.sl
#1  0x7950fa18 in nsFilePicker::Show (this=0x4082f178, aReturn=0x7f7f4940) at nsFilePicker.cpp:499
#2  0x79ed9538 in XPTC_InvokeByIndex+0x120 () from /opt/fire-debug/firefox//libxpcom_core.sl
#3  0x79a8e194 in XPCWrappedNative::CallMethod (ccx=@0x7f7f4790, mode=CALL_METHOD)
    at xpcwrappednative.cpp:2138
#4  0x79a9d304 in XPC_WN_CallMethod (cx=0x400a5088, obj=0x40510f08, argc=0, argv=0x40d36b3c, 
    vp=0x7f7f4680) at xpcwrappednativejsops.cpp:1402
#5  0x79baa3a8 in js_Invoke (cx=0x400a5088, argc=0, flags=0) at jsinterp.c:1163
#6  0x79bc09ac in js_Interpret (cx=0x400a5088, pc=0x405a6218 ":", result=0x7f7f40c8)
    at jsinterp.c:3486
#7  0x79baa474 in js_Invoke (cx=0x400a5088, argc=2, flags=0) at jsinterp.c:1183
#8  0x79bc09ac in js_Interpret (cx=0x400a5088, pc=0x404f4d13 ":", result=0x7f7f3ac8)
    at jsinterp.c:3486
#9  0x79baa474 in js_Invoke (cx=0x400a5088, argc=9, flags=0) at jsinterp.c:1183
#10 0x79bc09ac in js_Interpret (cx=0x400a5088, pc=0x4006f01b ":", result=0x7f7f34c8)
    at jsinterp.c:3486
#11 0x79baa474 in js_Invoke (cx=0x400a5088, argc=1, flags=0) at jsinterp.c:1183
#12 0x79bc09ac in js_Interpret (cx=0x400a5088, pc=0x40926955 ":", result=0x7f7f2ec8)
    at jsinterp.c:3486
#13 0x79baa474 in js_Invoke (cx=0x400a5088, argc=1, flags=2) at jsinterp.c:1183
#14 0x79baa9b0 in js_InternalInvoke (cx=0x400a5088, obj=0x404fd110, fval=1078972720, flags=0, 
    argc=1, argv=0x7f7f2bd0, rval=0x7f7f2c14) at jsinterp.c:1260
#15 0x79b51a08 in JS_CallFunctionValue (cx=0x400a5088, obj=0x404fd110, fval=1078972720, argc=1, 
    argv=0x7f7f2bd0, rval=0x7f7f2c14) at jsapi.c:4184
#16 0x78bea260 in nsJSContext::CallEventHandler (this=0x4034d7d0, aTarget=0x404fd110, 
    aHandler=0x404fd130, argc=1, argv=0x7f7f2bd0, rval=0x7f7f2c14) at nsJSEnvironment.cpp:1405
#17 0x78c9eb84 in nsJSEventListener::HandleEvent (this=0x40704320, aEvent=0x40914cd0)
    at nsJSEventListener.cpp:185
#18 0x78991cf4 in nsEventListenerManager::HandleEventSubType (this=0x406f46a8, 
    aListenerStruct=0x4061db80, aDOMEvent=0x40914cd0, aCurrentTarget=0x40cee948, aSubType=8,
aPhaseFlags=7) at nsEventListenerManager.cpp:1685
#19 0x78992624 in nsEventListenerManager::HandleEvent (this=0x406f46a8, aPresContext=0x4033c148, 
    aEvent=0x7f7f1fd4, aDOMEvent=0x7f7f26c4, aCurrentTarget=0x40cee948, aFlags=7, 
    aEventStatus=0x7f7f1fd0) at nsEventListenerManager.cpp:1784
#20 0x78b669ec in nsXULElement::HandleDOMEvent (this=0x406f84a8, aPresContext=0x4033c148, 
    aEvent=0x7f7f1fd4, aDOMEvent=0x7f7f26c4, aFlags=7, aEventStatus=0x7f7f1fd0)
    at nsXULElement.cpp:2152
#21 0x78b65b80 in nsXULElement::HandleDOMEvent (this=0x407185d8, aPresContext=0x4033c148, 
    aEvent=0x7f7f1fd4, aDOMEvent=0x0, aFlags=1, aEventStatus=0x7f7f1fd0) at nsXULElement.cpp:1982
#22 0x784e8678 in PresShell::HandleDOMEventWithTarget (this=0x40416aa0, aTargetContent=0x407185d8, 
    aEvent=0x7f7f1fd4, aStatus=0x7f7f1fd0) at nsPresShell.cpp:6462
#23 0x78843764 in nsMenuFrame::Execute (this=0x40a9ae30, aEvent=0x7f7f1764) at nsMenuFrame.cpp:1641
#24 0x7883c198 in nsMenuFrame::HandleEvent (this=0x40a9ae30, aPresContext=0x4033c148, 
    aEvent=0x7f7f1764, aEventStatus=0x7f7f1ac8) at nsMenuFrame.cpp:454
#25 0x784e8010 in PresShell::HandleEventInternal (this=0x40416aa0, aEvent=0x7f7f1764, 
    aView=0x40914ba0, aFlags=1, aStatus=0x7f7f1ac8) at nsPresShell.cpp:6407
#26 0x784e6fc0 in PresShell::HandleEvent (this=0x40416aa0, aView=0x40914ba0, aEvent=0x7f7f1764, 
    aEventStatus=0x7f7f1ac8, aForceHandle=0, aHandled=@0x7f7f1af0) at nsPresShell.cpp:6202
#27 0x78bd3d88 in nsViewManager::HandleEvent (this=0x4046d808, aView=0x40a8a320, 
    aEvent=0x7f7f1764, aCaptured=0) at nsViewManager.cpp:2557
#28 0x78bd25b8 in nsViewManager::DispatchEvent (this=0x4046d808, aEvent=0x7f7f1764, 
    aStatus=0x7f7f1828) at nsViewManager.cpp:2246
#29 0x78bbea34 in HandleEvent (aEvent=0x7f7f1764) at nsView.cpp:171
#30 0x794fc7d0 in nsCommonWidget::DispatchEvent (this=0x40065bb0, aEvent=0x7f7f1764, 
    aStatus=@0x7f7f17ac) at nsCommonWidget.cpp:219
#31 0x794ea4d8 in nsWindow::OnButtonReleaseEvent (this=0x40065bb0, aWidget=0x40a84e70, 
    aEvent=0x40436960) at nsWindow.cpp:1594
#32 0x794f395c in button_release_event_cb (widget=0x40a84e70, event=0x40436960)
    at nsWindow.cpp:3719
#33 0x7a9a2cfc in _gtk_marshal_BOOLEAN__BOXED (closure=0x40a1bc78, return_value=0x7f7f1590, 
n_param_values=2, param_values=0x7f7f1268, invocation_hint=0x7f7f156c, marshal_data=0x0)
    at gtkmarshalers.c:83
#34 0x7a3b12d8 in g_closure_invoke (closure=0x40a1bc78, return_value=0x7f7f1590, n_param_values=2, 
    param_values=0x7f7f1268, invocation_hint=0x7f7f156c) at gclosure.c:437
#35 0x7a3d9724 in signal_emit_unlocked_R (node=0x4016dd80, detail=0, instance=0x40a84e70, 
    emission_return=0x7f7f1468, instance_and_params=0x7f7f1268) at gsignal.c:2488
#36 0x7a3d7f48 in g_signal_emit_valist (instance=0x40a84e70, signal_id=28, detail=0, 
    var_args=0x7f7f11b0) at gsignal.c:2257
#37 0x7a3d8378 in g_signal_emit (instance=0x40a84e70, signal_id=28, detail=0) at gsignal.c:2291
#38 0x7aba2d5c in gtk_widget_event_internal (widget=0x40a84e70, event=0x40436960)
    at gtkwidget.c:3631
#39 0x7aba2694 in gtk_widget_event (widget=0x40a84e70, event=0x40436960) at gtkwidget.c:3437
#40 0x7a99f908 in gtk_propagate_event (widget=0x40a84e70, event=0x40436960) at gtkmain.c:2156
#41 0x7a99d36c in gtk_main_do_event (event=0x40436960) at gtkmain.c:1394
#42 0x7a0e8310 in gdk_event_dispatch (source=0x40008eb8, callback=0, user_data=0x0)
    at gdkevents-x11.c:2259
#43 0x7a491b5c in g_main_dispatch (context=0x4002e508) at gmain.c:1933
#44 0x7a494238 in g_main_context_dispatch (context=0x4002e508) at gmain.c:2483
#45 0x7a494d50 in g_main_context_iterate (context=0x4002e508, block=1, dispatch=1, self=0x402c2140)
    at gmain.c:2564
#46 0x7a495e70 in g_main_loop_run (loop=0x401550e8) at gmain.c:2768
#47 0x7a99bff4 in gtk_main () at gtkmain.c:974
#48 0x794f8874 in nsAppShell::Run (this=0x4025a758) at nsAppShell.cpp:139
#49 0x792ff938 in nsAppStartup::Run (this=0x402516b0) at nsAppStartup.cpp:150
#50 0x22100 in XRE_main (argc=1, argv=0x7f7f095c, aAppData=0x40001028) at nsAppRunner.cpp:2309
#51 0x11310 in main (argc=1, argv=0x7f7f095c) at nsBrowserApp.cpp:61


Reproducible: Always

Steps to Reproduce:
1.Select File/saveas from the menu.
2.Following error is thrown for the first time 
"JavaScript error: , line 0: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIFilePicker.init]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: "
3. Try saving the file again. Firefox crashes.

1. Select File/Open File
2. The file chooser menu does not come up.
3. Select File/Ope File.
  
  Firefox crashes. This works fine with Firefox 1.0.7 . THis looks like problem with Firefox 1.5 Beta only.
OS: other → HP-UX
Hardware: Other → HP
Version: unspecified → 1.5 Branch
Used   gtk+-2.6.8  for building firefox 1.5 beta2
Component: General → Widget: Gtk
Product: Firefox → Core
QA Contact: general → gtk
Version: 1.5 Branch → 1.8 Branch
Could be related to bug 305970.
Severity: major → critical
Keywords: crash
Summary: Crash when opening a new file / saving page with Firefox 1.5 Beta2 on HPUX → Crash when opening a new file / saving page with Firefox 1.5 Beta2 on HPUX [@ nsFilePicker::Show]
Providing proper GTK library name in  nsFilePicker.cpp  & setting SHLIB_PATH to the gtk lib directory solves the problem.  

nsFilePicker::LoadSymbolsGTK24()

   176      // XXX hmm, this seems to fail when gtk 2.4 is already loaded...
   177     //mGTK24 = LoadVersionedLibrary("gtk-2", "4");
   177      mGTK24 = LoadVersionedLibrary("gtk-x11-2.0", "");  
   178      if (!mGTK24) {
   179        return NS_ERROR_NOT_AVAILABLE;
   180      }
   181      GET_LIBGTK_FUNC(gtk_file_chooser_get_filename);

   It is not good idea to look for specific version of GTK . This should be more generic code.
*** Bug 317872 has been marked as a duplicate of this bug. ***
Gowri: can you create a patch that fixes this to work ok on HP-UX?
Gowri, Andrew,

For the save error that I am getting, the specific patch does not seem to work,
I am on Linux/gtk2 so I don't know if this is the exact same crash as you guys
are getting, someone marked my similar bug as a duplicate of yours.

I do get changed behavior depending on if I set -safe-mode, or change optimization.

With debug/noopt things seem to be stable (I don't know that I can confirm that I have seen a crash with debug/noopt, I know that it does cause at least one of the crashes that I can duplicate to go away).

Setting -safe-mode seems to make things more stable, but eventually I still get things to crash in a very similar manner, it just takes longer, the next time that I get a -safe-mode crash will see if it is always reproducable with the given page.

I am running release 1.5, with the patch for 305979, and the gtk specification patch (so 305979 is not it,  but that patch does eliminate the very annoying menu problem, but does not seem to change this issue).
More testing, with debug on, and optimization on (O2) it crashes, 
recomplied with no optimization results in it not crashing.

Not sure exactly what is happening, I would think there are a couple
of extra bytes in the no-opt case that prevent an overflow.
Is this still an issue in Firefox 3.5?

If it is not, we should set the resolution of the bug to WORKSFORME.
I am closing this as INCOMPLETE since nobody has replied.  If it still can be reproduced on a current version of Firefox (3.6/4.0b1 or later), I will reopen the bug.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
Crash Signature: [@ nsFilePicker::Show]
You need to log in before you can comment on or make changes to this bug.