Closed
Bug 184111
Opened 22 years ago
Closed 22 years ago
ArrayOutOfBounds Exception thrown when using Rhino Javascript Debugger
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
1.5R4
People
(Reporter: crafterm, Assigned: norrisboyd)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021204 Debian/1.2.1-1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021204 Debian/1.2.1-1
Note, this bug report relates to the Rhino version by Christopher Oliver that
supports Continuations available from
ftp://ftp.primaryinterface.com/pub/rhino/rhino1_5R4pre-sharedlocals.zip.
When using the Rhino Javascript debugger under JDK 1.4 an ArrayOutOfBounds
Exception is thrown when returning from a Continuation.
After speaking with Christopher Oliver, the problem seems to be a general JDK
1.4 bug that caches selected values in JComboBox, even after removeAllItems() is
called. Since its a general defect Christopher and I thought we'd report and get
it fixed in the main CVS tree.
Reproducible: Always
Steps to Reproduce:
The javascript code used is available from
http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon/components/flow/javascript/system.js
1. Enter a toplevel javascript method that creates a continuation and suicides()
2. Continue the contination with the debugger calling 'step-into', inside of the
handleContinuation() method.
3. Press 'step-into' again 2 times.
Actual Results:
First an ArrayOutOfBoundsException was thrown, then a Context related exception
was thrown.
Expected Results:
The debugger should have incremented the display to the next line.
Patch fixing the defect follows:
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/debugge
r/Main.java,v
retrieving revision 1.28
diff -u -r1.28 Main.java
--- toolsrc/org/mozilla/javascript/tools/debugger/Main.java 14 Nov 2002 21:1
2:36 -0000 1.28
+++ toolsrc/org/mozilla/javascript/tools/debugger/Main.java 7 Dec 2002 20:59
:23 -0000
@@ -1699,6 +1699,8 @@
db.context.disableUpdate();
int frameCount = contextData.getFrameCount();
ctx.removeAllItems();
+ ctx.setSelectedItem(null); // workaround for JDK 1.4 bug that caches
+ // selected value even after removeAllItems(
) is called
toolTips.removeAllElements();
for (int i = 0; i < frameCount; i++) {
FrameHelper frame = contextData.getFrame(i);
Comment 1•22 years ago
|
||
cc'ing Igor -
Comment 2•22 years ago
|
||
I commited the patch: see
http://developer.java.sun.com/developer/bugParade/bugs/4712013.html for details
of this JDK 1.4 bug.
Comment 3•22 years ago
|
||
Resolving as FIXED -
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•