Closed Bug 184061 Opened 23 years ago Closed 23 years ago

Browser hangs when applet dismisses a modal dialog box (LC thread is blocked)

Categories

(Core Graveyard :: Java: OJI, defect)

x86
Windows 2000
defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: verrelli, Assigned: joshua.xia)

References

()

Details

(Keywords: hang, Whiteboard: confirm, Java1)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 If a javascript call is made to an applet on a page that results in the applet displaying a modal dialog box ... when the dialog box is dismissed, the browser will hang before returning control to the javascript thread. Reproducible: Always Steps to Reproduce: I have included a link to a website the illustrates the problem. Included on the website is all source code for the test applet and the HTML file that illustrate the problem. 1. Create an applet that displays a modal dialog box. 2. In the init routine of the applet, display the dialog box (this will always work). 3. Create a public method that allows javascript to call the applet to display the message box. 4. Create a web page that has both the applet, and a link to the public method. 5. Load the web page Actual Results: 1. The web page loads, the applet initializes and issues the dialog box from the init routine. 2. Closing the dialog box works as expected. 3. Click the link to invoke the public method to diplay the dialog box 4. The applet displays the dialog box and blocks the LiveConnect thread until the dialog box is dismisssed. 5. Close the dialog box 6. The dialog box does not close, the browser no longer responds. Expected Results: With both IE, and Netscape 4.X ... the test case works as expected. The LiveConnect call will block until the dialog box is dismissed, and then the javascript can continue. The complete source for the test applet and a build file is included in the zip file accessible from the website indicated above. This is a majro problem for our development effforts because the blocking of the thread (and the non-release) prevents us from doing any synchronous calls into our worker applets from JavaScript.
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3a) Gecko/20021130 I have confirmed the behavior described.
--> OJI Confirming with Mozilla trunk build 20021204xx on WinNT. Is this related to OJI bug 182917 ? "100% CPU when EventHandler applet calls a JavaScript method" The stack traces I keep getting when I interrupt a debug build on WinNT look like this: USER32! 77e71bf1() USER32! 77e725ad() JPINS32! 6d77be5c() 05232bd3() 05232ed9() 05232ed9() 05232bd3() 05232bd3() 05232ed9() 05232bd3() 05232bd3() 05232bd3() 05232bd3() 05232bd3() 05232bd3() 05232bd3() 05232bd3() 05232bd3() 05232bd3() 05232ed9() 05232bd3() 05232bd3() 05232bd3() 05232bd3() 05232bd3() 05232d2b() 05232bd3() 05232bd3() 05232bd3() 052300ee() JVM! 6d39e5c1() JVM! 6d3d5100() JVM! 6d39e4d5() JVM! 6d39e252() JVM! 6d3b347a() JVM! 6d3f8eb7() JVM! 6d3f8e87() MSVCRT! 78003820() KERNEL32! 77f04ede()
Assignee: rogerl → joshua.xia
Status: UNCONFIRMED → NEW
Component: Live Connect → OJI
Ever confirmed: true
Keywords: hang
QA Contact: pschwartau → petersen
Summary: Live Connect hangs browser when applet dismisses a modal dialog box (LC thread is blocked) → Browser hangs when applet dismisses a modal dialog box (LC thread is blocked)
it is different to bug #182917, The CPU is normal.
verified
Status: NEW → ASSIGNED
Whiteboard: confirm
WFM on Linux(RH8.0) mozilla1.2 JRE1.4.1_01
Xiaobin: Is this relate to Applet/JPI/JRE 's Event Handle? Thanks!
-- verified on latest trunk build on Win2K with JRE1.4.1_02. When used the above test case browser hangs.
Whiteboard: confirm → confirm, Java1
Need some traction on this bug
Keywords: nsbeta1
Actually if you are patient enough, you will see the dialog box pop up. On my 2x1.7GHz Dell Machine, it takes 15 seconds to see the dialog box. Does this case say Java is slow? The answer is "No". The problem is current Mozilla's liveconnect implementation. Mozilla does a agreesive reflection using JNI. And that takes about thousands JNI calls. This is why you think the browser is hung. But actually it is not. It is very busy to collect the applet class info (all the methods/properties it has untils its ancestor "java.lang.Object"). This bug can demonstrate the slowness of current liveconnect implementation.
cc'ing Patrick -
-- verified on latest trunk build on Win2K with JRE1.4.2. Browser does not hang with this verison. what Xiaobin said may be right. I didnot check it again with JRE1.4.1_02. But it very fast with JRE1.4.2 compared with JRE1.4.1_02.
adt: nsbeta1-
Keywords: nsbeta1nsbeta1-
-- verified on latest trunk build on WinXP with JRE1.4.2. Browser does not hang with this verison. Marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
-- 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.