mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 08:18:39 +00:00
wallet: parseBitcoinUriFromFile blocks the GUI thread on network-mounted paths #541
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#541
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?
WalletQmlModel::parseBitcoinUriFromFilereads the file synchronously on the GUI thread (QFile::open+readAll). For files on local storage, the existing 1 MiB size guard makes this acceptable. However, if the user drags a file from a network-mounted volume (NFS, SMB, SSHFS), the blocking I/O can stall the main thread for several seconds, freezing the UI.Proposed fix
Move file I/O off the GUI thread using
QtConcurrent::run. The result should be returned asynchronously — the C++ side emits a signal carrying the parsedQVariantMap; the QML side connects to it and callsapplyParsedPaymentRequestfrom the signal handler rather than blocking on theQ_INVOKABLEreturn value.Rough sketch:
Priority
Low for mobile (no NFS mounts in practice). Should be addressed before any desktop-focused release where drag-from-network-share is a plausible workflow.
Related
PR for this issue not ready yet.