Skip to content

Fix loading screen crash on consoles without box-drawing characters - #8977

Open
Abeey04 wants to merge 2 commits into
isaac-sim:mainfrom
Abeey04:fix/loading-screen-logo-encoding
Open

Abeey04 wants to merge 2 commits into
isaac-sim:mainfrom
Abeey04:fix/loading-screen-logo-encoding

Conversation

@Abeey04

@Abeey04 Abeey04 commented Nov 8, 2026

Copy link
Copy Markdown

Description

The loading screen draws a greeting logo beside the run summary, picked at random from two bundled pairs. On consoles that cannot encode box-drawing characters it already switches the summary box to ASCII, but it never checked the logos. Three of the four bundled logos (LOGO_WIDE, LOGO_NVIDIA, LOGO_NVIDIA_WIDE) use block or box-drawing characters.

On a cp1252 console, such as Windows output redirected to a file, LoadingScreen.summary() raised UnicodeEncodeError, and isaaclab train exited before building the environment. It failed in two cases:

  • about half of redirected launches, whenever the NVIDIA pair was drawn;
  • any launch on a cp1252 console 130 or more columns wide, where the wide robot logo is chosen.

Reproduced on release/3.0.0 (Windows 11) with uv run --extra isaacsim isaaclab train ... > train.log 2>&1 from Git Bash:

  File "...\isaaclab\app\loading_screen.py", line 393, in summary
    self._write(f"\n{summary}\n\n")
  ...
UnicodeEncodeError: 'charmap' codec can't encode characters in position 92-106: character maps to <undefined>

The fix

  • The loading screen now keeps only the bundled logos the console can encode, and drops a pair that has none left, so a cp1252 console gets the ASCII robot greeting.
  • UTF-8 consoles draw from both pairs as before.
  • The check reuses the encoding test the ASCII box fallback already ran, now factored out as _can_encode.
  • Remote seasonal greetings already check their own encoding and are unchanged.

Until this lands, setting PYTHONIOENCODING=utf-8 avoids the crash. The same bug is on release/3.0.0, where its simpler __init__ should take this fix as a backport.

No issue was filed for this.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots

Not applicable (console output).

Testing

  • New test: test_summary_prints_on_console_that_cannot_encode_greeting_art (kitless) writes the summary to a cp1252 stream in two cases: the NVIDIA logo at standard width, and the robot pair's wide logo at 130 columns. Both cases fail on main with the UnicodeEncodeError above and pass with the fix.
  • Existing tests: test_loading_screen.py and test_remote_greetings.py pass on Windows (Python 3.12, rich 14.3.4), with one exception. test_live_lifecycle_restores_normal_screen finds no alternate-screen escape, and it fails the same way on unmodified main in that shell, most likely because rich treats a process without a VT console as legacy Windows.

Checklist

Docker and GPU tests run on demand. Push the commits you want tested, then
comment run-ci on the pull request.

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to any test changes
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump package versions — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

The loading screen drew a bundled greeting logo picked at random, and only
swapped the summary box to ASCII on consoles that cannot encode box-drawing
characters. Three of the four bundled logos use block or box-drawing
characters, so printing the run summary to a console such as Windows output
redirected to a file (cp1252) raised UnicodeEncodeError and stopped startup.

Keep only the bundled logos the console can encode, and skip a pair with
none left. UTF-8 consoles draw from both pairs as before.
@Abeey04
Abeey04 requested a review from a team November 8, 2026 06:06
Copilot AI balanced review requested due to automatic review settings November 8, 2026 06:06
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Nov 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@greptile-apps

greptile-apps Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

The loading screen now filters bundled logos by the console's encoding before choosing a greeting.

  • Startup summaries skip greeting art their console cannot encode.

Reviews (1) · Last reviewed commit: "Fix loading screen crash on consoles wit..." · Reviewed by Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

Needs attention: Test quality (1). Other reviewed categories look good.

  • PR description: The title and body match the diff, document reproduction and validation, and make no performance claim requiring measurements.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: Implementation looks good.
  • Style consistency: Style consistency looks good.
  • Test quality: The regression test covers two distinct failure paths, but the file-level CI routing requires replacing the single-test kitless marker with module-level pytestmark.

Minor fixes needed. Posted 1 inline finding.

Automated review; human maintainers own approval decisions.

screen.close()


@pytest.mark.kitless

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning · Test Quality — Mark whole file kitless via pytestmark

Every test in this file runs without Isaac Sim, and CI routes by file text, so a single-test mark pulls in the unmarked siblings while implying they do not qualify. Use a module-level pytestmark instead.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the kitless mark to a module-level pytestmark and removed the single-test mark, in 2214b28.

🤖 Addressed by Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants