Electron-cash: 'Used' list pops open on incoming txes (intermittent/hard to reproduce)

Created on 14 Dec 2018  路  8Comments  路  Source: Electron-Cash/Electron-Cash

@kyuupichan noticed this the other day, and I noticed it today as well. @cculianu says it is not happening on Mac.

Steps to reproduce:

  • Have Addresses tab open with a wallet that has used addresses (mine has addresses 0-14 and 16-24 used), with used addresses hidden.
  • Receive a tx on an unused address, while you have said address selected.
  • Observe that the used addresses list gets unhidden.
UX and usability bug observation required

All 8 comments

This doesn't happen on macOS which is why I didn't know about it. I would have fixed it if it had.

Here is an example -- I kept it selected, sent from 1 wallet to this one and no problem:

screen shot 2018-12-14 at 7 41 29 am

Must be a Linux thing. I'll boot up my Linux and try it on there and see if I can figure it out.

Thanks Mark.

I run Mac; so it happens on Mac

Well then it's not Mac-specific but I can't even reproduce it on Linux or Mac now.

Here is a sample movie you can download that shows you I can't get it to happen:

https://c3-soft.com/downloads/BitcoinCash/ec_used_bug_how_2_reproduce.mov

If you guys can figure out what circumstances it happens in, it would help.

If not I'll continue to study this code that tries to preserve the address-list state, and see if I can see any obvious errors in certain corner cases.

One more movie with me futzing around trying to reproduce it. If you can figure out exactly what combination of used/unused addresses I need to do it, please do let me know!

https://c3-soft.com/downloads/BitcoinCash/ec_address_bug_cant_reproduce_2.mov

@kyuupichan @markblundeberg

I created a PR that I think should at least correctly enforce the rule that the previous tree state (expanded/collapsed) cannot be violated by a refresh. The previous code didn't always guarantee that if the current item moved around in the tree: setCurrentItem() would sometimes auto-expand parent tree items.

Please try this PR #1043 and let me know if it addresses the issues you've observed.

Yup seems to be fixed now.

Aye. Awesome! Thanks for checking.

I can conclude the problem was whomever wrote that previous code likely wasn't aware of the (perhaps unintuitive) fact that setCurrentItem() on a collapsed QTreeWidgetItem parent would cause the parent to expand out as a "convenience"... so their usage wasn't maintaining the invariant they thought they were maintaining.

Good to know it's solved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KarolTrzeszczkowski picture KarolTrzeszczkowski  路  6Comments

goodc0re picture goodc0re  路  3Comments

imaginaryusername picture imaginaryusername  路  5Comments

markblundeberg picture markblundeberg  路  4Comments

tracyspacy picture tracyspacy  路  6Comments