czyzby / gdx-lml

:octocat: LibGDX utility libraries.
Apache License 2.0
159 stars 25 forks source link

[LmlVis] Listview lml tag causes NPE #44

Closed metaphore closed 8 years ago

metaphore commented 8 years ago

1.8.1.9.4-SNAPSHOT

Simple LML template like this

<?xml version="1.0"?>
<!DOCTYPE vistable SYSTEM "../../lml.dtd">
<vistable>
    <listview/>
</vistable>

Produces exception:

Caused by: java.lang.NullPointerException
    at com.github.czyzby.lml.vis.parser.impl.tag.ListViewLmlTag.getManagedObject(ListViewLmlTag.java:65)
    at com.github.czyzby.lml.parser.impl.tag.AbstractActorLmlTag.processTagAttributes(AbstractActorLmlTag.java:124)
    at com.github.czyzby.lml.parser.impl.tag.AbstractActorLmlTag.prepareActor(AbstractActorLmlTag.java:49)
    at com.github.czyzby.lml.parser.impl.tag.AbstractActorLmlTag.<init>(AbstractActorLmlTag.java:29)
    at com.github.czyzby.lml.parser.impl.tag.actor.TableLmlTag.<init>(TableLmlTag.java:17)
    at com.github.czyzby.lml.vis.parser.impl.tag.ListViewLmlTag.<init>(ListViewLmlTag.java:45)
    at com.github.czyzby.lml.vis.parser.impl.tag.provider.ListViewLmlTagProvider.create(ListViewLmlTagProvider.java:14)
    at com.github.czyzby.lml.parser.impl.DefaultLmlParser.processRegularTag(DefaultLmlParser.java:525)
    at com.github.czyzby.lml.parser.impl.DefaultLmlParser.processTagEntity(DefaultLmlParser.java:333)
    at com.github.czyzby.lml.parser.impl.DefaultLmlParser.processTag(DefaultLmlParser.java:308)
    at com.github.czyzby.lml.parser.impl.DefaultLmlParser.parse(DefaultLmlParser.java:139)
    at com.github.czyzby.lml.parser.impl.DefaultLmlParser.parseTemplate(DefaultLmlParser.java:100)
    ... 4 more
czyzby commented 8 years ago

Yup, already on it. I messed up AbstractActorLmlTag in order to allow more flexible attributes parsing, a few actors might currently throw NPE. (Note that this issue affects only snapshot release.)

metaphore commented 8 years ago

Besides, no other problems are spotted in current snapshot. Just curious, how soon new snapshot version gets available after commit?

czyzby commented 8 years ago

A few minutes.

czyzby commented 8 years ago

The new snapshot should already be available.

czyzby commented 8 years ago

I'll probably publish 1.8, there's an issue with HighlightTextArea in gdx-lml-vis-tests that I want to resolve first.

highlighter

czyzby commented 8 years ago

@metaphore Done. I implemented pretty much everything I planned for 1.8. The latest snapshots should be already available. After I'm done with some issues in the example projects (there's a minor bug with HighlightTextArea in VisUI 1.2.3), I'll release the final version. I appreciate your testing.