qtvcp probe help: load first help page lazily#4097
Merged
c-morley merged 1 commit intoJun 2, 2026
Conversation
Preloading the first help page at widget construction smooth-scales its images then, which can hang or crash qtvcp on a headless/no-GPU Qt platform. Defer it to the first showDialog(); help is unchanged when opened.
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.
Problem
qtdragon (and any qtvcp screen using the basic-probe or versa-probe widgets) can hang or crash at startup on a headless / no-GPU Qt platform (
QT_QPA_PLATFORM=offscreen, no GPU). I hit this consistently on a CI runner and reproduced it in a plainubuntu:24.04container with no GPU: qtvcp never finishes coming up, so the GUI fails to start.Root cause
The basic-probe and versa-probe help dialogs preload their first help page during widget construction (
buildWidget, called fromhal_init). Since the help loader gained smooth image pre-scaling (_set_scaled_html,QImagewithSmoothTransformation), that preload now builds and scales the raster help diagrams at startup.That scaling on the startup path is what breaks headless: in my no-GPU container qtvcp hangs there; on the CI runner it segfaults. I confirmed it by bisecting the qtvcp Python in the container:
versa_probe.py+basic_probe.pyto before the smooth-scale change: pass_set_scaled_htmlto a plainsetHtml(kill only the scaling): passSo the regression is specifically the image scaling running during construction. It is also wasted work whenever the operator never opens the help dialog.
Fix
Defer the first-page load from
buildWidgetto the firstshowDialog()call, in bothbasic_probe.pyandversa_probe.py. The help looks and behaves identically when opened; the image scaling just no longer runs on the startup path.Testing
In a no-GPU
ubuntu:24.04container (RIP build, offscreen platform), running the qtdragon GUI smoke test:UI_SMOKE_OK; touchy smoke unchanged (control)