If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Java EXIT_ON_CLOSE causes whole browser to shutdown/crash



Core Graveyard
Java: OJI
16 years ago
7 years ago


(Reporter: Ian, Assigned: Ping Liao)


Firefox Tracking Flags

(Not tracked)



(1 attachment)



16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529
BuildID:    2002052918

An applet that creates a JFrame using the JFrame.EXIT_ON_CLOSE property brings
down the whole browser when the 'X' on the JFrame is clicked.

Reproducible: Always
Steps to Reproduce:
1. Create an applet that generates a JFrame as described above.
2. Click the X to close the JFrame.
3. More info/sample code avail. on request.

Comment 1

16 years ago
-> OJI (or other java component?)
Assignee: Matti → joe.chou
Component: Browser-General → OJI
QA Contact: imajes-qa → pmac

Comment 2

16 years ago
Reporter: Can you please attach a complete testcase? Have you tried with JRE 1.4?


Comment 3

16 years ago
http://www.cs.wcu.edu/~rwg/moz/150630/ has an small example of this bug in
action.  (Click the link for the .html file.)  The source to the applet is in
the same directory.

The same thing (the browser process dies) happens in Internet Explorer when I
set it to use Sun's JVM for <applet> tags.

Windows NT 4.0+SP6a
Mozilla 2002060908
IE 6.00.2600.0000

java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

Comment 4

16 years ago
Created attachment 87130 [details]
Testcase / Java applet source

The .html file looks like:

<applet code="Bug150630.java" width="50" height="50"></applet>

Comment 5

16 years ago
Erm, yeah, that was supposed to be:

<applet code="Bug150630.class" width="50" height="50"></applet>

Sorry for the spam...

Comment 6

16 years ago
Hm...happens in IE, jpi bug?
Ever confirmed: true

Comment 7

16 years ago
Yeah, looks like this is a Java Plug-in bug.  Opera's process doesn't die, but
it pops up a dialog box that says the Java VM has exited and Java will be
disabled for the rest of the session.  At any rate, this is bad juju since since
if you try doing a call to System.exit() in an Applet, it throws some security
exception or another.  Closing a JFrame shouldn't be able to do what
System.exit() can't.  I'll file a bug over on java.sun.com...

Comment 8

16 years ago
Sorry I didn't get back to you, I don't check this account often and
didn't expect a response so quickly. Sounds like it's well under
control now, though that makes it the second bug in Java I've come
across this week. Congrats and thanks to all of you for providing such
a high-quality browser!


Comment 9

16 years ago
FWIW, I just got an e-mail saying that this has been assigned Bug ID # 4701249 
over on the Java Developer Connection's Bug Parade.

Comment 10

16 years ago
Sun has resolved the bug I filed over there as "Closed, not reproducable."  
http://developer.java.sun.com/developer/bugParade/bugs/4701249.html has the 
details.  I will reserve my amazement for another forum.

Comment 11

15 years ago
Re-assign to Ping.
Assignee: joe.chou → ping.liao


15 years ago
QA Contact: pmac → petersen

Comment 12

15 years ago
For what it's worth, this bug has been somewhat solved with the latest versions
of the Java runtime/plugin.  With 1.4.1, an AccessControlException is thrown
when the applet tries calling JFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE).
marking worksforme based on the last comment
Last Resolved: 15 years ago
Resolution: --- → WORKSFORME


7 years ago
Component: Java: OJI → Java: OJI
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.