Closed Bug 172129 Opened 22 years ago Closed 12 years ago

Applet-Tag in a new window causes Mozilla to hang or crash

Categories

(Core Graveyard :: Java: OJI, defect)

x86
Windows 2000
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: Frank.Jiranek, Assigned: alfred.peng)

References

()

Details

(Keywords: crash, testcase)

1. Load the URL http://www.ep.haufe.de/~jiranek/NewWindowAppletBug/start.html
2. Click on the button "open new window"
3. Click the button "close window" in the new window
4. Click on the button "open new window" again
=> Browser is loading endless
If you close the new window with the window-close-box the browser-application is
not useable anymore (browser menus or submenus are not vislible, no links or
buttons are useable, sometimes the application crashes and if you close all
browser windows the application does not terminate).
The source of this URL is very simple: the start.html contains a java script
that opens a new window with window.open() and the opened window
(appletPage.html) contains an applet-tag (the applet class is not loaded,
because there is no testApplet.class, but this undependent for this bug, an
applet-tag is enough) and a button to close the new window with window.close().
If you want to get the sources just use
http://www.ep.haufe.de/~jiranek/NewWindowAppletBug .
If you close the new window with the window-close-box it works fine!
My testing environment is Win2000, Mozilla 1.1 and Suns JVM 1.4.1 rc.
This example works fine with InternetExplorer!
I don't see the crash, but I do the the other behavior described by the reporter
using W2K, M1.2a and Java 1.4.0_01. Not sure where this one should go. 
Over to JS engine so they can pass it along to the correct owner.
Status: UNCONFIRMED → NEW
Component: Browser-General → JavaScript Engine
Ever confirmed: true
Note: if you remove the applet-tag in the new window (appletPage.html), this
example works fine! Thus there must be a context between java-script and java-VM
that produces this bug. My example is the minimum to show this bug, in our
dhtml-application this bug (or more) causes mozilla to crash.
I'm having the same problem in Mozilla 1.3a (as well as 1.2.1). This only
started to happen several days (nearly two weeks) after I installed the Java(TM)
Plug-in 1.4.0_02-b02. Here's a copy/paste of my about:plugins regarding the Java
plug-in:

Java(TM) Plug-in 1.4.0_02-b02

    File name: libjavaplugin_oji.so
    Java(TM) Plug-in1.4.0_02

