Open catbref opened 6 years ago
There are several similar errors but looks like the common root is BlocksTableModel.java line 76:
Block block = blocks.get(row).getB();
where block
is assigned null.
Both blocks.get(row)
and then .getB()
don't throw so there is an entry in blocks
at index row
but why is it null?
Just tried to reproduce this bug but wasn't able to. Is there any more information about the use case that leads to this exception?
I didn't follow every single control path yet and I'm not sure if this can even occur, so please bear with me, given my limited understanding of the code. Anyhow, I guess it might be a threading problem:
As far as I saw, SortableList is not thread safe (or I didn't grasp the concept :) ).
A list of this type is returned from BlocksTableModel.getSortableList() and sorted in QoraRowSorter (l.45):
this.model.getSortableList().sort(this.indexes.get(column), order.equals(SortOrder.DESCENDING));
If another thread calls BlocksTableModel.getValueAt(..) at the same time the list is sorted, this could lead to almost any result, including a null value.
A similar problem could be the cause for issue #70.
Possible or complete nonsense?
Note that the DBMap frame may/may not be relevant!