Closed
Bug 70586
Opened 25 years ago
Closed 25 years ago
LiveConnect problems/traps when calling from multiple windows and frames
Categories
(Core Graveyard :: Java: OJI, defect)
Tracking
(Not tracked)
People
(Reporter: toml, Assigned: joe.chou)
References
(
URL
)
Details
Attachments
(2 files)
|
5.81 KB,
application/octet-stream
|
Details | |
|
5.54 KB,
patch
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
BuildID: 0000000000
LiveConnect problems/traps when calling from multiple windows and frames.
I've discovered a new problem in the LiveConnect area. This deals with our IBM
Desktop On Call product, but is reproducible with the test case attached. It
turns out that the mapping of a JSJavaThreadState structure is based upon the
JNI environment supplied. If you have multiple windows with multiple applets
each doing some LiveConnect processing, you run into a problem of using the
same JSJavaThreadState structure for multiple applets. This is because the
spontaneous event received on the Plugin side uses the same JNI environment
(the one created during JVM startup) for any spontaneous request. The testcase
demonstrates that at some point jsj_EnterJava is called for a
JSContext/JSJavaThreadState combination that increments the recusion_depth.
Then jsj_EnterJava is called for a different JSContext but the same
JSJavaThreadState. Since the recursion_depth is greater than zero, then the
JSContext must match the value saved in JSJavaThreadState. This, however, is
not the case. Using the debug version of Mozilla and Java you will hit an
assertion at this point.
Would a JNI environment for each instance of an applet solve this problem? If
so, some re-design/re-architecting is required.
Reproducible: Always
Steps to Reproduce:
1. Load the file TMain.html from the attached testcase.
2. Press the "Launch TNext Window" button.
3. After the new window loads, press the "Close Window" button in the right
frame.
Actual Results: In a debug build an assertion occurs.
In a retail build Java exceptions occur and Mozilla crashes or hangs.
Expected Results: The window should close without any errors.
| Reporter | ||
Comment 1•25 years ago
|
||
Comment 2•25 years ago
|
||
Reassigning to OJI component - cc'ing Patrick -
Assignee: rogerl → edburns
URL: - testcase supplied - → - testcase supplied -
Component: Live Connect → OJI
QA Contact: pschwartau → shrir
I tried the test case and here were the results:
-With out the patch of 63466, there were exceptions logged into the Java console
repeatly, and the browser was sort of hung.
-With the patch, the second window seemed closed, bug when tried to relaunch it
again, the browser crashed with the following stack:
t@1 (l@6) signal BUS (invalid address alignment) in JavaPluginInstance5::GetPeer
at line 309 in file "JavaPluginInstance5.cpp"
(dbx) where
=>[1] JavaPluginInstance5::GetPeer(this = 0xacb278, resultingPeer = 0xffbed840),
line 309 in "JavaPluginInstance5.cpp"
[2] map_jsj_thread_to_js_context_impl(jsj_env = (nil), java_applet_obj =
0xacb27c, env = 0x399678, errp = 0xffbeddb4), line 137 in "lcglue.cpp"
[3] enter_js_from_java_impl(jEnv = 0x399678, errp = 0xffbeddb4,
pNSIPrincipaArray = (nil), numPrincipals = 0, pNSISecurityContext = 0xb11a50,
java_applet_obj = 0xacb27c), line 420 in "lcglue.cpp"
[4] jsj_enter_js(jEnv = 0x399678, applet_obj = 0xacb27c, java_wrapper_obj =
(nil), cxp = 0xffbede64, js_objp = (nil), old_error_reporterp = 0xffbede54,
pNSIPrincipaArray = (nil), numPrincipals = 0, pNSISecurityContext = 0xb11a50),
line 705 in "jsj_JSObject.c"
[5] nsCLiveconnect::Eval(this = 0x822e98, jEnv = 0x399678, obj = 8811352,
script = 0xa8b410, length = 17, principalsArray = (nil), numPrincipals = 0,
securitySupports = 0xb11a50, pjobj = 0xffbedef8), line 510 in
"nsCLiveconnect.cpp"
[6] JSObjectEval(service_provider = 0x2bf5a8, unused_env = 0x39a3a0,
pLiveConnect = 0x822e98, nativeJSObject = 8811352, url = 0xb75058
"http://javaweb.eng", str = 0xa8b410, len = 17, ctx = 0x1), line 2970 in
"remotejni.cpp"
[7] JSHandler(env = 0x39a3a0), line 3244 in "remotejni.cpp"
[8] JavaVM5::ProcessSpontaneousQueue(this = 0x394988), line 837 in
"JavaVM5.cpp"
[9] gdk_spont_event_handler(data = 0x394988, source = 28, _ARG3 =
GDK_INPUT_READ), line 115 in "JavaVM5.cpp"
[10] gdk_io_invoke(source = 0x3e2920, condition = G_IO_IN, data = 0x3e2908),
line 882 in "gdkevents.c"
[11] g_io_unix_dispatch(source_data = 0x3e23a0, current_time = 0xffbee378,
user_data = 0x3e2908), line 137 in "giounix.c"
[12] g_main_dispatch(current_time = 0xffbee378), line 658 in "gmain.c"
[13] g_main_iterate(block = 1, dispatch = 1), line 874 in "gmain.c"
[14] g_main_run(loop = 0x2982b8), line 932 in "gmain.c"
[15] gtk_main(), line 476 in "gtkmain.c"
[16] nsAppShell::Run(this = 0x250e80), line 335 in "nsAppShell.cpp"
[17] nsAppShellService::Run(this = 0x227538), line 407 in
"nsAppShellService.cpp"
[18] main1(argc = 3, argv = 0xffbee944, nativeApp = (nil)), line 990 in
"nsAppRunner.cpp"
[19] main(argc = 3, argv = 0xffbee944), line 1171 in "nsAppRunner.cpp"
Comment 5•25 years ago
|
||
Comment 6•25 years ago
|
||
I provided another testcase for ease of investigation. Please refer bug 70889
for testcase details.
This bug actually is a duplicate of 70588. When 70588 is fixed, this problem
should go away.
*** This bug has been marked as a duplicate of 70588 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Comment 8•25 years ago
|
||
SPAM: reassigning OJI bugs to new QA, pmac. (227 bugs)
QA Contact: shrir → pmac
You need to log in
before you can comment on or make changes to this bug.
Description
•