Closed Bug 206658 Opened 23 years ago Closed 23 years ago

Rhino crashes on |this = 1;|

Categories

(Rhino Graveyard :: Core, defect)

x86
Windows NT
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED WORKSFORME

People

(Reporter: pschwartau, Assigned: igor)

References

Details

The crash occurs at all optimization levels. It occurs whether or not we do |seal(this)| first: [ ] java org.mozilla.javascript.tools.shell.Main Rhino 1.5 release 5 0000 00 00 js> this = 1; Exception in thread "main" java.lang.NoSuchMethodError: org.mozilla.javascript.NativeGlobal.constructError( Lorg/mozilla/javascript/Context;Ljava/lang/String; Ljava/lang/String; Ljava/lang/Object; Ljava/lang/String; IILjava/lang/String;) Lorg/mozilla/javascript/EcmaError; org.mozilla.javascript.TokenStream.reportSyntaxError(TokenStream.java:663) org.mozilla.javascript.TokenStream.reportCurrentLineError(TokenStream.java:641) org.mozilla.javascript.IRFactory.createAssignment(IRFactory.java:848) org.mozilla.javascript.IRFactory.createBinary(IRFactory.java:819) org.mozilla.javascript.Parser.assignExpr(Parser.java:927) org.mozilla.javascript.Parser.expr(Parser.java:910) org.mozilla.javascript.Parser.statementHelper(Parser.java:824) org.mozilla.javascript.Parser.statement(Parser.java:417) org.mozilla.javascript.Parser.parse(Parser.java:135) org.mozilla.javascript.Context.compile(Context.java:1897) org.mozilla.javascript.Context.compileReader(Context.java:886) org.mozilla.javascript.Context.evaluateReader(Context.java:803) org.mozilla.javascript.tools.shell.Main.evaluateReader(Main.java:377) org.mozilla.javascript.tools.shell.Main.processSource(Main.java:274) org.mozilla.javascript.tools.shell.Main.exec(Main.java:112) org.mozilla.javascript.tools.shell.Main.main(Main.java:76)
*** Bug 206656 has been marked as a duplicate of this bug. ***
I got the following with the latest tip and Rhino 1.5R4.1: js> this=1; js: "<stdin>", line 11: uncaught JavaScript exception: SyntaxError: Invalid assignment left-hand side. (<stdin>; line 11) js: this=1; js: ......^ The same result holds for this = 1 as well.
Igor: with rhino1_5R4, I'm getting the same exception: [ ] java -jar D:/JS_TRUNK/mozilla/js/rhino/build/rhino1_5R4/js.jar Rhino 1.5 release 4 2003 02 10 js> this = 1; js: "<stdin>", line 1: uncaught JavaScript exception: SyntaxError: Invalid assignment left-hand side. (<stdin>; line 1) js: this = 1; js: ........^ But I'm still getting a crash with the current tip, pulled today: [ ] java -jar D:/JS_TRUNK/mozilla/js/rhino/build/rhino1_5R5pre/js.jar Rhino 1.5 release 5 0000 00 00 js> this = 1; Exception in thread "main" java.lang.NoSuchMethodError: org.mozilla.javascript.NativeGlobal.constructError( Lorg/mozilla/javascript/Context;Ljava/lang/String; Ljava/lang/String; Ljava/lang/Object; Ljava/lang/String; IILjava/lang/String;) Lorg/mozilla/javascript/EcmaError; org.mozilla.javascript.TokenStream.reportSyntaxError(TokenStream.java:663) org.mozilla.javascript.TokenStream.reportCurrentLineError(TokenStream.java:641) org.mozilla.javascript.IRFactory.createAssignment(IRFactory.java:848) org.mozilla.javascript.IRFactory.createBinary(IRFactory.java:819) org.mozilla.javascript.Parser.assignExpr(Parser.java:927) org.mozilla.javascript.Parser.expr(Parser.java:910) org.mozilla.javascript.Parser.statementHelper(Parser.java:824) org.mozilla.javascript.Parser.statement(Parser.java:417) org.mozilla.javascript.Parser.parse(Parser.java:135) org.mozilla.javascript.Context.compile(Context.java:1897) org.mozilla.javascript.Context.compileReader(Context.java:886) org.mozilla.javascript.Context.evaluateReader(Context.java:803) org.mozilla.javascript.tools.shell.Main.evaluateReader(Main.java:377) org.mozilla.javascript.tools.shell.Main.processSource(Main.java:274) org.mozilla.javascript.tools.shell.Main.exec(Main.java:112) org.mozilla.javascript.tools.shell.Main.main(Main.java:76) I'm running on WinNT4.0(SP6) [ ] java -fullversion Java full version "1.4.1-b21"
Phil, I rechecked my builds and with CVS tip or even with ftp://ftp.mozilla.org/pub/js/rhinoLatest.zip everything works as expected producing Rhino 1.5 release 5 0000 00 00 js> this=1; js: "<stdin>", line 1: uncaught JavaScript exception: SyntaxError: Invalid assignment left-hand side. (<stdin>; line 1) js: this=1; js: ......^
Resolving as WORKSFORME. It looks like this was an issue with the ant build process for Rhino. I was finally able to make the bug go away by deleting this directory: mozilla/js/rhino/build/classes and then building. I'm building Rhino on WinNT as follows: [D:/JS_TRUNK/mozilla/js/rhino] ant dist It must be that ant was failing to update one of those classes (?)
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Marking Verified. Just to clarify: I shouldn't have to delete the build/classes directory myself, should I? Isn't ant supposed to take care of everything? Is there a parameter that I need to pass to ant to ensure a "clobber"?
Status: RESOLVED → VERIFIED
Targeting as resolved against 1.5R5
Target Milestone: --- → 1.5R5
You need to log in before you can comment on or make changes to this bug.