Closed Bug 209559 Opened 21 years ago Closed 11 years ago

Applet calls JavaScript and Mozilla crashes on reloading the page

Categories

(Core Graveyard :: Java: OJI, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: ewlieber, Assigned: alfred.peng)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

I load a simple java applet which in the start method just calls a javascript
function which counts to some large number then returns.  After the function
returns, the applet thread sleeps for some amount of time, then calls the same
javascript function again.  When you hit the reload button in mozilla, then
almost all of the time mozilla crashes.  I have tried this in 1.0.1 as well as
1.3.1 and they both seem to crash.

Reproducible: Always

Steps to Reproduce:
1. Open up the testcase.html
2. Wait for it to load and start running
3. Hit Mozilla's reload button

Actual Results:  
Mozilla starts to reload the page, but then just crashes entirely.

Expected Results:  
Reload the page without crashing, or at least display some error message saying
what went wrong.
test case that exhibits the problem...works along with Test.java
---> OJI
Assignee: rogerl → joshua.xia
Component: Live Connect → OJI
Keywords: crash
QA Contact: pschwartau → dsirnapalli
Summary: Applet calls javascript and mozilla crashes on reloading the page → Applet calls JavaScript and Mozilla crashes on reloading the page
Attachment #125758 - Attachment mime type: application/octet-stream → text/plain
I just wanted to test some old bugs, either if they are happening on Windows
too, or if they are Windows bugs, if they got solved by brandnew Java 1.4.2_02
I don´t know how to test yours:
did a download of both files to a directory, and loaded the html from it
then started the html directly from the attachment.
In both cases, I get an error message in the status line of the browser:
Applet not inited.
Looking now, it is even translated into german (had been english before)
Can you give advice how to test?
Assignee: joshua.xia → kyle.yuan
Whiteboard: DUPME
Test with jre1.5, I got this exception when reload:

netscape.javascript.JSException: Native DOM Object has been released
	at sun.plugin.javascript.navig5.JSObject.invoke(JSObject.java:131)
	at sun.plugin.javascript.navig5.JSObject.call(JSObject.java:175)
	at Test.start(Test.java:8)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

mozilla doesn't crash anymore. There is still some minor issues when quitting
mozilla, though it's not critical.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash
Whiteboard: DUPME
original testcase did not work here, but I have my own at
https://mefisto1.unibe.ch/~bz/lc.html and Java applet source at
https://mefisto1.unibe.ch/~bz/src/LiveConnectTest.java

Appplet creates a thread which calls
win.eval("document.getElementById(\"testtext\").firstChild." +
	"nodeValue = \"run() loop: " + Integer.toString(i++) + "\"");

If the dellay in the loop is increased to 1000 and the reload button hit between
eval() calls no crashes occur

Symptoms on Firefox 1.0.2 (Linux) and JRE 1.4.2_08:

Page loads and applets runs without problems. As soon as page is left or
reloaded firefox crashes. Talkbak ID: TB5194787X
Please try it again using the most recent jre, say jre 1.5.0_02. We fixed a lot
of liveconnect bugs in 1.5.
Yes, I tried it yesterday using jre 1.5.0_2. No crashes so far with Firefox
1.0.2 and Mozilla 1.7.7 both on WinXP an Linux.

There seems to be a memory leak in jre. The java_vm process constantly increases
memory using my example.
(In reply to comment #8)
> There seems to be a memory leak in jre. The java_vm process constantly increases
> memory using my example.

We fixed a memory leak problem in jre 1.5.0_02. the version number of jre can be
found from the first line of java console.
(In reply to comment #9)
> We fixed a memory leak problem in jre 1.5.0_02. the version number of jre can be
> found from the first line of java console.

I hava jre 1.5.0_02 on windows and linux. There must be still a leak somewhere ...
Assignee: yuanyi21 → pete.zha
mass reassign to Alfred
Assignee: zhayupeng → alfred.peng
Product: Core → Core Graveyard
QA Contact: dsirnapalli → java.oji
Mass-closing bugs in the "OJI" component: OJI plugin integration was replaced with npruntime long ago, and these bugs appear to be irrelevant now. If there is in fact a real bug that remains, please file it new in the "Core" product, component "Plug-ins".
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: