Closed
Bug 113957
Opened 23 years ago
Closed 23 years ago
crash when connecting to url using javascript to java communication
Categories
(Core Graveyard :: Java: OJI, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
mozilla0.9.8
People
(Reporter: william.h.hodgert, Assigned: joe.chou)
References
()
Details
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
BuildID: 20011120
When javascript calls a method of a java applet that creates a urlconnection
the connection locks mozilla. This is not a problem on windows. I have tried
0.9.4, 0.9.5, 0.9.6 with java plugin 1.3.1-b24 and 1.3.1_02 and they all work
on windows but lockup in linux (redhat 6.2)
Reproducible: Always
Steps to Reproduce:
1.Create a web page with a javascript function that calls an applet method.
2.Create a applet on that page with a method that makes a simple file access on
the server.
3.Change the .java.policy file to allow urlconnection.
(for test purposes you can use grant {permission java.net.SocketPermission "*:0-
", "connect,accept,resolve,listen";};)
4.Test out the page.
Actual Results: The browser thread will completely lock and kill is required
to remove it.
Expected Results: The connection to the server is successful and the results
are returned.
These are these files will display the issue.
*********** TestUrl.html ************
<HTML><HEAD>
<TITLE>HTML Test Page</TITLE></HEAD>
<BODY>
<APPLET
CODEBASE = "."
CODE = "TestURL.class"
NAME = "TestApplet"
WIDTH = 10
HEIGHT = 10
HSPACE = 0
VSPACE = 0
ALIGN = top>
</APPLET>
<BR>
<FORM>
<INPUT type="button" value="getUrl" onclick="alert
(document.TestApplet.getUrl('fine.html'));">
</FORM>
</BODY>
</HTML>
********* TestUrl.java ************
import java.awt.*;
import java.net.*;
import java.io.*;
import java.applet.*;
public class TestURL extends Applet {
public void init() {}
public String getUrl(String s) {
System.out.println("getUrl(" + s + ")");
String txt = "";
try {
URL url = new URL(getDocumentBase(), s);
URLConnection conn = url.openConnection();
InputStream in = conn.getInputStream();
int c;
while((c = in.read()) != -1) {
txt = txt + String.valueOf((char)c);
}
} catch(Exception ex) {
ex.printStackTrace();
}
System.out.println("Done.");
return txt;
}
}
************ fine.html ****************
Everything is fine.
Comment 1•23 years ago
|
||
---> OJI component
Assignee: rogerl → joe.chou
Component: Javascript Engine → OJI
QA Contact: pschwartau → pmac
Reporter | ||
Comment 2•23 years ago
|
||
I believe this is associated with bug 100151 I have not confirmed the fix in
0.9.7 on linux. This is a little different test case with javascript to java
communication.
*** This bug has been marked as a duplicate of 100151 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Target Milestone: --- → mozilla0.9.8
Reporter | ||
Comment 3•23 years ago
|
||
This was not solved by the merged bug.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Updated•23 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•23 years ago
|
||
Testcase WFM with jre1.4beta3 on RedHat 6.2 using NETSCAPE_6_2_1 branch
(i got the expected alert without any problems).
Can't test with trunk because of bug 99337.
Reporter: could you please try 0.9.7 with jre1.4?
Comment 5•23 years ago
|
||
WFM with jre1.3.1_01 on RedHat 7.1 using trunk branch
from 20020213.
Reporter | ||
Comment 6•23 years ago
|
||
I tried this on .97 .98 and netscape 6.2 with java 1.4 and they all work. I
would still like to have it work with the default install. If it means that
1.4 is include in the defaul tinstall I am fine with that.
Comment 7•23 years ago
|
||
Well, if it is not reproducible with 1.4 then problem is not in mozilla code.
Hopefully 1.4 will become default plugin soon (now Sun has release version)
but i can not guarantee this.
Anyway, if problem is not reproducible anymore then i am going to close this
as WFM. Please reopen if you manage to reproduce it with plugin from jre 1.4.
Status: NEW → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → WORKSFORME
Chris Petersen is a new QA contact for oji component. His email is:
petersen@netscape.com
Assignee: joe.chou → petersen
Comment 9•22 years ago
|
||
fixing small error for pmac@netscape.com (filter with : SPAMMAILSUCKS)
Assignee: petersen → joe.chou
QA Contact: pmac → petersen
You need to log in
before you can comment on or make changes to this bug.
Description
•