fix camera preview in the qr scan dialog disappearing after the first frame with javafx 27
What changed, and why it matters
This is a UI bug fix for the QR code scanning camera preview. With JavaFX 27, the camera feed would vanish after showing a single frame because the code treated each successful camera capture as a finished task and cleared the preview. The fix keeps the preview alive by treating each successful capture as a recurring event rather than a final one. There is no security relevance in this change.
No security action needed; treat as a normal UI regression fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In WebcamView.java, the Service state listener’s SUCCEEDED branch previously unbound the image property, cleared the placeholder text, and removed all children. Under JavaFX 27 this caused the webcam preview to disappear after the first frame. The patch replaces that cleanup logic with a comment and a no-op break, relying on the WebcamService to reschedule captures continuously. The change is purely presentational and does not touch parsing, cryptography, network, or wallet logic.
Changed components
src/main/java/com/sparrowwallet/sparrow/control/WebcamView.javaInspect captured patch +2 / −4
### src/main/java/com/sparrowwallet/sparrow/control/WebcamView.java
@@ -103,10 +103,8 @@ public WebcamView(WebcamService service, boolean mirrored) {
log.error("Failed to start web cam", service.getException());
break;
case SUCCEEDED:
- // unreachable...
- imageView.imageProperty().unbind();
- statusPlaceholder.setText("");
- getChildren().clear();
+ //Every capture succeeds and is then rescheduled, so the camera image stays in place
+ break;
}
});
}Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.