mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:54:42 +00:00
bitcoin-core-app: Assert hit when using a relative datadir path #846
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml#846
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
to reproduce, run bitcoin-core-app with a datadir that has a relative path or a path that includes
~, e.g.:FWIW,
bitcoind/bitcoin-qtprocess paths with~differently:Yeah, maybe this shouldn't be supported, but it should not hit an assert.
I reproduced two additional unavailable-data-directory cases on
qt6atd567e3eb2497, macOS / Qt 6.9.0.Missing absolute paths also trigger the assertion. Launching with
-datadir=/Volumes/unavailable-drive/Bitcoin, where that directory does not exist, aborts withassert(base.is_absolute())before a window appears. A missing relative path does the same. With the same argument,bitcoindreports that the specified data directory does not exist and exits normally with an error.The QML pre-init config read reaches
AbsPathJoinwith an empty path before normal startup checks the explicit-datadir. This extends the reproduction beyond relative-path or~handling.A missing directory selected by bitcoin.conf produces a different recovery failure. Put
datadir=/Volumes/unavailable-drive/Bitcoinin the defaultbitcoin.conf, then launch without-datadir:-qml_onboarded=1is supplied, with the missing-directory error at the bottom.Closing the app, making the original directory available, and relaunching recovers without changing the selection. The missing drive was simulated with a nonexistent path; the Custom selection was exercised through the test bridge. No existing wallet or chain data was moved or deleted.
PR #883 already targets this issue. Its current head,
8e5b4d1f090a, adds early explicit-path validation and changes configured-directory recovery. I inspected that source but have not run these cases against the PR. These are additional reproduction cases to cover while reviewing it, rather than a claim that the PR still fails them.The recovery flow should identify the unavailable configured directory and let the user quit or retry after reconnecting it. Continuing with a different directory should be an explicit choice, without leaving Default at a disabled Next button.