Closed Bug 10576 Opened 25 years ago Closed 25 years ago

Mozilla crashes when trying to read the event object from an onmouseout on the body tag when leaving the mozilla window

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
All
defect

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: jonesev, Assigned: vidur)

Details

(Keywords: dom0, Whiteboard: [WORKSFORME] nsJSUtils::nsConvertObjectToJSVal () has problems when the mouse is out of the window)

Attachments

(1 file)

Mozilla crashes when trying to read the event object from an onmouseout on the
body tag when leaving the mozilla window.

This is demonstrated by the following code (attached as a test case):

<html>
<head>
<title>Crash Mozilla!</title>
</head>
<body onmouseout="alert(event.target.nodeName)">
<p>When your mouse leaves this window, Mozilla will crash.</p>
</body>
</html>

Just as it says, when the mouse leaves the window, Mozilla crashes. If you
change the onmouseover to any other event (onClick for example), no crash
occurs. If you change the event.target.nodeName to something that is NOT the
event.target object, no crash occurs. event.target causes a crash, but event
does not. I am assuming that the problem is in reading what object recieved the
event when the mouse is no longer in the window. I discovered this bug while
testing bug 3140 so I wonder if they are related?

I tested it with the build from July 26, 1999 under both Windows 95 and under
Linux and the same thing happens. In Windows 95 it causes an error in jsdom.dll.
Here is the output from the crash under linux:

vulturex@clutch:~/temp/package$ ./mozilla-viewer.sh
file:/home/vulturex/crash.html
MOZILLA_FIVE_HOME=/home/vulturex/temp/package
  LD_LIBRARY_PATH=/home/vulturex/temp/package
      MOZ_PROGRAM=./viewer
        moz_debug=0
     moz_debugger=
Going to create the event queue
nsWidget::RealizeSignal(0x80ca4a0)
generating focus event
Reading file...
Reading file...Done
Reading file...
Reading file...Done
Browser Window Alert: HTML
.//run-mozilla.sh: line 29:   429 Segmentation fault      $prog ${1+"$@"}

Here is the output from gdb apprunner core:

Program received signal SIGSEGV, Segmentation fault.
0x4039ac4b in nsJSUtils::nsConvertObjectToJSVal ()
Whiteboard: [TESTCASE] nsJSUtils::nsConvertObjectToJSVal () has problems when the mouse is out of the window
Was not able to reproduce the crash ( on Sept. 27th build ). jonesev, do you
still see the crash?
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
Whiteboard: [TESTCASE] nsJSUtils::nsConvertObjectToJSVal () has problems when the mouse is out of the window → [WORKSFORME] nsJSUtils::nsConvertObjectToJSVal () has problems when the mouse is out of the window
It appears to be resolved now! I tried the October 1st build on Windows 98 and
it no longer crashed. I havn't been able to test the Linux version yet, or the
Win32 version on NT, but I will soon.

I am marking this worksforme. Thanks harishd.
Status: RESOLVED → VERIFIED
Working fine. Marking verified.
Keywords: dom0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: