gui: Fix boost::signals2::no_slots_error in early calls to InitWarning#14783
gui: Fix boost::signals2::no_slots_error in early calls to InitWarning#14783maflcko merged 2 commits intobitcoin:masterfrom
Conversation
|
Alternatively could call |
|
I think the safest solution to this is to not call the message box at all for unrecognized sections. Simply call |
efb9276 to
3a6a489
Compare
|
Updated, @MarcoFalke you might want to check this out since you reviewed #14708. |
|
Concept ACK So to be clear, the problem is that at this stage of initialization, we're not yet able to show message boxes in Qt [1]. @promag's initial fix changed the slot handler to first register a message box handler that only logs, but, it seems safer to simply change these
|
1d75da3 to
91ce5a2
Compare
|
|
|
Now using |
maflcko
left a comment
There was a problem hiding this comment.
Slightly tend to NACK. This makes the code fragile in light of refactoring such as move-only commits, since it is not clear when InitWarning is safe to call. Wouldn't it be easier to always register the no_ui listener to the signal as soon as possible in the initialization sequence (regardless of bitcoind vs bitcoin-qt) and then optionally, if the gui is run, also register the gui message box listener?
Side-note: Previously we wouldn't even log nor print warnings when running the gui, but that is now fixed (see #14162)
src/init.cpp
Outdated
There was a problem hiding this comment.
InitWarning also prints to the debug log, fprintf does not.
…arly calls to InitWarning
91ce5a2 to
a0f8df3
Compare
|
Previous fix in 91ce5a2, which @MarcoFalke disapproved. Current fix does what was suggested in #14783 (comment). |
|
Not sure about this because I think it should go thru |
maflcko
left a comment
There was a problem hiding this comment.
Should remove the now-redundant (?) static void InitMessage in src/qt/bitcoin.cpp?
|
I'm still not sure about this, but ok… For example:
|
|
@laanwj I'm not ignoring them, I'm trying to address them. |
|
@laanwj you mean
In boost::signals, slot results are combined to give the signal result. The default combiner is to give the last slot result. So the first connected slots are those in |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
bdf4d55 to
6bbdb20
Compare
|
Concept ACK |
@MarcoFalke done. |
| std::unique_ptr<interfaces::Handler> handler_question = node->handleQuestion(noui_ThreadSafeQuestion); | ||
| std::unique_ptr<interfaces::Handler> handler_init_message = node->handleInitMessage(noui_InitMessage); | ||
|
|
||
| // Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory |
There was a problem hiding this comment.
What makes it safe to subscribe to them here already, when some of then log to the debug log, which is in the datadir?
There was a problem hiding this comment.
If that was the case then boost::signals2::no_slots_error would have been raised before?
|
utACK 6bbdb20. Going to test the next time I compile the gui |
|
@Sjors thanks, and the improvement can come next. |
…y calls to InitWarning 6bbdb20 squashme: connect thru node interface (João Barbosa) a0f8df3 qt: Call noui_connect to prevent boost::signals2::no_slots_error in early calls to InitWarning (João Barbosa) Pull request description: Adding the following to `bitcoin.conf` ``` [xxx] disablewallet=1 ``` And running `bitcoin-qt` gives: ``` libc++abi.dylib: terminating with uncaught exception of type boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::signals2::no_slots_error> >: boost::signals2::no_slots_error ``` Fixes regression in bitcoin#14708. Tree-SHA512: 7c158376fad6ebcd80fc0dbe549d5b6e893fb82e7dc1e455825633d7f91b14dc34493487cab7642152e88f9eaf99bfa91988972d600e9fb289cf26afd64aff8a
…_slots_error in early calls to InitWarning Summary: **Merge bitcoin#14783: gui: Fix boost::signals2::no_slots_error in early calls to InitWarning** 6bbdb20 squashme: connect thru node interface (João Barbosa) a0f8df3 qt: Call noui_connect to prevent boost::signals2::no_slots_error in early calls to InitWarning (João Barbosa) **Pull request description:** Adding the following to `bitcoin.conf` ``` [xxx] disablewallet=1 ``` And running `bitcoin-qt` gives: ``` libc++abi.dylib: terminating with uncaught exception of type boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::signals2::no_slots_error> >: boost::signals2::no_slots_error ``` Fixes regression in bitcoin#14708. --- This is a backport of Core [[bitcoin/bitcoin#14783 | PR14783]] Test Plan: ninja check BITCOIND={full_path_to_build_dir}/src/qt/bitcoin-qt ./test/functional/test_runner.py feature_config_args feature_includeconf Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D5794
…_slots_error in early calls to InitWarning Summary: **Merge bitcoin#14783: gui: Fix boost::signals2::no_slots_error in early calls to InitWarning** 6bbdb20 squashme: connect thru node interface (João Barbosa) a0f8df3 qt: Call noui_connect to prevent boost::signals2::no_slots_error in early calls to InitWarning (João Barbosa) **Pull request description:** Adding the following to `bitcoin.conf` ``` [xxx] disablewallet=1 ``` And running `bitcoin-qt` gives: ``` libc++abi.dylib: terminating with uncaught exception of type boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::signals2::no_slots_error> >: boost::signals2::no_slots_error ``` Fixes regression in bitcoin#14708. --- This is a backport of Core [[bitcoin/bitcoin#14783 | PR14783]] Test Plan: ninja check BITCOIND={full_path_to_build_dir}/src/qt/bitcoin-qt ./test/functional/test_runner.py feature_config_args feature_includeconf Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D5794
…y calls to InitWarning 6bbdb20 squashme: connect thru node interface (João Barbosa) a0f8df3 qt: Call noui_connect to prevent boost::signals2::no_slots_error in early calls to InitWarning (João Barbosa) Pull request description: Adding the following to `bitcoin.conf` ``` [xxx] disablewallet=1 ``` And running `bitcoin-qt` gives: ``` libc++abi.dylib: terminating with uncaught exception of type boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::signals2::no_slots_error> >: boost::signals2::no_slots_error ``` Fixes regression in bitcoin#14708. Tree-SHA512: 7c158376fad6ebcd80fc0dbe549d5b6e893fb82e7dc1e455825633d7f91b14dc34493487cab7642152e88f9eaf99bfa91988972d600e9fb289cf26afd64aff8a
Adding the following to
bitcoin.confAnd running
bitcoin-qtgives:Fixes regression in #14708.