JRE 1.4.1 hangs browser when loading LiveConnect applet

RESOLVED WORKSFORME

Status

--
critical
RESOLVED WORKSFORME
16 years ago
8 years ago

People

(Reporter: wmccain, Assigned: yuanyi21)

Tracking

Trunk
x86
Windows 98

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [adt2] Java1, fixed_in_tiger, URL)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3) Gecko/20030312
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3) Gecko/20030312

When JRE 1.4.1_02 is installed and a small (4.6K) signed applet is loaded, the
"Warning - Security" prompt appears, the user accepts the certificate, and the
applet runs correctly.  Under the same circumstances, when a larger (28.3K)
signed applet is loaded, the browser hangs after painting the frame of the
"Warning - Security" pop-up window.

At first I thought this might be an out-of-memory issue, but I retested with a
freshly booted PC (128M RAM), with no other applications loaded.  Same result,
browser hangs loading the larger applet.  After hanging, and while the browser
is still resident, the system Resource Meter shows 80% or more of all system
resources still free.

Occasionally (but not always) the Java Console displays
  java.lang.illegalArgumentException: null source
just before the browser hangs (the Java Console hangs too).  This suggest a
timing problem of some kind -- i.e., the JRE is attempting to execute a signed
applet before it has fully loaded (and before the user has accepted the signing
certificate).  And the timing problem could very well be related to the size of
the JAR file being downloaded from a web site.

Both the small and larger signed applets load and run just fine under Mozilla
(1.3) with JRE 1.4.0_01 installed.  Both applets also load and run perfectly
under Microsoft IE with EITHER JRE 1.4.1_02 or JRE 1.4.0_01.  So the problem is
a REGRESSION, and it is specific to JRE 1.4.1 under Mozilla (1.3).

Reproducible: Always

Steps to Reproduce:
1. Access my small signed applet test case at http://www.metaconnect.com/pt.htm.
 This works.  (When the Security Warning dialog pops up, click on "Grant this
session".)
2. Access my larger signed applet test case at
http://www.metaconnect.com/hostpubl/demos/gsdemo.html.  This hangs the browser.
 (The frame of the Security Warning dialog is painted, but that is as far as it
gets.)

Actual Results:  
Browser hangs.  Java Console hangs too.

Expected Results:  
The entire Security Warning dialog should be painted, the user should be able to
accept the signing certificate, and after that the applet should run.
(Reporter)

Updated

16 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 1

16 years ago
Please use the latest JRE1.4.2-beta, Thanks!

Comment 2

16 years ago
-- Verified in the latest trunk build on Win2K with JRE1.4.1_02. Browser is
hanging when loading larger signed applet.
Whiteboard: Java1

Comment 3

16 years ago
Need traction on this bug
Keywords: nsbeta1

Comment 4

16 years ago
Joshua,

Would you file a bugtraq bug for this and assign to Java Plug-in team? Thanks.

Comment 5

16 years ago
This bug is a duplicate of bug 197759 which we won't have a solution in short 
term. The workaround is to call "getWindow" in the applet "start" method 
instead of "init" method.

(Reporter)

Comment 6

16 years ago
There is no explicit call to "getWindow" in the applet "init" method (or 
anywhere else in the "large signed applet" that hangs).  Not likely it is doing 
anything that makes an indirect call to "getWindow", either.  These applets use 
no Frame or Window objects, they run entirely in the "Web page sandbox".  No 
WindowEvent objects are handled explicitly anywhere in these applets.

Comment 7

16 years ago
"thread applet-sx.class" prio=4 tid=0x02a78450 nid=0x4d8 runnable [206ff000..206
ffd94]
        at sun.plugin.javascript.navig5.JSObject.JSGetNativeJSObject(Native Meth
od)
        at sun.plugin.javascript.navig5.JSObject.JSGetNativeJSObject(Unknown Sou
rce)
        at sun.plugin.javascript.navig5.JSObject.<init>(Unknown Source)
        at sun.plugin.viewer.context.NetscapeAppletContext.getJSObject(Unknown S
ource)
        at netscape.javascript.JSObject.getWindow(Unknown Source)
        at sx.init(sx.java:653)
        at sun.applet.AppletPanel.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

The above is the stack shown during my test. The Applet class sx call getWindow
in Line 653.

(Reporter)

Comment 8

16 years ago
Okay, there was some confusion on my part about WHICH "getWindow" you meant.  
The only "getWindow" documented in the Sun Java API is related to WindowEvent 
objects -- that is the "getWindow" I thought you meant, and (as I said) THAT 
"getWindow" is never called.

The "getWindow" shown in your trace is associated with Netscape's JSObject API 
-- in other words, the LiveConnect API.  Indeed, the applet DOES call 
"JSObject.getWindow", and that call is essential to the applet's operation.  The 
applet makes EXTENSIVE use of LiveConnect.

It might be possible, but with GREAT difficulty, to redesign the applet to do 
its LiveConnect initialization in the "start" method rather than the "init" 
method.  However, I no longer have this option.  This applet, and numerous ones 
similar to it, were developed several years ago for my former employer, from 
whom I retired in 1999.  I no longer have access to their source code or the 
ability to make changes to their products.

Please note that this problem is a REGRESSION -- it worked fine in all Java 
releases through and including 1.4.0.  It fails only in JRE 1.4.1, and then only 
under the Mozilla browser (it works in Microsoft Internet Explorer with JRE 
1.4.1).

Comment 9

16 years ago
This bug is filed in Sun's bugtraq #4856057
Status: NEW → ASSIGNED
(Reporter)

Comment 10

16 years ago
The title of this bug should be changed to "JRE 1.4.1 hangs browser when loading 
LiveConnect applet", as I now realize the true nature of the problem.  The 
applet's size, and being a signed applet, apparently had nothing to do with it 
-- these were "red herrings".

I do apologize for not doing better "problem isolation".  Indeed, before 
retiring I spent 30 years as a software engineer for major software vendors in 
Silicon valley, and I very well know how important it is for the tester to 
correctly identify the test conditions that are truly relevant (in this case, 
LiveConnect) and to NOT specify test conditions that are irrelevant ("red 
herrings").

Now that the true cause of the bug is known, I feel obligated to point out that 
the problem probably impacts practically every LiveConnect applet ever written.

Comment 11

16 years ago
adt: nsbeta1+/adt2
Keywords: nsbeta1 → nsbeta1+
Whiteboard: Java1 → [adt2] Java1

Updated

16 years ago
Flags: blocking1.4+
Summary: JRE 1.4.1 hangs browser when loading larger signed applet → JRE 1.4.1 hangs browser when loading LiveConnect applet

Comment 12

16 years ago
this bug also happen on IE + JRE 1.4.2-beta-b19
so it should be JRE/JPI 's bug.

unblock 1.4.
Flags: blocking1.4+

Comment 13

16 years ago
We have fixed it in JRE 1.5 release. The Sun internal bugtraq bug no is 4821301.
Assignee: joshua.xia → Xiaobin.Lu
Status: ASSIGNED → NEW

Updated

16 years ago
Status: NEW → ASSIGNED
(Assignee)

Updated

15 years ago
Assignee: Xiaobin.Lu → kyle.yuan
Status: ASSIGNED → NEW
Whiteboard: [adt2] Java1 → [adt2] Java1, fixed_in_tiger
(Assignee)

Comment 14

15 years ago
not a mozilla bug. fixed in jre 1.5.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → WORKSFORME

Updated

8 years ago
Component: Java: OJI → Java: OJI
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.