fix(viewer): fix two startup warnings surfaced by the log cleanup - #2979
Merged
Conversation
With debug logging removed (#2977), two pre-existing startup warnings became visible in the viewer logs. Both are fixed here: - migrate_legacy_paths.sh: `set -euo pipefail` + the bare `${USER}` in USER_HOME aborted the script when $USER is unset — which is the case in-container (DATA mode, via migrate_in_container_paths.sh). On a legacy (screenly→anthias) device that would skip the in-container migration entirely. Fall back to `id -un` so it resolves without tripping `set -u`. - AnthiasViewer: the MainWindow ctor called showFullScreen() AND main() called window->show(), showing the window twice. Under cage/wayland the double surface-commit tripped wlroots' "A configure is scheduled for an uninitialized xdg_surface" warning at startup. Show once, in main(), after construction. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
There was a problem hiding this comment.
Pull request overview
This PR addresses two viewer startup warnings that became visible after reducing Qt debug logging, improving robustness in containerized startup and avoiding wlroots warnings under cage/Wayland.
Changes:
- Avoids
set -uaborts inmigrate_legacy_paths.shwhen$USERis unset in-container by falling back toid -un. - Ensures the Qt
MainWindowis shown exactly once by movingshowFullScreen()out of the constructor and intomain(). - Removes the redundant
window->show()call that previously caused a double surface commit under cage/Wayland.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/anthias_webview/src/mainwindow.cpp | Removes constructor-time showFullScreen() to avoid double-show behavior. |
| src/anthias_webview/src/main.cpp | Shows the window fullscreen exactly once after construction. |
| bin/migrate_legacy_paths.sh | Prevents unbound $USER failures under set -u by adding a safe fallback. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5 tasks
vpetersson
added a commit
that referenced
this pull request
Jun 2, 2026
- CalVer (YYYY.0M.MICRO); still June 2026, micro 0 -> 1 - Ships the QML VideoOutput presentation path (#2975), the pi2/pi3 GStreamer HW video pipeline (#2972), and the x86 WLR_DRM_NO_ATOMIC display-freeze fix (#2978) - Also picks up Pi 4 eglfs rotation (#2971, #2973), the armv7 viewer spawn retry (#2969), the Writeback-connector headless guard (#2968), and viewer log cleanups (#2977, #2979) Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
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.



Issues Fixed
Two pre-existing viewer startup warnings that became visible once the debug-logging firehose was removed (#2977).
Description
1.
migrate_legacy_paths.shaborts on unbound$USERin-container. The script runsset -euo pipefail, andUSER_HOME="${USER_HOME:-/home/${USER}}"references a bare$USER. In the viewer container (DATA mode, invoked viamigrate_in_container_paths.sh)$USERis unset, soset -uaborts the script at that line — which on a legacy (screenly→anthias) device would skip the in-container migration entirely. Now falls back toid -un(${USER:-$(id -un)}) so it resolves without erroring.USER_HOMEis only actually used in HOST mode; in DATA mode it just needs to not blow up.2.
AnthiasViewershows its window twice. TheMainWindowctor calledshowFullScreen()andmain()then calledwindow->show(). Under cage/wayland (pi5/x86/arm64) that double surface-commit tripped wlroots'A configure is scheduled for an uninitialized xdg_surfacewarning at startup. The window is now shown exactly once, viashowFullScreen()inmain()after construction.Both are warning/robustness fixes — no behavior change to normal playback.
Checklist
bash -nclean).🤖 Generated with Claude Code