-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
7
FULL PRODUCT VERSION :
java version " 1.6.0_35 "
Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
Java HotSpot(TM) Client VM (build 20.10-b01, mixed mode, sharing)
Problem seems to occur since 1.6.0_29
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
Does also occur in Window 7:
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
The problem relates to an applet running i production across multiple branches (+5000 users are affected).
The applet attempts to get an image from the server, but never completes in the fetching and thus blocks other threads from completing (they are in a blocked state).
The problem is easily reproducable in production, and seems to be some kind of concurrency problem when fetching images using AWT (ImageFetcher). The problem does not occur when embedding images (.gif) and using them from the " local location " .
Problem is easier reproducable on slower connection, for instance when running over vpn.
This was working in 1.6 update 26, but seems to stopped working from update 29.
Using JConsole, we have been able to aqquire the dumps and Java console debug output.
(these files can be send to you)
REGRESSION. Last worked in version 6u31
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected result is that the applet is loaded, without one thread blocking others.
ACTUAL -
The result of trying to load the applet is that the entire browser " freezes " forever, and the load of the applet never completes.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages are reported.
REPRODUCIBILITY :
This bug can be reproduced often.
---------- BEGIN SOURCE ----------
Case 1 (load freezes, and applet is never accessible):
public void loadIcons()
{
//String iname;
Image img;
URL url1, url2;
try {
url1 = new URL(getBasePath());
while(1==1)
{
if(DBM.DBTCIA.getString( " icon " + Icon_Entries)==null) break;
Icon_Entries++;
}
icons = new Image[Icon_Entries+1];
for (int i=0; i<Icon_Entries; i++){
url2 = new URL(url1, DBM.DBTCIA.getString( " icon " + i));
img = toolkit.getImage(url2);
icons[i] = img;
}
while(1==1)
{
if(DBM.DBTCIA.getString( " statusicon " + StatusIcon_Entries)==null) break;
StatusIcon_Entries++;
}
statusicons = new Image[StatusIcon_Entries+1];
for (int i=0; i<StatusIcon_Entries; i++){
url2 = new URL(url1, DBM.DBTCIA.getString( " statusicon " + i));
img = toolkit.getImage(url2);
statusicons[i] = img;
}
}
catch (MalformedURLException e){
System.out.println( " MalformedURLException: " + e.toString());
}
} // end loadIcons()
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Workaround consists of not using the " ImageFetcher " for getting remote images.
Case 2 (load completes and applet is accessible):
public void loadIcons()
{
//String iname;
ImageIcon img;
URL url1, url2;
try {
//url1 = new URL(getBasePath());
while(1==1)
{
if(DBM.DBTCIA.getString( " icon " + Icon_Entries)==null) break;
Icon_Entries++;
}
icons = new ImageIcon[Icon_Entries+1];
for (int i=0; i<Icon_Entries; i++){
url2 = getClass().getResource( " /dk/danskebank/ " + DBM.DBTCIA.getString( " icon " + i));//new URL(url1, DBM.DBTCIA.getString( " icon " + i));
if(url2 == null)
img = new ImageIcon(); //toolkit.getImage(url2);
else
img = new ImageIcon(url2);
icons[i] = img;
}
while(1==1)
{
if(DBM.DBTCIA.getString( " statusicon " + StatusIcon_Entries)==null) break;
StatusIcon_Entries++;
}
statusicons = new ImageIcon[StatusIcon_Entries+1];
for (int i=0; i<StatusIcon_Entries; i++){
url2 = getClass().getResource( " /dk/danskebank/ " + DBM.DBTCIA.getString( " statusicon " + i)); //new URL(url1, DBM.DBTCIA.getString( " statusicon " + i));
if(url2 == null)
img = new ImageIcon();//toolkit.getImage(url2);
else
img = new ImageIcon(url2);
statusicons[i] = img;
}
}
catch (MalformedURLException e){
System.out.println( " MalformedURLException: " + e.toString());
}
} // end loadIcons()
java version " 1.6.0_35 "
Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
Java HotSpot(TM) Client VM (build 20.10-b01, mixed mode, sharing)
Problem seems to occur since 1.6.0_29
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
Does also occur in Window 7:
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
The problem relates to an applet running i production across multiple branches (+5000 users are affected).
The applet attempts to get an image from the server, but never completes in the fetching and thus blocks other threads from completing (they are in a blocked state).
The problem is easily reproducable in production, and seems to be some kind of concurrency problem when fetching images using AWT (ImageFetcher). The problem does not occur when embedding images (.gif) and using them from the " local location " .
Problem is easier reproducable on slower connection, for instance when running over vpn.
This was working in 1.6 update 26, but seems to stopped working from update 29.
Using JConsole, we have been able to aqquire the dumps and Java console debug output.
(these files can be send to you)
REGRESSION. Last worked in version 6u31
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected result is that the applet is loaded, without one thread blocking others.
ACTUAL -
The result of trying to load the applet is that the entire browser " freezes " forever, and the load of the applet never completes.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages are reported.
REPRODUCIBILITY :
This bug can be reproduced often.
---------- BEGIN SOURCE ----------
Case 1 (load freezes, and applet is never accessible):
public void loadIcons()
{
//String iname;
Image img;
URL url1, url2;
try {
url1 = new URL(getBasePath());
while(1==1)
{
if(DBM.DBTCIA.getString( " icon " + Icon_Entries)==null) break;
Icon_Entries++;
}
icons = new Image[Icon_Entries+1];
for (int i=0; i<Icon_Entries; i++){
url2 = new URL(url1, DBM.DBTCIA.getString( " icon " + i));
img = toolkit.getImage(url2);
icons[i] = img;
}
while(1==1)
{
if(DBM.DBTCIA.getString( " statusicon " + StatusIcon_Entries)==null) break;
StatusIcon_Entries++;
}
statusicons = new Image[StatusIcon_Entries+1];
for (int i=0; i<StatusIcon_Entries; i++){
url2 = new URL(url1, DBM.DBTCIA.getString( " statusicon " + i));
img = toolkit.getImage(url2);
statusicons[i] = img;
}
}
catch (MalformedURLException e){
System.out.println( " MalformedURLException: " + e.toString());
}
} // end loadIcons()
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Workaround consists of not using the " ImageFetcher " for getting remote images.
Case 2 (load completes and applet is accessible):
public void loadIcons()
{
//String iname;
ImageIcon img;
URL url1, url2;
try {
//url1 = new URL(getBasePath());
while(1==1)
{
if(DBM.DBTCIA.getString( " icon " + Icon_Entries)==null) break;
Icon_Entries++;
}
icons = new ImageIcon[Icon_Entries+1];
for (int i=0; i<Icon_Entries; i++){
url2 = getClass().getResource( " /dk/danskebank/ " + DBM.DBTCIA.getString( " icon " + i));//new URL(url1, DBM.DBTCIA.getString( " icon " + i));
if(url2 == null)
img = new ImageIcon(); //toolkit.getImage(url2);
else
img = new ImageIcon(url2);
icons[i] = img;
}
while(1==1)
{
if(DBM.DBTCIA.getString( " statusicon " + StatusIcon_Entries)==null) break;
StatusIcon_Entries++;
}
statusicons = new ImageIcon[StatusIcon_Entries+1];
for (int i=0; i<StatusIcon_Entries; i++){
url2 = getClass().getResource( " /dk/danskebank/ " + DBM.DBTCIA.getString( " statusicon " + i)); //new URL(url1, DBM.DBTCIA.getString( " statusicon " + i));
if(url2 == null)
img = new ImageIcon();//toolkit.getImage(url2);
else
img = new ImageIcon(url2);
statusicons[i] = img;
}
}
catch (MalformedURLException e){
System.out.println( " MalformedURLException: " + e.toString());
}
} // end loadIcons()