fix(scodes): update SCodes to get a crash fix on Windows#21115
Open
jrainville wants to merge 1 commit into
Open
fix(scodes): update SCodes to get a crash fix on Windows#21115jrainville wants to merge 1 commit into
jrainville wants to merge 1 commit into
Conversation
Member
Jenkins Builds
|
caybro
approved these changes
Jun 2, 2026
Member
Author
|
I tested the Android build and the QR scanner still works as expected |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #21034
Summary
This PR updates the StatusQ SCodes dependency to include a fix for a Windows crash in the Log in by syncing flow.
Problem
On Windows, repeatedly entering and exiting the syncing QR flow (Continue -> Back -> Continue) could trigger an access violation during QML teardown.
WinDbg stacks consistently pointed to
Qt6Core!QThread::terminatein the scanner teardown path.Root Cause
The QR scanner worker thread in SCodes (
SBarcodeScanner) used a Windows-specific forced thread stop (terminate()) in the destructor.During rapid view teardown/recreation, this could race with in-flight decode work and posted Qt events, causing invalid access.
Fix
The SCodes scanner shutdown was hardened to use an orderly teardown sequence instead of forced termination:
quit()+wait()for clean thread shutdownAlso included small safety guards to avoid processing/logging against a cleared camera during teardown.
Dependency Update
StatusQ now pins SCodes to:
2b46818ff46fd43f443ed80a056c01abcf927526in CMakeLists.txt.
Affected areas
SCodes (PR: status-im/SCodes#4)
Quality checklist
My PR is consistent with this document: QML Architecture Guidelines
Screencapture of the functionality
Linux syncing:
syncing-fix.webm
Linux QR Scanner:
qr-still-works.webm
Windows Syncing:
windows-syncing.mp4
Windows QR scanner:
windows-qr.mp4
Impact on end user
It should make opening and closing the QR scanner more resilient to crashes
How to test
Tested on Windows and Ubuntu
Risk
Low/Medium - We need to check that the QR scanner still works as expected on all platforms. The library was a bit "flaky" when I integrated it. It would work on one platform, but freeze on another. In theory, the build system should still be ok and the code is safe, but let's test before merging.