Last Comment Bug 185946 - filepicker crashes Mozilla on second press of Open/Browse buttons on web-pages
: filepicker crashes Mozilla on second press of Open/Browse buttons on web-pages
Status: RESOLVED INVALID
: crash, fixed1.8.1.12, verified1.8.1.12
Product: Core
Classification: Components
Component: XUL (show other bugs)
: Trunk
: x86 BeOS
: -- critical (vote)
: ---
Assigned To: Sergei Dolgov
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-17 22:38 PST by cls
Modified: 2012-06-07 10:45 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (711 bytes, patch)
2007-11-19 09:06 PST, Sergei Dolgov
doug: review+
samuel.sidler+old: approval1.8.1.12+
Details | Diff | Splinter Review

Description cls 2002-12-17 22:38:30 PST
When uploading a new attachment, I see an easily reproducible crash if the
"File:" textfield is not empty.  It doesn't matter if the path given is valid or
not.

If the textfield is empty, then the File Picker dialog comes up without a problem. 

It looks like part of the problem is that defaultText at
http://lxr.mozilla.org/seamonkey/source/widget/src/beos/nsFilePicker.cpp#124
winds up being the last directory portion of the path in the text field.  (ie,
textfield=/boot/home/src/ => defaultText="src")


Here's the stack:

segment violation occurred
BPrivate::TFilePanel::SetSaveText(char const *):
SetSaveText__Q28BPrivate10TFilePanelPCc:
+0062  ec38686e:   *        08468b    movl    0x00000008(%esi), %eax
mozilla-bin:sc
   frame         retaddr
fd0007cc   ec37f41c  BFilePanel::SetSaveText(char const *) + 0000004c
fd0007ec   ed1243fa  nsFilePicker::Show(short *) + 0000012a
fd000910   ed78f3c7  nsFileControlFrame::MouseClick(nsIDOMEvent *) + 000006f7
fd000b18   ecbaef1a  nsEventListenerManager::HandleEvent(nsIPresContext *,
nsEvent *, nsIDOMEvent **, nsIDOMEventTarget *, unsigned int, nsEventStatus *) +
000006ee
fd000ca8   ecd642b4  nsGenericElement::HandleDOMEvent(nsIPresContext *, nsEvent
*, nsIDOMEvent **, unsigned int, nsEventStatus *) + 000008a4
fd000df0   ecbf4cd8  nsHTMLInputElement::HandleDOMEvent(nsIPresContext *,
nsEvent *, nsIDOMEvent **, unsigned int, nsEventStatus *) + 000008cc
fd001060   ed769c4b  PresShell::HandleEventInternal(nsEvent *, nsIView *,
unsigned int, nsEventStatus *) + 00000127
fd0010a0   ed769b0a  PresShell::HandleEventWithTarget(nsEvent *, nsIFrame *,
nsIContent *, unsigned int, nsEventStatus *) + 0000003a
fd0010d4   ecbb9a7b 
nsEventStateManager::CheckForAndDispatchClick(nsIPresContext *, nsMouseEvent *,
nsEventStatus *) + 000001e3
fd0011a8   ecbb7745  nsEventStateManager::PostHandleEvent(nsIPresContext *,
nsEvent *, nsIFrame *, nsEventStatus *, nsIView *) + 0000053d
fd00122c   ed769dfe  PresShell::HandleEventInternal(nsEvent *, nsIView *,
unsigned int, nsEventStatus *) + 000002da
fd00126c   ed769a79  PresShell::HandleEvent(nsIView *, nsGUIEvent *,
nsEventStatus *, int, int &) + 00000525
fd0012e8   ed9ba29d  nsViewManager::HandleEvent(nsView *, nsGUIEvent *, int) +
00000309
fd0013c8   ed9aef6a  nsView::HandleEvent(nsViewManager *, nsGUIEvent *, int) +
00000026
fd0013e8   ed9b983c  nsViewManager::DispatchEvent(nsGUIEvent *, nsEventStatus *)
+ 00000820
fd00146c   ed9aea34  HandleEvent(nsGUIEvent *) + 00000044
fd00148c   ed127e5d  nsWindow::DispatchEvent(nsGUIEvent *, nsEventStatus &) +
00000049
fd0014a8   ed127ed2  nsWindow::DispatchWindowEvent(nsGUIEvent *) + 00000036
fd0014c8   ed12b3da  nsWindow::DispatchMouseEvent(unsigned int, nsPoint,
unsigned int, unsigned int) + 000000ae
fd00152c   ed12a754  nsWindow::CallMethod(MethodInfo *) + 000002e8
fd0015c0   ed122646  nsAppShell::Run(void) + 000000b6
fd0015e8   ed0e81a8  nsAppShellService::Run(void) + 00000024
fd0015f8   80010d08  main1(int, char **, nsISupports *) + 00000948
fd001718   80011265  main + 00000111
fd001744   8000bd15  _start + 00000061
mozilla-bin:
Comment 1 Doug Shelton 2006-11-08 16:11:00 PST
I think we can close this as "worksforme".  In current build of Firefox, the field comes up blank.  when you click on the field (as if to enter text) the filepicker opens immediately and without crashing here.  Neilx, is this still a problem on SeaMonkey?
Comment 2 Niels Reedijk 2006-11-09 00:18:34 PST
I'm affraid it won't work, I actually reproduced it. When I'm at my BeOS computer tomorrow, I'll post the way to reproduce this bug.
Comment 3 Wayne Mery (:wsmwk, NI for questions) 2007-08-29 09:30:45 PDT
Niels, of comment 2 - unfortunately "I'm not working on firefox anymore."
Comment 4 Wayne Mery (:wsmwk, NI for questions) 2007-08-30 12:07:32 PDT
cls, reporter, writes "I removed BeOS from my systems years ago."
Comment 5 Sergei Dolgov 2007-11-19 04:23:57 PST
Looks like it is bad idea to set SaveText if this isn't file Save dialog.
line:
http://lxr.mozilla.org/mozilla1.8/source/widget/src/beos/nsFilePicker.cpp#135

