Closed Bug 41116 Opened 25 years ago Closed 24 years ago

Old document is destroyed even if new one fails to load

Categories

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

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: colin, Assigned: hyatt)

References

Details

(Keywords: verifyme, Whiteboard: [nsbetadenied])

1. go to http://www.uark.edu/~wrg 2. click on "compliance tests" (upper left) 3. click on "audio support" 4. click on the WAV image 5. click on something else so Mozilla window loses focus 6. click back on the Mozilla window to give it focus 7. Mozilla dies This is with todays Linux build (0531). On OpenVMS (where I first noticed this problem) I actually get a stack dump: %SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=0000000000000000, PC=0000000001E4E0B8, PS=0000001B %TRACE-F-TRACEBACK, symbolic stack dump follows image module routine line rel PC abs PC LIBRAPTORHTML NSEVENTSTATEMANAGER PreHandleEvent 49319 0000000000006688 0000000001E4E0B8 LIBRAPTORHTML NSPRESSHELL HandleEventInternal 70944 000000000000D154 0000000001EBDFA4 LIBRAPTORHTML NSPRESSHELL HandleEvent 70885 000000000000CF90 0000000001EBDDE0 LIBRAPTORVIEW NSVIEW HandleEvent 32364 0000000000002504 0000000002786504 LIBRAPTORVIEW NSVIEWMANAGER2 DispatchEvent 25853 00000000000049AC 000000000279FC4C LIBRAPTORVIEW NSVIEW HandleEvent 31671 00000000000004E4 00000000027844E4 LIBWIDGET_GTK NSWIDGET DispatchEvent 74402 0000000000003FD4 0000000000E6B0C4 LIBWIDGET_GTK NSWIDGET DispatchWindowEvent 74293 0000000000003E48 0000000000E6AF38 LIBWIDGET_GTK NSWINDOW SetFocus 72570 0000000000002880 0000000000E73550 LIBJSDOM NSGLOBALWINDOW Focus 66640 000000000000C240 0000000000876CD0 LIBNSAPPSHELL NSWEBSHELLWINDOW HandleEvent 59594 0000000000005D6C 000000000079E3EC LIBWIDGET_GTK NSWIDGET DispatchEvent 74402 0000000000003FD4 0000000000E6B0C4 LIBWIDGET_GTK NSWINDOW handle_mozarea_focus_in 74206 00000000000062D8 0000000000E76FA8 LIBGTK GTKMARSHAL gtk_marshal_BOOL__POINTER 7885 00000000000000E0 00000000011AFFF0 LIBGTK GTKSIGNAL gtk_handlers_run 13677 00000000000039C4 00000000011E7754 LIBGTK GTKSIGNAL gtk_signal_real_emit 13237 0000000000002AAC 00000000011E683C LIBGTK GTKSIGNAL gtk_signal_emit 12320 0000000000000B20 00000000011E48B0 LIBGTK GTKWIDGET gtk_widget_event 26128 0000000000006F14 0000000001225E54 LIBGTK GTKWINDOW gtk_window_real_set_focus 24402 0000000000004014 000000000122FEF4 LIBGTK GTKSIGNAL gtk_signal_real_emit 13252 0000000000002AF0 00000000011E6880 LIBGTK GTKSIGNAL gtk_signal_emit 12320 0000000000000B20 00000000011E48B0 LIBGTK GTKSIGNAL gtk_signal_real_emit 13252 0000000000002AF0 00000000011E6880 LIBGTK GTKSIGNAL gtk_signal_emit 12320 0000000000000B20 00000000011E48B0 LIBWIDGET_GTK NSWINDOW handle_toplevel_focus_in 74128 0000000000006138 0000000000E76E08 LIBGTK GTKMARSHAL gtk_marshal_BOOL__POINTER 7885 00000000000000E0 00000000011AFFF0 LIBGTK GTKSIGNAL gtk_handlers_run 13677 00000000000039C4 00000000011E7754 LIBGTK GTKSIGNAL gtk_signal_real_emit 13237 0000000000002AAC 00000000011E683C LIBGTK GTKSIGNAL gtk_signal_emit 12320 0000000000000B20 00000000011E48B0 LIBGTK GTKWIDGET gtk_widget_event 26128 0000000000006F14 0000000001225E54 LIBGTK GTKMAIN gtk_main_do_event 20903 0000000000001248 00000000011AE958 LIBWIDGET_GTK NSGTKEVENTHANDLER handle_gdk_event 69837 0000000000001750 0000000000E5DD70 LIBGDK GDKEVENTS gdk_event_dispatch 31199 0000000000002690 0000000001007BB0 LIBGLIB GMAIN g_main_dispatch 19189 0000000000000AD0 0000000000F5DE20 LIBGLIB GMAIN g_main_iterate 19410 00000000000014AC 0000000000F5E7FC LIBGLIB GMAIN g_main_run 19468 0000000000001690 0000000000F5E9E0 LIBGTK GTKMAIN gtk_main 20666 0000000000000A58 00000000011AE168 LIBWIDGET_GTK NSAPPSHELL Run 53198 0000000000001360 0000000000E4F400 MOZILLA-BIN NSAPPRUNNER main1 62347 0000000000005E80 0000000000035E80 MOZILLA-BIN NSAPPRUNNER main 62631 0000000000006504 0000000000036504 MOZILLA-BIN NSAPPRUNNER __MAIN 0 0000000000000070 0000000000030070 MOZILLA-BIN 0 000000000002EA38 000000000003EA38 PTHREAD$RTL 0 000000000004E3DC 00000000001843DC PTHREAD$RTL 0 0000000000032E78 0000000000168E78 0 FFFFFFFF8359F118 FFFFFFFF8359F118 The access violation message says that a read operation was attempted on address 0. Very reproducable.
I'm going to pass this your way, saari. The focus handling code in PreHandleEvent is mostly yours and hyatt's.
Assignee: joki → saari
Works okay on Windows. I need to get a linux box up and running again.
Status: NEW → ASSIGNED
Keywords: nsbeta2
Target Milestone: --- → M16
Putting on [nsbeta2+] radar for beta2 fix.
Whiteboard: [nsbeta2+]
M16 has been out for a while now, these bugs target milestones need to be updated.
Hm, it looks like the GlobalWindow's document is null after a URL fails to load (I'm assuming the .wav URL failed to load, especially on Linux).
So, I've worked around the crash by adding a null check. We still have big problems when we fail to load a URL though... the old document is being blown away even though there is no new document, which causes the content area to be nonresponsive until a new page is loaded. This bug is a good test case for that, as we are failing to load the .wav URL. Removing nsbeta2+ keyword, CC'ing valeski for ideas on where this should go (docshell?).
Summary: Mozilla dies when refocusing → Old document is destroyed even if new one fails to load
Whiteboard: [nsbeta2+]
I'll take this one since it sounds like the problem is that we shouldn't be destroying the existing ContentViewer if the new URL fails to load... -- rick
Assignee: saari → rpotts
Status: ASSIGNED → NEW
Seems like this bug and bug 37032 have the exact same root. Would it make sense to unify them into a single bug by marking one of them duplicate?
*** Bug 37032 has been marked as a duplicate of this bug. ***
Putting on [nsbeta2-] radar. Not critical to beta2 and the crash is gone (right, bryner?)
Whiteboard: [nsbeta2-]
Mass update: changing qacontact to ckritzer@netscape.com
QA Contact: janc → ckritzer
Please update target, M16 is long gone. The destruction of the old doc probably causes a number of oddities I've seen. I think I have a bug report in on one of them. (The main html pane doesn't refresh if a load is stopped after the old doc is destroyed).
colin@theblakes.com, could you please re-test and see if this still happens? Thanks! -ckritzer
Keywords: verifyme
My mozilla (2000090321) simply tries to download unknown filetype file audio/x-wav. It doesn't destroy the old document and doesn't crash at all. So it's WORKSFORME.
I've forgot to tell I'm using Linux too.
The reason it works now is because Mozilla has since learned how to deal with WAV files on Linux (it just pops up the save dialog). So to see if the bug has really been fixed we need to find another page which fails to load.
Updating QA Contact.
QA Contact: ckritzer → lorca
Changing Status for my reference. Was NSBETA2-. Anyone think this should be renominated?
Whiteboard: [nsbeta2-] → [nsbetadenied]
Reassigning QA Contact for all open and unverified bugs previously under Lorca's care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
Clearing very old milestone (M16) in hope of reevaluation.
Target Milestone: M16 → ---
This may be a moot issue with hyatt's changes to defer switching xcntent viewers until after content as actually arrived for the new viewer... Should I close this one out?
Target Milestone: --- → mozilla0.9.2
clearing milestone and over to hyatt. if this isn't covered by the stuff you're doing dave, send it back.
Assignee: rpotts → hyatt
Target Milestone: mozilla0.9.2 → ---
Thanks.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
QA contact updated
QA Contact: gerardok → madhur
verified on build 2001-07-11-06-0.9.2
Status: RESOLVED → VERIFIED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.