Skip to content

[flutter_tools] Fix impellerc Windows Unicode crash and improve diagnostics - #190112

Merged
auto-submit[bot] merged 7 commits into
flutter:masterfrom
bkonyi:fix-shader-compiler-exception
Aug 5, 2026
Merged

auto-submit[bot] merged 7 commits into
flutter:masterfrom
bkonyi:fix-shader-compiler-exception

Conversation

@bkonyi

@bkonyi bkonyi commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Fix impellerc crash on Windows when paths contain Unicode characters, and improve diagnostics by capturing stdout/stderr and adding helpful hints.

Fixes #190233

- Fix C++ path conversion in impellerc switches.cc to use Utf8FromPath.
- Capture and include stdout/stderr in ShaderCompilerException.
- Add platform-specific hints for Gatekeeper and Unicode paths.
@github-actions github-actions Bot added tool Affects the "flutter" command-line tool. See also t: labels. engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Jul 27, 2026
@bkonyi bkonyi added the CICD Run CI/CD label Aug 4, 2026
@bkonyi
bkonyi force-pushed the fix-shader-compiler-exception branch from 45aaa92 to 7c561d3 Compare August 4, 2026 15:58
@bkonyi
bkonyi requested a review from gaaclarke August 5, 2026 14:23
@bkonyi
bkonyi marked this pull request as ready for review August 5, 2026 14:23

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request improves the error reporting and diagnostics of the shader compiler (impellerc) by capturing stdout and stderr on failure, adding platform-specific troubleshooting hints (such as macOS Gatekeeper/OOM and Windows non-ASCII path warnings), and updating C++ path handling to use UTF-8. The review feedback suggests using a malformed-tolerant UTF-8 codec to prevent decoding crashes on localized system messages, and trimming the captured stdout and stderr outputs to avoid trailing newlines in the exception message.

Comment thread packages/flutter_tools/lib/src/build_system/tools/shader_compiler.dart Outdated
Comment thread packages/flutter_tools/lib/src/build_system/tools/shader_compiler.dart Outdated
gaaclarke
gaaclarke previously approved these changes Aug 5, 2026

@gaaclarke gaaclarke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

some minor notes

Comment thread packages/flutter_tools/lib/src/build_system/tools/shader_compiler.dart Outdated
@gaaclarke

Copy link
Copy Markdown
Member

This sounds like something we'd want to cherry-pick?

@bkonyi

bkonyi commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

This sounds like something we'd want to cherry-pick?

Probably a good idea!

@bkonyi
bkonyi requested a review from gaaclarke August 5, 2026 16:20

@gaaclarke gaaclarke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm!

@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 5, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Aug 5, 2026
Merged via the queue into flutter:master with commit dcb306f Aug 5, 2026
21 of 22 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD cp: stable cherry pick this pull request to stable release candidate branch e: impeller Impeller rendering backend issues and features requests engine flutter/engine related. See also e: labels. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[impellerc] Crash on Windows when paths contain non-ASCII characters

2 participants