if (!mTitle.IsEmpty()) {
may be replaced with corrected one:
if (!mDefault.IsEmpty() && panel_mode == B_SAVE_PANEL) {
Comment 6 Sergei Dolgov 2007-11-19 09:06:44 PST
Created attachment 289328 [details] [diff] [review]
patch

set savetext only if BFilePanel is really in "save" mode
Comment 7 Doug Shelton 2007-11-19 19:02:18 PST
Comment on attachment 289328 [details] [diff] [review]
patch

Patch applied and tested to current branch code.  Opened file picker, selected file, clicked OK.  Opened, selected different file, clicked OK.  No crash!  New file name inserted.  Works great.  Requesting approval for 1.8.1.11.
Comment 8 Doug Shelton 2007-11-19 19:04:17 PST
s/clicked OK/clicked Open
Comment 9 Samuel Sidler (old account; do not CC) 2007-12-17 16:17:54 PST
Comment on attachment 289328 [details] [diff] [review]
patch

Approved for 1.8.1.12; a=ss for release-drivers. Please land as soon as
possible.
Comment 10 Sergei Dolgov 2007-12-17 23:11:55 PST
Checking in mozilla/widget/src/beos/nsFilePicker.cpp;
/cvsroot/mozilla/widget/src/beos/nsFilePicker.cpp,v  <--  nsFilePicker.cpp
new revision: 1.28.12.1; previous revision: 1.28
done 
Comment 11 juan becerra [:juanb] 2008-01-29 17:43:03 PST
Could someone with access to a BeOS machine verify this fix using the release candidate for Fx20012?
Comment 12 Doug Shelton 2008-01-29 21:45:58 PST
(In reply to comment #11)
> Could someone with access to a BeOS machine verify this fix using the release
> candidate for Fx20012?
> 
Verified fixed in 2.0.0.12pre, built on 20070127.
Comment 13 juan becerra [:juanb] 2008-01-30 16:59:07 PST
Removing the "fixed1.8.1.12" keyword.
Comment 14 Robert Kaiser 2012-06-07 10:45:00 PDT
AFAIK, the BeOS port is dead, so let's close out this bug.

Note You need to log in before you can comment on or make changes to this bug.