We have a number of JavaScriptObject subclasses. As I'm testing out 
2.6.0-rc4, I'm getting an NPE from the compiler. (GWT 2.5.1 works without 
any issue on our code base.) 

I've attached a file with the full error, but here's an excerpt:

Caused by: java.lang.NullPointerException
> at com.google.gwt.dev.js.JsInliner.isFunction(JsInliner.java:1999)
> at com.google.gwt.dev.js.JsInliner.access$300(JsInliner.java:87)
> at 
> com.google.gwt.dev.js.JsInliner$RecursionCollector.endVisit(JsInliner.java:1608)
> at com.google.gwt.dev.js.ast.JsInvocation.traverse(JsInvocation.java:73)
> at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:468)
> ... 23 more
>          [ERROR] at ApplicationJSO.java(100): this.getManifest()
>             com.google.gwt.dev.js.ast.JsInvocation
>          [ERROR] at ApplicationJSO.java(100): return this.getManifest()
>             com.google.gwt.dev.js.ast.JsReturn
>          [ERROR] at ApplicationJSO.java(99): {
>   return this.getManifest();
> }
>             com.google.gwt.dev.js.ast.JsBlock
>          [ERROR] at ApplicationJSO.java(99): function getManifest(){
>   return this.getManifest();
> }
>             com.google.gwt.dev.js.ast.JsFunction
>       [ERROR] Unrecoverable exception, shutting down


The particular class it's failing on has JSNI methods such as:

  @Override
> public final native Manifest getManifest() /*-{
> return this.getManifest();
> }-*/;


All of these JSO classes implements interfaces, which the rest of our 
application uses.

I rebuilt GWT and added a bit of debugging code. What I determined is that 
on line 1999 of JsInliner, the "ref.getName()" is returning null. In that 
same debugging code, I printed out "ref.toSource(true)" which shows this:

> this.getManifest


I also verified that "ref.getIdent()" is *not* null.

I'd be quite happy to add any more debugging statements necessary, apply 
patches, whatever to get this fixed *before* 2.6.0 goes out for real.

FWIW, I've tried building a small sample app to demonstrate the issue, but 
I have not yet been able to narrow it down. My quick attempt worked just 
fine :-(

Thanks,

Jay

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Compiling module com.gindin.foo.bar.Showcase
   Computing all possible rebind results for 
'com.gindin.apps.blega.client.ui.stuff.client.view.a.b.C.D'
      Rebinding com.gindin.apps.blega.client.ui.stuff.client.view.a.b.C.D
         Invoking generator 
com.google.gwt.safehtml.rebind.SafeHtmlTemplatesGenerator
            Constructing interface 
com.gindin.apps.blega.client.ui.stuff.client.view.a.b.C.D
               Generating method body for img()
                  Template with variable in URL attribute context: The template 
code generator will sanitize the URL.  Use SafeUri to specify arguments in a 
URL attribute context that should not be sanitized.
   Compiling 3 permutations
      Compiling permutation 1...
      Process output
         Compiling
            Compiling permutation 2...
      Process output
         Compiling
            Compiling permutation 0...
      [ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
        at 
com.google.gwt.dev.js.ast.JsVisitor.translateException(JsVisitor.java:483)
        at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:470)
        at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:445)
        at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:109)
        at com.google.gwt.dev.js.ast.JsReturn.traverse(JsReturn.java:51)
        at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:468)
        at 
com.google.gwt.dev.js.ast.JsVisitor.doAcceptWithInsertRemove(JsVisitor.java:462)
        at 
com.google.gwt.dev.js.ast.JsVisitor.acceptWithInsertRemove(JsVisitor.java:121)
        at com.google.gwt.dev.js.ast.JsBlock.traverse(JsBlock.java:48)
        at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:468)
        at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:445)
        at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:109)
        at com.google.gwt.dev.js.ast.JsFunction.traverse(JsFunction.java:202)
        at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:468)
        at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:445)
        at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:109)
        at com.google.gwt.dev.js.JsInliner.execImpl(JsInliner.java:1846)
        at com.google.gwt.dev.js.JsInliner.exec(JsInliner.java:1787)
        at 
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.optimizeJs(JavaToJavaScriptCompiler.java:863)
        at 
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:381)
        at 
com.google.gwt.dev.jjs.UnifiedAst.compilePermutation(UnifiedAst.java:137)
        at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:195)
        at 
com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:50)
        at 
com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:73)
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
        at com.google.gwt.dev.js.JsInliner.isFunction(JsInliner.java:1999)
        at com.google.gwt.dev.js.JsInliner.access$300(JsInliner.java:87)
        at 
com.google.gwt.dev.js.JsInliner$RecursionCollector.endVisit(JsInliner.java:1608)
        at com.google.gwt.dev.js.ast.JsInvocation.traverse(JsInvocation.java:73)
        at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:468)
        ... 23 more
         [ERROR] at ApplicationJSO.java(100): this.getManifest()
            com.google.gwt.dev.js.ast.JsInvocation
         [ERROR] at ApplicationJSO.java(100): return this.getManifest()
            com.google.gwt.dev.js.ast.JsReturn
         [ERROR] at ApplicationJSO.java(99): {
  return this.getManifest();
}

            com.google.gwt.dev.js.ast.JsBlock
         [ERROR] at ApplicationJSO.java(99): function getManifest(){
  return this.getManifest();
}

            com.google.gwt.dev.js.ast.JsFunction
      [ERROR] Unrecoverable exception, shutting down
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
        at 
com.google.gwt.dev.javac.CompilationProblemReporter.logAndTranslateException(CompilationProblemReporter.java:90)
        at 
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:551)
        at 
com.google.gwt.dev.jjs.UnifiedAst.compilePermutation(UnifiedAst.java:137)
        at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:195)
        at 
com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:50)
        at 
com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:73)
        at java.lang.Thread.run(Thread.java:744)
      [ERROR] Not all permutation were compiled , completed (0/3)
      [WARN] Lost communication with remote process
java.net.SocketException: Socket closed
        at java.net.SocketInputSocketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:152)
        at java.net.SocketInputStream.read(SocketInputStream.java:122)
        at java.net.SocketInputStream.read(SocketInputStream.java:210)
        at 
java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2293)
        at 
java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2586)
        at 
java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2596)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1318)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
        at 
com.google.gwt.dev.ExternalPermutationWorkerFactory$ExternalPermutationWorker.compile(ExternalPermutationWorkerFactory.java:153)
        at 
com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:73)
        at java.lang.Thread.run(Thread.java:744)
      [WARN] Lost communication with remote process
java.net.SocketException: Socket closed
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:152)
        at java.net.SocketInputStream.read(SocketInputStream.java:122)
        at java.net.SocketInputStream.read(SocketInputStream.java:210)
        at 
java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2293)
        at 
java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2586)
        at 
java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2596)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1318)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
        at 
com.google.gwt.dev.ExternalPermutationWorkerFactory$ExternalPermutationWorker.compile(ExternalPermutationWorkerFactory.java:153)
        at 
com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:73)
        at java.lang.Thread.run(Thread.java:744)
:apps:foo:bar:client:gwtCompile FAILED

Reply via email to