Login  Register

Re: Exception occurred while generating glue code

Posted by Sven Gothel on Jan 21, 2014; 1:48pm
URL: https://forum.jogamp.org/Exception-occurred-while-generating-glue-code-tp4031259p4031270.html

On 01/20/2014 10:21 PM, abassili [via jogamp] wrote:
> I have started using gluegen and I'm trying to generate the JNI interface for
> a very simple C header that has one simpe function.
>
> java -jar gluegen.jar -C<config file> <my header file>
>
> But I'm getting the following exception:
>

I glanced at the GlueGen source code .. and it seems that thw 'writer'
instance as set and passed-through via the ctor is 'null'.

Please create a bug report with:
  - detailed description how to reproduce it

  - a little project w/ all data required to reproduce it,
    _please_ make this as small and tiny as possible!

seems like a setup issue, however, we shall not do a NPE.

Thank you!

~Sven

> Exception in thread "main" java.lang.RuntimeException: Exception occurred
> while generating glue code.
>         at com.jogamp.gluegen.GlueGen.run(GlueGen.java:307)
>         at com.jogamp.gluegen.GlueGen.main(GlueGen.java:367)
> Caused by: java.lang.RuntimeException: Error while emitting binding for "foo"
>         at com.jogamp.gluegen.JavaEmitter.emitFunctions(JavaEmitter.java:437)
>         at com.jogamp.gluegen.GlueGen.run(GlueGen.java:300)
>         ... 1 more
> Caused by: java.lang.NullPointerException
>         at
> com.jogamp.gluegen.FunctionEmitter.emitDocComment(FunctionEmitter.java:140)
>         at com.jogamp.gluegen.FunctionEmitter.emit(FunctionEmitter.java:100)
>         at com.jogamp.gluegen.FunctionEmitter.emit(FunctionEmitter.java:111)
>         at com.jogamp.gluegen.JavaEmitter.emitFunctions(JavaEmitter.java:433)
>         ... 2 more
>
> It seems that it can't write the output file even though there is write
> permission to that folder. Any idea why?
>
> Thanks ..
>
> Amgad


signature.asc (911 bytes) Download Attachment