promag
commented at 1:27 pm on May 29, 2019:
member
BitcoinApplication::initializeResult and BitcoinGUI::setWalletController are only called after the startup rescan is completed. While the rescan is in progress the window menus are already available.
This PR makes the Open Wallet menu disabled until BitcoinGUI::setWalletController is called.
gui: Enable open wallet menu on setWalletController75485ef096
fanquake added the label
GUI
on May 29, 2019
fanquake added this to the milestone 0.18.1
on May 29, 2019
fanquake
commented at 2:09 pm on May 29, 2019:
member
Concept ACK.
This fixes the crashing case in #16087, however I think we could make a more extensive change, as even with this fix it’s still possible to cause a crash via the other menus.
i.e: if you open Window -> Console and try and execute any command (can be garbage) bitcoin-qt will crash:
0merge 161181make check -j6 && make deploy
2lldb Bitcoin-Qt.app
The other crash I mentioned above is being fixed separately in #16122.
PastaPastaPasta approved
PastaPastaPasta
commented at 4:02 am on June 7, 2019:
contributor
concept ACK
jonasschnelli
commented at 8:33 am on June 12, 2019:
contributor
utACK75485ef0962a53946f17b761c4445627b07e6eff
ryanofsky approved
ryanofsky
commented at 3:43 pm on June 12, 2019:
member
utACK75485ef0962a53946f17b761c4445627b07e6eff. It’s a simple, sensible fix.
fanquake merged this
on Jun 13, 2019
fanquake closed this
on Jun 13, 2019
fanquake referenced this in commit
afab1312c5
on Jun 13, 2019
MarcoFalke removed the label
Needs backport
on Jun 13, 2019
MarcoFalke referenced this in commit
b2398240ff
on Jun 13, 2019
sidhujag referenced this in commit
6cd5be61e6
on Jun 13, 2019
ryanofsky
commented at 2:19 pm on June 18, 2019:
member
@promag, you mentioned that this change caused a bug listing wallets in #16230 (fixed in #16231), that you, me, jonas, and fanquake all didn’t notice during review.
Could you explain how this PR caused the bug? Also, it’d be good to know if you have any suggestions for things we should look for during reviews, or better ways to structure code to prevent initialization bugs in the future.
promag
commented at 2:40 pm on June 18, 2019:
member
Like you said above, and considering this was already a fix to another problem, at the time I didn’t pay attention to remaining functionality. I guess other reviewers made the same mistake. Ideally we should have tests to prevent regressions like you say in #16075.
I’m a bit surprised it works because (haven’t checked for runtime warnings though) ->menu() is null. The result is that the menu is never updated.
Not sure if there’s a way to abort if QObject::connect() is called with nullptr.
ryanofsky
commented at 2:59 pm on June 18, 2019:
member
Thanks for the explanation, that makes a lot of sense. I agree it’s is odd that Qt doesn’t complain about trying to connect to a signal from a null object. In retrospect, I guess if we see a change delaying initialization like this (delaying m_open_wallet_action->setMenu()), a good thing to do would be to scroll down and make sure the uninitialized object (m_open_wallet_action->menu()) is not used in the meantime.
promag
commented at 3:17 pm on June 18, 2019:
member
@ryanofsky actually running with -debug it shows a warning:
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-11-17 09:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me