Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throws CodeGenerator NPE where I expected a JS ReferenceError #110

Open
oberhamsi opened this issue Feb 26, 2013 · 1 comment
Open

throws CodeGenerator NPE where I expected a JS ReferenceError #110

oberhamsi opened this issue Feb 26, 2013 · 1 comment
Labels
bug Issues considered a bug Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec Java Exception Leaking Issues related to Java Exceptions leaking into JavaScript

Comments

@oberhamsi
Copy link

I'm running current git master. This is the simplest testcase I could find:

[foo.bar.id] = true

(I noticed that when I remove the last property access - [foo.bar] = true - I get a ReferenceError as expected)

~/rhino$ java -jar build/rhino1_7R5pre/js.jar -opt -1
Rhino 1.7 release 5 PRERELEASE 2013 02 26
js> [foo.bar.id] = true;
Exception in thread "main" java.lang.NullPointerException
at org.mozilla.javascript.CodeGenerator.visitExpression(CodeGenerator.java:497)
at org.mozilla.javascript.CodeGenerator.visitExpression(CodeGenerator.java:632)
at org.mozilla.javascript.CodeGenerator.visitExpression(CodeGenerator.java:704)
at org.mozilla.javascript.CodeGenerator.visitExpression(CodeGenerator.java:527)
at org.mozilla.javascript.CodeGenerator.visitExpression(CodeGenerator.java:959)
at org.mozilla.javascript.CodeGenerator.visitExpression(CodeGenerator.java:527)
at org.mozilla.javascript.CodeGenerator.visitExpression(CodeGenerator.java:959)
at org.mozilla.javascript.CodeGenerator.visitStatement(CodeGenerator.java:383)
at org.mozilla.javascript.CodeGenerator.visitStatement(CodeGenerator.java:276)
at org.mozilla.javascript.CodeGenerator.generateICodeFromTree(CodeGenerator.java:113)
at org.mozilla.javascript.CodeGenerator.compile(CodeGenerator.java:83)
at org.mozilla.javascript.Interpreter.compile(Interpreter.java:194)
at org.mozilla.javascript.Context.compileImpl(Context.java:2377)
at org.mozilla.javascript.Context.compileString(Context.java:1335)
at org.mozilla.javascript.Context.compileString(Context.java:1324)
at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:491)
at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:176)
at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:100)
at org.mozilla.javascript.Context.call(Context.java:489)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:504)
at org.mozilla.javascript.tools.shell.Main.exec(Main.java:158)
at org.mozilla.javascript.tools.shell.Main.main(Main.java:136)
@p-bakker
Copy link
Collaborator

p-bakker commented Jul 5, 2021

Due to Cannot invoke "org.mozilla.javascript.Node.getType()" because "node" is null

Still happens on master

@p-bakker p-bakker added bug Issues considered a bug Java Exception Leaking Issues related to Java Exceptions leaking into JavaScript labels Jul 5, 2021
@p-bakker p-bakker added the Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec label Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues considered a bug Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec Java Exception Leaking Issues related to Java Exceptions leaking into JavaScript
Projects
None yet
Development

No branches or pull requests

2 participants