Skip to content

Conversation

xdustinface
Copy link

Prior to this PR the signal CClientUIInterface::ThreadSafeMessageBox is not connected to a slot in Qt at the time its emitted when -litemode is used. The signal gets emitted from InitWarning, in InitParameterInteraction. This happens currently before BitcoinGUI gets created by app.createWindow(networkStyle.data()) in dash.cpp where the signal becomes connected to the slot. After this commit the litemode InitWarning will be called in AppInitParameterInteraction which runs after BitcoinGUI has been created, means the signal will be connected then at that point and the crash introduced in #3579 is fixed.

This also brings some changes to the deprecation warning message if -litemode is still used.

  • Always show a basic warning if -litemode gets used no matter if its
    activated or not.
  • Let the user know when -disablegovernance gets forced by -litemode.

…ignal

Prior to this commit the signal
`CClientUIInterface::ThreadSafeMessageBox` is not connected to a slot in
Qt at the time its emitted when `-litemode` is used. The signal gets
emitted from `InitWarning`, in `InitParameterInteraction`. This happens
currently before `BitcoinGUI` gets created by
`app.createWindow(networkStyle.data())` in `dash.cpp` where the
signal becomes connected to the slot. After this commit the litemode
`InitWarning` will be called in `AppInitParameterInteraction` which runs
after `BitcoinGUI` has been created, means the signal will be connected
then at that point and the crash is fixed.
- Always show a basic warning if `-litemode` gets used no matter if its
activated or not.
- Let the user know when -disablegovernance gets forced by -litemode.
@UdjinM6 UdjinM6 added this to the 16 milestone Jul 24, 2020
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 👍

utACK

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@UdjinM6 UdjinM6 merged commit cc4983c into dashpay:develop Jul 27, 2020
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 23, 2020
…ashpay#3626)

* init: Fix `-litemode` crash due to not connected CClientUIInterface signal

Prior to this commit the signal
`CClientUIInterface::ThreadSafeMessageBox` is not connected to a slot in
Qt at the time its emitted when `-litemode` is used. The signal gets
emitted from `InitWarning`, in `InitParameterInteraction`. This happens
currently before `BitcoinGUI` gets created by
`app.createWindow(networkStyle.data())` in `dash.cpp` where the
signal becomes connected to the slot. After this commit the litemode
`InitWarning` will be called in `AppInitParameterInteraction` which runs
after `BitcoinGUI` has been created, means the signal will be connected
then at that point and the crash is fixed.

* init: Improve -litemode deprecation warning

- Always show a basic warning if `-litemode` gets used no matter if its
activated or not.
- Let the user know when -disablegovernance gets forced by -litemode.
@PastaPastaPasta
Copy link
Member

backported in #3670

gades pushed a commit to cosanta/cosanta-core that referenced this pull request Apr 1, 2022
…ashpay#3626)

* init: Fix `-litemode` crash due to not connected CClientUIInterface signal

Prior to this commit the signal
`CClientUIInterface::ThreadSafeMessageBox` is not connected to a slot in
Qt at the time its emitted when `-litemode` is used. The signal gets
emitted from `InitWarning`, in `InitParameterInteraction`. This happens
currently before `BitcoinGUI` gets created by
`app.createWindow(networkStyle.data())` in `dash.cpp` where the
signal becomes connected to the slot. After this commit the litemode
`InitWarning` will be called in `AppInitParameterInteraction` which runs
after `BitcoinGUI` has been created, means the signal will be connected
then at that point and the crash is fixed.

* init: Improve -litemode deprecation warning

- Always show a basic warning if `-litemode` gets used no matter if its
activated or not.
- Let the user know when -disablegovernance gets forced by -litemode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants