JDK-6616692 : Two Java consoles exist when refresh the game applets
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u5
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-10-15
  • Updated: 2010-04-04
  • Resolved: 2007-10-31
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Tested build: 6u5-b99 (plugin2) - Oct 5 window build
Tested OS/ browser:  
- win 2000 pro(sp4)/ FF3 (beta)
- XP-pro (sp2)/ FF3

Problem: When trying to refresh/reload the game applet in the same firefox 3 browser session, there are two Java consoles existed at the same time on the screen. It appears that one is associated with the original screen and other is associated with the refresh applet.  This problem doesn't occur using promoted 6u5-b04 on the same machines/configurations

Steps to reproduce:
(Using game applets from http://www.gamehouse.com)

1) Using FF3 to browse http://www.gamehouse.com
2) From the Online game section, locate Carribean Stud-Poker game
3) Play the game as guess or registered account with the site if you have one
4) Try to refresh/reload the applet (either at the beginning of the game or any time during the game)

You will see two Java console exists at the same time (see attached screnshots). 
Other game at the same site www.gamehouse.com can be used to reproduce this problem

Comments
EVALUATION This bug is being marked as a duplicate of 6622332 for bookkeeping purposes and does not need to be re-verified independently. In the case of a regression please file a new bug.
31-10-2007

EVALUATION The justification of this bug is not correct in the context of the new Java Plug-In. Since the new plug-in supports multiple JVMs attached simultaneously to the browser, it is possible that two or more JVMs might be active at the same time. The question is why this happens in this scenario. The applets on www.gamehouse.com are badly behaved and take a long time to terminate: longer than the new plug-in allows before tearing them down "hard". Hard teardown results in the browser-side window being destroyed before the applet's EmbeddedFrame, which provokes AWT bug 6592751. The new plug-in detects the occurrence of this bug and marks the JVM instance as tainted, preventing new applets from executing in this JVM instance. However, at the time this happens, there is another live applet on the same web page, so the JVM instance is not shut down immediately. Later, while viewing the same web page, the game applet is inserted into the HTML and it is launched in a new JVM instance. This is why two Java consoles appear simultaneously. Reloading the page causes the tainted one to exit, two applets to be loaded in the clean JVM, one of them to shut down uncooperatively, and the JVM instance to be tainted due to 6592751. The game applet is afterward inserted into the web page, the second Java Console appears, and the process repeats itself. We could give applets some more time to shut down all of their threads before deciding that the JVM instance needs to be tainted. This webrev makes this change. If 6592751 were fixed, based on testing, it seems that this would eliminate the appearance of the second Java console. For this reason I'm considering this change to fix this bug even though two Java Consoles continue to appear. Without 6592751 being fixed, the appearance of two Java Consoles is the correct behavior with the new plug-in in this scenario.
17-10-2007

SUGGESTED FIX http://sa.sfbay.sun.com/projects/deployment_data/6u5/6616692.0
17-10-2007