

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
6 messages in org.mozilla.lists.dev-tech-js-engine-rhinoIllegalArgumentException: out of rang...| From | Sent On | Attachments |
|---|---|---|
| William Strathearn | Nov 20, 2007 11:38 pm | |
| William Strathearn | Nov 20, 2007 11:57 pm | |
| Norris Boyd | Nov 21, 2007 6:05 am | |
| William Strathearn | Nov 21, 2007 9:31 am | |
| William Strathearn | Nov 21, 2007 4:53 pm | |
| Attila Szegedi | Nov 22, 2007 12:31 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | IllegalArgumentException: out of range index in 1_6R6 not 1_7R1 | Actions... |
|---|---|---|
| From: | William Strathearn (bill...@gmail.com) | |
| Date: | Nov 20, 2007 11:38:25 pm | |
| List: | org.mozilla.lists.dev-tech-js-engine-rhino | |
I have 1.5MB of JavaScript that runs just fine in Rhino's compiled loading mode. When I minimize the JavaScript using something like Dojo's ShrinkSafe, then give the shrunken script to Rhino 1.6r6, it throws a " Exception in thread "main" java.lang.IllegalArgumentException?: out of range index" exception. The full-size script that has not been minimized has no problems. I know this is a problem with the minimizer I'm using, but I don't know how to go about tracking down the precise region of JavaScript causing the problem.
The stack trace looks exactly like the one listed here: http://trac.dojotoolkit.org/ticket/2896. Line for line it's the same. In that bug report, the problem was listed as being the size of the script. However since Rhino handles the JS file that is twice as large as the one that is not shrunken, I'm guessing that size is not as important as content in this case.
$ java -jar js-1_6R6pre.jar my-full-sized.js # yay! no exceptions
$ java -jar js-1_7R1pre.jar my-shrunken.js # yay! no exceptions
$ java -jar js-1_6R6pre.jar my-shrunken.js
Exception in thread "main" java.lang.IllegalArgumentException: out of
range index
at
org.mozilla.classfile.ClassFileWriter.add(ClassFileWriter.java:542)
at
org.mozilla.classfile.ClassFileWriter.addLoadConstant(ClassFileWriter.java:
602)
at
org.mozilla.classfile.ClassFileWriter.addPush(ClassFileWriter.java:
838)
at
org.mozilla.javascript.optimizer.Codegen.generateNativeFunctionOverrides(Codegen.java:
851)
at
org.mozilla.javascript.optimizer.Codegen.generateCode(Codegen.java:
276)
at
org.mozilla.javascript.optimizer.Codegen.compileToClassFile(Codegen.java:
161)
at
org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java:71)
at org.mozilla.javascript.Context.compileImpl(Context.java:
2349)
at org.mozilla.javascript.Context.compileString(Context.java:
1354)
at org.mozilla.javascript.Context.compileString(Context.java:
1343)
at
org.mozilla.javascript.tools.shell.Main.loadScriptFromSource(Main.java:
455)
at
org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:
443)
at
org.mozilla.javascript.tools.shell.Main.processFile(Main.java:412)
at
org.mozilla.javascript.tools.shell.Main.processSource(Main.java:403)
at
org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:179)
at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:
100)
at org.mozilla.javascript.Context.call(Context.java:583)
at
org.mozilla.javascript.ContextFactory.call(ContextFactory.java:506)
at org.mozilla.javascript.tools.shell.Main.exec(Main.java:162)
at org.mozilla.javascript.tools.shell.Main.main(Main.java:140)







