Bug Item manager duplicating items (visual bug?)

oztrich

Member
Hi,

I've noticed over the past week or so that the item manager has started getting into an odd state where it will report duplicate lines, such as this:

1647782042932.png

I'm using r26303 at the moment. As session refresh seems to fix it, but it will reoccur. I haven't seen any obvious trigger for the behaviour.

Thanks.
 

Veracity

Developer
Staff member
That is displaying the "usables" list from ConcoctionsDatabase. I've seen it a handful of times in the last 10 years.
Nothing has changed in how we populate that list in a long time.

It's not a "visual bug" which shows the same item multiple times. Somehow, the same item is on the list multiple times.
I never saw how that could happen, previous times I looked.
I'll take another look.
 

Veracity

Developer
Staff member
Well, I suppose it could be a Swing bug. Somehow. But I prefer to assume bugs are in our code, rather than point figures at the implementation.

Our code has two Maps:
itemId -> Concoction (for items)
name -> Concoction (for non-items)

usableList is made by taking all of the Concoctions from each of those Maps and adding them to a list.
Not very efficiently, it looks like, but other than registering newly discovered items, that list is never changed.

I'll poke some more, and perhaps I'll improve how we generate the list, but without a way to reproduce the issue, this will be difficult.
 
Top