Closed Bug 309770 Opened 19 years ago Closed 14 years ago

Turning off Java doesn't kill the JVM

Categories

(Camino Graveyard :: Plug-ins, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: sfraser_bugs, Unassigned)

References

Details

If you turn off Java in the Camino prefs, the JVM keeps running until you quit
and restart. It should go away immediately.
For the time being (at least), this is by design -- there's a comment in the
MRJ Plugin (in MRJSession::close()) that says that calling DestroyJavaVM
"hangs Chimera".

When I have more time, I'll look into changing this.

Does it also stay running when turning it off in FF? Should this be a core bug?
> Does it also stay running when turning it off in FF?

Yes, it does.

I've also found out that the JVM stays running even if you're using Apple's
Java Applet.plugin ... though I don't yet know whether this is an issue in the
Java Applet.plugin or in the Mozilla.org browsers themselves.

In any case, the MRJ Plugin (with or without the rest of the Java Embedding
Plugin) won't turn off the JVM even if the browser makes the appropriate
call(s).

I don't consider this a high priority issue:  I don't think there are any
security implications (even though the JVM is still running, it's not possible
to launch an applet).  And if you're still worried, all you need to do is quit
the browser and restart it (after having disabled Java in the Preferences).

But this issue does deserve a thorough going-into sometime down the road --
possibly in the next few months.

One problem is that the JVM sucks CPU time even when it's not doing anything,
and it would be nice to be able to clear it out.
I find that when the JVM isn't doing anything (i.e. running an applet), it
uses very little CPU.  (I didn't measure this directly -- I just used top to
compare Firefox's CPU usage with Sun's Clock applet running compared to its
CPU usage in a blank window after destroying the Clock applet.)

http://java.sun.com/applets/jdk/1.4/demo/applets/Clock/example1.html

"very little" != none. people still complain.
I've also seen the JVM get "hung up" and suck gobs of CPU even when I've left the pages with applets. That's when I'd like to be able to kill it.
> I've also seen the JVM get "hung up" and suck gobs of CPU even when I've
> left the pages with applets.

I've never seen anything like this (I assume that, in the cases you're talking
about, none of your current pages have applets in hidden tabs).  If I
_did_ see something like this, I'd suspect a hang or an imminent crash (or
just possibly some kind of leak from the JVM).

Mass-reassign of bugs still assigned to pinkerton to nobody; filter on "NoMoPinkBugsInCamino".
Assignee: mikepinkerton → nobody
QA Contact: plugins
We're not fixing this for 2.1, and it's irrelevant for any future release, so closing.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.