enigma icon indicating copy to clipboard operation
enigma copied to clipboard

[Help wanted] Ghost entries and dead space in the class selector

Open IotaBread opened this issue 1 year ago • 1 comments

This is a weird issue we haven't been able to figure out for three weeks. It's seemingly random, though it happens way more frequently on Windows than on Linux (from my testing). On @\ix0rai's machine using Ubuntu (with a VM) it took 15 minutes worth of tries to reproduce the issue, for just a single ghost entry, while on my Windows desktop it's taken anywhere between 5 and 50 tries, and it's way more severe, with more than 5 ghost entries some of the times.

enigma's class selector with a single ghost entry enigma's class selector with dead space at the bottom

Demo video of the issue also affecting scrolling with the wheel:

https://github.com/QuiltMC/enigma/assets/47987888/5859afbc-cf36-4cae-bfdf-6023fe15c364

The issue has been narrowed down to some duplicated entries in VariableHeightLayoutCache#visibleNodes (ClassSelector#ui -> BasicTreeUI#treeState), and the issue goes away by reloading the tree (ClassSelector#reload()), but we haven't been able to find the its source or a way to fix it. Here are a couple images depicting the normal state and a wrong one with 6 ghost entries debugging window showing the normal state for the visible nodes in the layout cache debugging window showing 6 duplicated entries in the layout cache

IotaBread avatar Jun 01 '23 02:06 IotaBread