MIME Type Description Suffixes Enabled
application/x-java-vm Java Yes
application/x-java-applet Java Yes
application/x-java-applet;version=1.1 Java Yes
application/x-java-applet;version=1.1.1 Java Yes
application/x-java-applet;version=1.1.2 Java Yes
application/x-java-applet;version=1.1.3 Java Yes
application/x-java-applet;version=1.2 Java Yes
application/x-java-applet;version=1.2.1 Java Yes
application/x-java-applet;version=1.2.2 Java Yes
application/x-java-applet;version=1.3 Java Yes
application/x-java-applet;version=1.3.1 Java Yes
application/x-java-applet;version=1.4 Java Yes
application/x-java-applet;jpi-version=1.4.0_02 Java Yes
application/x-java-bean Java Yes
application/x-java-bean;version=1.1 Java Yes
application/x-java-bean;version=1.1.1 Java Yes
application/x-java-bean;version=1.1.2 Java Yes
application/x-java-bean;version=1.1.3 Java Yes
application/x-java-bean;version=1.2 Java Yes
application/x-java-bean;version=1.2.1 Java Yes
application/x-java-bean;version=1.2.2 Java Yes
application/x-java-bean;version=1.3 Java Yes
application/x-java-bean;version=1.3.1 Java Yes
application/x-java-bean;version=1.4 Java Yes
application/x-java-bean;jpi-version=1.4.0_02 Java Yes
I need to add that I'm using Mozilla 1.2.1 and Mozilla 1.3a on RedHat Linux 7.2,
128MB RAM with a 300MHz Pentium II w/MMX
This belongs in the OJI component; reassigning -
Assignee: asa → joshua.xia
Component: JavaScript Engine → OJI
QA Contact: asa → petersen
The following exception happen on jre1.4.2 build 27 + Mozilla 1.5a
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030623
java.lang.ClassNotFoundException: testApplet.class
	at sun.applet.AppletClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.applet.AppletClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.applet.AppletClassLoader.loadCode(Unknown Source)
	at sun.applet.AppletPanel.createApplet(Unknown Source)
	at sun.plugin.AppletViewer.createApplet(Unknown Source)
	at sun.applet.AppletPanel.runLoader(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Caused by: java.io.IOException: open HTTP connection failed.
	at sun.applet.AppletClassLoader.getBytes(Unknown Source)
	at sun.applet.AppletClassLoader.access$100(Unknown Source)
	at sun.applet.AppletClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	... 10 more
Status: NEW → ASSIGNED
Reporter,

Does the same problem happen for other plug-in such as "real player" as well? 
Joshua, you may need to try some other plugin (use the modules/plugin/sample).
If not a specific Java Plug-in issue, it should belong to other categories.
I have the same problem on Mozilla 1.3.1, RedHat Linux 7.2+ (I'm running 9.0
atm). I've tried the J2SDK and the J2RE (1.4.x). The plugin installs fine
(seemingly), but when I go to a site with a java app, it completely takes down
all Mozilla processes.
->kyle
Assignee: joshua.xia → kyle.yuan
Status: ASSIGNED → NEW
Severity: normal → critical
Keywords: crash
unable to reproduce with Mozilla 1.7 beta and JRE 1.5 beta.
actually, I can reproduce the hang, just not the crash. 
This bug is not repaired yet. 
Is it recognized as the bug? 
The version of Mojilla is 1.7. 
The version of JRE is 1.4.2_03. 
OS occurs also by Windos2000 or WindowsXP. 

By reference. 
Although it is NG with an INPUT tag even when window.close() of Java Script is 
used, it is O.K. with A tag. 

Therefore, isn't this related to Java Script? Please click the following URL to 
reproduce.

http://web-p.wics.ne.jp/char_audi/applet/OYA.html
In the case of comment 21, I can see the problem.
And when this problem is reproduce, I can't stop the mozilla process by exit
menu and to close all window(s).

If child-window is closed by input element,
Mozilla failes to stop some(the count is random?) threads.
These threads is called "invalid thread" by spy++.

I think these threads are make the problems.
1. When the user retry to create a same child window.
2. When the user try to finish the mozilla process.

If child-window is closed by a element,
these invalid thread is not exists in spy++.
According to reports of bugzilla-jp

not reproduced:JRE1.4.0_01,JRE1.4.0_02 and earlier version.
reproduced:JRE1.4.2_03,JRE1.4.2_04,JRE1.4.2_05
in Windows Me, 2k, XP.

When the browser hang, I can't see any deadlock in any Java related thread.
Also, when the browser hang, it does not even try to call plugin to initialize
the applet etc.

The bug can also be reproducible with 1.4.1 with couple tries. So I don't think
it is Java related bug.
JDK/JRE 5.0 Update 4 (Java 1.5.0_04) is newly available at Sun Java download site.
( http://java.sun.com/j2se/1.5.0/download.jsp )
Release Notes ( http://java.sun.com/j2se/1.5.0/ReleaseNotes.html ) says that
bug_id=6255782 is fixed by this update.
See Bug 275783 for detail.

(In reply to comment #16)
After Java 1.5.0_04, I couldn't reproduce hung in test case of comment #12 any
more with Mozilla Suite on Win-2K.
The test case in comment #12 was one of evidences of bug_id=5075590. 
Xiaobin Lu, what is the difference between bug_id=5075590 and bug_id=6255782?  
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5075590 : Closed as "not bug"
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6255782 : Fixed
Why no one check with Java 1.5.0_04 yet?
Does Java updater still fail to find Java 1.5.0_04 update?




Assignee: yuanyi21 → pete.zha
Java 1.5.0_05 and 1.4.2_09 is out ... please test again.

Tested the testcase from comment 12 with SM.
# SeaMonkey 1.8 branch build 2005092109: I crash if I try to load the new child
window (no talkback available for that contributed builds).
# SeaMonkey trunk build 2005092305: All works for me.
Both on WinXP with Java 1.4.2_08. 
Same problem here, with the latest versions of Java and Firefox, except it doesn't make any difference if we click on the button or the A link : Firefox hangs anyway, and a zombie process stays if we close the windows. Win XP SP2.
mass reassign to Alfred
Assignee: zhayupeng → alfred.peng
We have checked this with Firefox 1.0, and the bug does not occur with it. So, it has been introduced with Firefox 1.5. And it's a blocker for us, since we use applets in windows a lot, so we have to advise people to use a different browser.
We did more tests, and found something interesting: the bug disappears after we deactivate the "browseimages" extension. Is it the same problem for everybody ?
Is this a duplicate of bug 375070?
Product: Core → Core Graveyard
OJI has been discontinued and Java now runs out-of-process, so this stuff has probably changed a lot. This bug has no info about current software versions, please file a new bug for new issues or reopen this one with current info, including a crash signature if it still happens and move it to a component outside of graveyard.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.