Skip to content

Conversation

achow101
Copy link
Member

@achow101 achow101 commented Mar 9, 2022

Backport of #24498

Just add tests. No changes to application behavior. Tests will be
updated in the next commit changing & improving current behavior.

Include a Qt test for GUI startup crash reported by Rspigler in
bitcoin#24457 caused by GetArg
behavior that happens if settings.json contains an integer value for any
of the configuration options which GUI settings can currently clash with
(-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen,
-server, -proxy, -proxy, -onion, -onion, -lang, and -prune).

Github-Pull: bitcoin#24498
Rebased-From: 84b0973
Fix GUI startup crash reported by Rspigler in
bitcoin#24457 that happens if
settings.json contains an integer value for any of the configuration
options which GUI settings can currently clash with (-dbcache, -par,
-spendzeroconfchange, -signer, -upnp, -natpmp, -listen, -server, -proxy,
-proxy, -onion, -onion, -lang, and -prune).

Fix is a one-line change in ArgsManager::GetArg.

Github-Pull: bitcoin#24498
Rebased-From: 5b1aae1
Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

ACK 7e1b968

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

ACK confirmed conflict-free backport with no changes using script (#11592 (review))

@fanquake fanquake merged commit 430808a into bitcoin:23.x Mar 10, 2022
laanwj added a commit that referenced this pull request May 25, 2022
…ettings.json

344537c qt: Avoid crash on startup if int specified in settings.json (Ryan Ofsky)

Pull request description:

  Backport of #24498 to 22.x branch

  This was already backported to the 23.x branch in #24511, but vasild discovered the issue can affect 22.x as well #15936 (comment):

  > While testing this, 22.x crashes if `settings.json` contains `"prune": 1234` due to #24498 which was fixed in 23.0. So, if this PR is included in 24.x and a user upgrades to 24.x and then downgrades to 22.x his 22.x would crash at startup.

  It's not very important to backport this to 22.x because I can work around the issue other ways, but I do see 22.x is listed as an active branch https://github.com/bitcoin/bitcoin/branches, so if there is another 22.x release, it would be nice to have this fix and not have a wonky uncaught univalue exception waiting to be hit

ACKs for top commit:
  laanwj:
    ACK 344537c

Tree-SHA512: 479f7fb4b4b73ec85f28e97af9b21d54245b8ab4d246e50134b37f1726fe3c57cf388fe4973f8ccf1b9efa7663166d1fbeb631758b39d4490b5eab82d0c83d77
@bitcoin bitcoin locked and limited conversation to collaborators Mar 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants