United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6631056 SingleInstanceService does not work on JRE 1.6.0_03
JDK-6631056 : SingleInstanceService does not work on JRE 1.6.0_03

Details
Type:
Bug
Submit Date:
2007-11-16
Status:
Closed
Updated Date:
2011-02-16
Project Name:
JDK
Resolved Date:
2007-12-17
Component:
deploy
OS:
windows_xp
Sub-Component:
webstart
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
6u10 (b09)

Related Reports

Sub Tasks

Description
FULL PRODUCT VERSION :
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Versione 5.1.2600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
Internet Explorer 7 or Firefox 2.0

A DESCRIPTION OF THE PROBLEM :
The SingleInstanceService does not work correctly on JRE version 1.6.0_03, while it worked fine with previous versions of the JRE, including JRE version 1.6.0_02.

Launching multiple times the JNLP of a Java Web Start application which register itself as a SingleInstanceListener causes multiple instances of that application to be launched. This is an incorrect behavior. The correct behavior would be that subsequent calls to the JNLP file of a "single instance application" shall cause the existing instance to be notified through a call to the newActivation(...) method, instead of opening a new instance.
With JRE version 1.6.0_03, the correct behavior can be obtained only in rare "random" occasions.

The same "single instance" application always works correctly if run with JRE version 1.6.0_02: in this case, a single instance of the application exists, and that instance is notified in case of several calls to the JNLP file.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
On a machine where JRE v1.6.0_03 is installed, try loading several times the following URL through your web browser (I used both IE 7 and Firefox 2.0, with the same result):

http://www.physci.org/jws/singleapp.jnlp

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Only a single instance of the Java Web Start application should be open, and it shall get notified when subsequent calls to the JNLP are made.
ACTUAL -
Most often, multiple instances of the test Java Web Start application get opened.

REPRODUCIBILITY :
This bug can be reproduced often.

---------- BEGIN SOURCE ----------
See:

<http://www.physci.org/jws/singleapp.zip>

Source code by Andrew Thompson.
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Use an older JRE version.
For instance, JRE version 1.6.0_02 is working fine from this point of view.

Release Regression From : 6u2
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

                                    

Comments
EVALUATION

I can reproduce the problem when the I host the testcase on my own server.

Problem might be caused by memory corruption in the native single instance code.  we are only calling strncpy with the correct arguments.
                                     
2007-11-19



Hardware and Software, Engineered to Work Together