« Return to Thread: NullPointerException in FourColorTree using UniqueList

NullPointerException in FourColorTree using UniqueList

by ernieyu :: Rate this Message:

Reply to Author | View in Thread

Hi,

We sometimes get an NPE in FourColorTree from within UniqueList.  We are using version 1.7.0.

java.lang.NullPointerException
    at ca.odell.glazedlists.impl.adt.barcode2.FourColorTree.convertIndexColor(FourColorTree.java:875)
    at ca.odell.glazedlists.event.Tree4Deltas.update(Tree4Deltas.java:73)
    at ca.odell.glazedlists.event.ListEventAssembler$Tree4DeltasAssembler.addChange(ListEventAssembler.java:545)
    at ca.odell.glazedlists.event.ListEventAssembler.addChange(ListEventAssembler.java:150)
    at ca.odell.glazedlists.event.ListEventAssembler.addChange(ListEventAssembler.java:156)
    at ca.odell.glazedlists.event.ListEventAssembler.addUpdate(ListEventAssembler.java:174)
    at ca.odell.glazedlists.UniqueList$GrouperClient.groupChanged(UniqueList.java:108)
    at ca.odell.glazedlists.impl.Grouper.listChanged(Grouper.java:190)
    at ca.odell.glazedlists.UniqueList.listChanged(UniqueList.java:209)
    at ca.odell.glazedlists.event.ListEventAssembler$ListSequencePublisherAdapter$ListEventFormat.fire(ListEventAssembler.java:869)
    at ca.odell.glazedlists.event.ListEventAssembler$ListSequencePublisherAdapter$ListEventFormat.fire(ListEventAssembler.java:861)
    at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:435)
    at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:334)
    at ca.odell.glazedlists.event.ListEventAssembler$ListSequencePublisherAdapter.fireEvent(ListEventAssembler.java:855)
    at ca.odell.glazedlists.event.ListEventAssembler$AssemblerHelper.commitEvent(ListEventAssembler.java:389)
    at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:226)
    at ca.odell.glazedlists.BasicEventList.add(BasicEventList.java:125)
    at ca.odell.glazedlists.impl.ThreadSafeList.add(ThreadSafeList.java:178)

It is difficult to reproduce, but we think it occurs when a new element is added to the unique list. All events should be occuring on the Swing EDT.  Our complete list chain is long, and we feed list selection back into the chain at FilterList1:

ThreadSafeList -> GroupingList -> FunctionList -> ObservableList -> FilterList1 -> FunctionList -> FilterList2 -> UniqueList -> SortedList -> EventSelectionModel -> Matcher -> MatcherEditor -> FilterList1

I'm thinking about writing my own code to replace the UniqueList piece.

Any suggestions would be appreciated.

Regards,
Ernie Yu

 « Return to Thread: NullPointerException in FourColorTree using UniqueList