Closed Bug 34746 Opened 24 years ago Closed 22 years ago

[4va applet that uses LiveConnect.xP] Browser hangs loading Java applet that uses LiveConnect

Categories

(Core Graveyard :: Java: OJI, defect, P3)

x86
Windows 98
defect

Tracking

(Not tracked)

VERIFIED WORKSFORME
mozilla1.0

People

(Reporter: wmccain, Assigned: joe.chou)

References

()

Details

(Whiteboard: [nsbeta2-][nsbeta3-])

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; N; Win98; en-US; m14) Netscape6/6.0b1
BuildID:    2000033112

Netscape 6 Preview Release 1 hangs loading a Java applet that uses LiveConnect.
This works perfectly in current releases of Netscape Communicator AND Microsoft
Internet Explorer!  As best as I can tell, Netscape 6 Preview Release 1 simply
does not support Web pages that use LiveConnect to communicate between
JavaScript and a Java applet.  Or else the LiveConnect support is badly "broken".


Reproducible: Always
Steps to Reproduce:
1. Load the reference URL
(http://www.novell.com/products/host/infopub/demos/kbdemo.html).
2. [There is no step 2 -- because it HANGS.]


Actual Results:  The Web page hangs.


Expected Results:  The Java applet should load and display a small square with a
blue border (just in front of the "Insert mode" legend).  This Java applet, in
collaboration with JavaScript code, "takes over" the processing of the keyboard
by the Web page (including both text and function keys).  A simple test to see
if the applet is working is to press the "Insert" key on the keyboard.  This
should cause a "^" symbol to be toggled on and off inside the small square with
a blue border.


See the source for the Web page at the reference URL.  The JavaScript code (in
file "kbdemo.js", i.e. URL
http://www.novell.com/products/host/infopub/demos/kbdemo.js) is a bit complex.
However, the Java applet is quite simple and straightforward.  I can supply the
source code for the Java applet if necessary.

The Java console displays "JAR cache enabled." just before the Web page hangs.
(This is appropriate, as the applet is loaded from file "kb.jar".)  No other
messages are displayed in the Java console.

The Java applet is UNSIGNED.
Summary: Netscape 6 Preview Release 1 hangs loading Java applet that uses LiveConnect → [4.xP] Browser hangs loading Java applet that uses LiveConnect
In response to a number of requests, I have downloaded the most recent milestone
build of mozilla and have re-verified this bug there. Build ID: 2000022820.

This bug does exist in the mozilla milestone build, and it operates (and
isolates) exactly as I previously reported.
Should I assign this to Jeff?  He's our LiveConnect guy on the OJI side.
I've tried to verify the existence of this bug with the correct build, but the 
applet never loads.  It doesn't hang either.

When I open the "Java Console" I see the following messages:

JAR cache enabled.

Read the Cache option Tag...:null

Cache Option NOT specified.

Reverting to default Browser Cache..

Read the Cache Archive tag ...:null

Cache Archive Tag Not specified.

Ignore the Cache option if specified..

Read the Cache Version tag ...:null

Cache Version Tag Not specified.

Ignore the Cache version if specified..

Trying to get an instance of Class : 
sun.plugin.cachescheme.BrowserCacheURLConnection

Opening http://www.novell.com/products/host/infopub/demos/kb.jar proxy=webcache-
cup.eng.sun.com:8080

Debug build from 4/10 - Java console simply says 'JAR cache enabled', the JS 
code executes and calls into the plug-in to wrap some JS objects, never to 
return as far as I can see. --> OJI
Assignee: rogerl → drapeau
Status: UNCONFIRMED → NEW
Component: Live Connect → OJI
Ever confirmed: true
QA Contact: rginda → paw
Re-assigning to Jeff Dyer, who has been getting LiveConnect support working on
the OJI side again.  Jeff, after M16, can you take a look at this?
Assignee: drapeau → jeff.dyer
Target Milestone: --- → M18
Status: NEW → ASSIGNED
Marking crash. Java broken-->nsbeta2. Java on b2 list. 
Keywords: crash, nsbeta2
Putting on [nsbeta2+] radar for beta2 fix. 
Whiteboard: [nsbeta2+]
Using NON-debug 23 May 2000 mozilla build and 23 May Java Plugin build, this no 
longer crashes.  When I press any of the buttons, for example PA1, A dialog 
comes up that says: "Would send PA1 to server if this were not a demo."   I 
assume this is correct behavior and am closing this bug.  Please reopen if 
necessary.

Yes, that is correct behavior.  Even better: the appearance of the pop-up dialog 
instead of "Information Alert/Status : 502 Bad Gateway/Description : Origin 
server is returning status code 500" would seem to imply that Bug 34740 has ALSO 
been fixed in this build!

If the Java applet is working correctly, you should also get the same pop-ups 
from pressing the function keys on the keyboard as from clicking the on-screen 
buttons.  For example, pessing F1 on the keyboard should produce a dialog that 
says: "Would send PF1 to server if this were not a demo."

Pressing the Insert key on the keyboard should toggle the applet's on-screen 
indicator (looks like a "^" in a small box).

I will test these conjectures myself if the Mozilla and Java builds that you 
referenced are available externally.  Please advise.
Please stay tuned to the http://www.mozilla.org/oji/ page for info on the next
released OJI plugin.  Unfortunately, I think you'll have to wait to PR2.
The URL that was originally reported for this bug does not exist anymore.  Here 
is a valid URL, from my own Web site:

http://www.hostpublisher.com/demos/kbdemo.html
Per today's PDT, moving from [nsbeta2+] to [nsbeta2-]
Summary: [4.xP] Browser hangs loading Java applet that uses LiveConnect → [4va applet that uses LiveConnect.xP] Browser hangs loading Java applet that uses LiveConnect
Whiteboard: [nsbeta2+] → [nsbeta2-]
Removing crash keyword per edburns's comment. Nominating nsbeta3 in correctness
category. Marking 4xp.
Keywords: crash4xp, correctness, nsbeta3
Forwarding to stanley to look at getting key mappings working as described in 
the comment by W. McCain: "If the Java applet is working correctly, you should 
also get the same pop-ups from pressing the function keys on the keyboard as 
from clicking the on-screen buttons.  For example, pessing F1 on the keyboard 
should produce a dialog that says: "Would send PF1 to server if this were not a 
demo."
Assignee: jeff.dyer → stanley.ho
Status: ASSIGNED → NEW
This applet did not freeze/hang while loading using today's build 
(2000081508m18).
The browser doesn't hang, until you press back, due to bug 50547.
Per Stanley's request, pushing back to FUTURE.
Target Milestone: M18 → Future
Status: NEW → ASSIGNED
marking nsbeta3- per last comment
Whiteboard: [nsbeta2-] → [nsbeta2-][nsbeta3-]
Tried this with mozilla build 09/22 (around PR3 branch time) wiht new PR3 Jre
bits (09/22).

It hangs on NT.
But as inidicated by Ed, bug 50547 does not hang on pressing the back button.
looks like 50547 is fixed but not this.
Keywords: nsenterprise
QA Contact: paw → pmac
Removing nsenterprise nomination.
Keywords: nsenterprise
Target Milestone: Future → mozilla1.0
The URL that was originally reported for this bug does not exist anymore.  Here 
is a current valid URL, from my own Web site:

http://www.metaconnect.com/hostpublisher/demos/kbdemo.html
I finally got to the bottom of this "bug".  It turned out to be a timing 
difference in the Gecko browser compared to Netscape Navigator and Microsoft 
Internet Explorer.  Specifically, my Web page was hanging during the loading of 
a "LiveConnect" Java applet because the Gecko browser executes the JavaScript 
"onLoad" routine in the <body> tag BEFORE the applet has loaded -- but the 
"onLoad" routine calls some applet methods, hence the hang.  (Older browsers 
apparently load the applet FIRST, but this behavior is "not specified".)

I was able to circumvent the problem two ways:

(1) By moving the JavaScript initialization code to a new routine that the 
"onLoad" routine calls on a delayed basis.

(2) By eliminating the "onLoad" routine but having the Java applet call the same 
JavaScript initialization code during its own initialization, after it has been 
loaded.

[In addition, I discovered that I had to "code around" a difference in the way 
the Java 2 Plug-in presents JavaScript numeric variables to Java applets.  Both 
Netscape Navigator and Microsoft Internet Explorer return such values in a 
"Double" wrapper (although Netscape's LiveConnect documentation claims that it 
is "Float").  But the Java 2 Plug-in returns the same variables in an "Integer" 
object.  This inconsistency is being reported to Sun.]

This Bug Report can now be CLOSED.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Chris Petersen is a new QA contact for oji component. His email is:
petersen@netscape.com
Assignee: stanley.ho → petersen
fixing small error for pmac@netscape.com (filter with : SPAMMAILSUCKS)
Assignee: petersen → joe.chou
QA Contact: pmac → petersen
-- After seeing the above comments i believe reporter of the bug doesnot see
this bug now. Marking Verified.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.