Files
bitcoin/src
Hennadii Stepanov d2ac748e9e Merge bitcoin-core/gui#864: Crash fix, disconnect numBlocksChanged() signal during shutdown
71656bdfaa gui: crash fix, disconnect numBlocksChanged() signal during shutdown (furszy)

Pull request description:

  Aiming to fix bitcoin-core/gui#862.

  The crash stems from the order of the shutdown procedure:
  We first unset the client model, then destroy the wallet controller—but we leave
  the internal wallet models (`m_wallets`) untouched for a brief period. As a result,
  there’s a point in time where views still have connected signals and access to
  wallet models that are not connected to any wallet controller.
  Now.. since the `clientModel` is only replaced with nullptr locally and not destroyed
  yet, signals like `numBlocksChanged` can still emit. Thus, when wallet views receive
  them, they see a non-null wallet model ptr, and proceed to call backend functions
  from a model that is being torn down.

  As the shutdown procedure begins by unsetting `clientModel` from all views. It’s safe
  to ignore events when `clientModel` is nullptr.

ACKs for top commit:
  maflcko:
    lgtm ACK 71656bdfaa
  pablomartin4btc:
    re-ACK 71656bdfaa
  hebasto:
    ACK 71656bdfaa, I have reviewed the code and it looks OK.

Tree-SHA512: e6a369c40aad8a5a3da64e92daa10250006f60c53feef353a5580e1bdb17fe8e1ad102abf5419ddeff1caa703b69ab634265ef3b9cfef87e9304f97bfdd2c4aa
2025-04-26 13:45:31 +01:00
..
2025-03-13 11:13:13 +00:00
2025-03-13 11:13:13 +00:00
2025-03-13 11:13:13 +00:00
2024-11-26 20:47:08 -05:00
2024-11-04 14:19:40 -05:00
2024-05-20 16:48:19 +00:00
2024-07-08 11:12:01 +02:00
2025-01-22 11:29:05 +01:00
2025-04-17 16:31:57 -07:00
2024-07-08 11:12:01 +02:00
2025-03-31 13:07:37 -04:00
2024-12-31 00:04:20 -03:00
2024-12-31 00:04:20 -03:00
2025-04-09 15:59:59 +01:00
2025-04-09 15:59:59 +01:00
2023-11-16 11:36:22 +10:00