NullPointerException at YetiTypeAttr$DecodeType.read when loading module

12 views
Skip to first unread message

chrisichris

unread,
Mar 9, 2012, 4:01:49 AM3/9/12
to yeti-lang
Hi,

I get the following exception when loading mongo module (
https://github.com/chrisichris/yeb/blob/master/src/org/yeb/mongo.yeti
) from the repl:

Yeti 0.9.4+ REPL.

> load org.yeb.mongo
java.lang.NullPointerException
at yeti.lang.compiler.YetiTypeAttr
$DecodeType.read(YetiTypeAttr.java:281)
at yeti.lang.compiler.YetiTypeAttr
$DecodeType.readMap(YetiTypeAttr.java:20
(... full stacktrace at end of post)

To reproduce it:

1.) clone yeb from github
git clone git://github.com/chrisichris/yeb.git

2.) $cd yeb

3.) in the yeb dir:
$java -jar ybuilder.jar clean, compile // to compile yeb
$java -jar ybuilder.jar -yeti // to start the repl with all
dependencies

>load org.yeb.mongo //throws exception

Sorry for this lengthy procedure but I can not reproduce it otherwise.

Chris

---Full stacktrace:
> load org.yeb.mongo
java.lang.NullPointerException
at yeti.lang.compiler.YetiTypeAttr
$DecodeType.read(YetiTypeAttr.java:281)
at yeti.lang.compiler.YetiTypeAttr
$DecodeType.readMap(YetiTypeAttr.java:20
at yeti.lang.compiler.YetiTypeAttr
$DecodeType.read(YetiTypeAttr.java:270)
at yeti.lang.compiler.YetiTypeAttr
$DecodeType.readArray(YetiTypeAttr.java:
at yeti.lang.compiler.YetiTypeAttr
$DecodeType.read(YetiTypeAttr.java:268)
at yeti.lang.compiler.YetiTypeAttr
$DecodeType.read(YetiTypeAttr.java:265)
at yeti.lang.compiler.YetiTypeAttr
$DecodeType.readMap(YetiTypeAttr.java:20
at yeti.lang.compiler.YetiTypeAttr
$DecodeType.read(YetiTypeAttr.java:270)
at yeti.lang.compiler.YetiTypeAttr.read(YetiTypeAttr.java:329)
at yeti.renamed.asm3.ClassReader.a(Unknown Source)
at yeti.renamed.asm3.ClassReader.accept(Unknown Source)
at
yeti.lang.compiler.YetiTypeVisitor.readType(YetiTypeAttr.java:435)
at
yeti.lang.compiler.YetiTypeVisitor.getType(YetiTypeAttr.java:465)
at yeti.lang.compiler.YetiAnalyzer.analyze(YetiAnalyzer.java:
127)
at yeti.lang.compiler.YetiAnalyzer.toCode(YetiAnalyzer.java:
1656)
at yeti.lang.compiler.CompileCtx.compile(YetiCode.java:355)
at yeti.lang.compiler.eval$evaluateYetiCode$._1(eval.yeti:337)
at yeti.lang.compiler.eval$evaluateYetiCode$._0(eval.yeti)
at yeti.lang.compiler.eval$evaluateYetiCode$.apply(eval.yeti:
331)
at yeti.lang.Fun2_.apply(Unknown Source)
at yeti.lang.compiler.yeti.repl(yeti.yeti:58)
at yeti.lang.compiler.yeti.main(yeti.yeti:212)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at ybuilder.core.run$evaluate$.apply(ybuilder/core/run.yeti:
61)
at ybuilder.core.run._1(ybuilder/core/run.yeti:28)
at ybuilder.core.run.withCl(ybuilder/core/run.yeti:27)
at ybuilder.core.run$evaluate.apply(ybuilder/core/run.yeti:59)
at ybuilder.core.run.eval(ybuilder/core/run.yeti:129)
at project.main(project.yeti:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at yeti.lang.compiler.eval._1(eval.yeti:89)
at yeti.lang.compiler.eval.execClass(eval.yeti:63)
at yeti.lang.compiler.eval$compileYetiFiles$.apply(eval.yeti:
266)
at yeti.lang.compiler.yeti._3(yeti.yeti:227)
at yeti.lang.compiler.yeti.main(yeti.yeti:220)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at ybuilder.core.ybuilder._3(ybuilder/core/ybuilder.yeti:187)
at ybuilder.core.ybuilder.main(ybuilder/core/ybuilder.yeti:183)

chrisichris

unread,
Mar 16, 2012, 9:57:18 AM3/16/12
to yeti...@googlegroups.com
BTW this "bug" was no bug it was due to I having an empty struct {} and thanks to Madis the compiler checks now for that.

Christian
Reply all
Reply to author
Forward
0 new messages