-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#50029Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work liste: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.17Found to occur in 3.17Found to occur in 3.17good first issueRelatively approachable for first-time contributorsRelatively approachable for first-time contributorshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
Reference a shader file in pubspec.yaml that defines a GLSL struct and creates an instance of it somewhere in the shader code.
Expected results
The shader compiles successfully, or the compiler shows an error message without crashing.
Actual results
The compiler crashes during the shader compilation.
Code sample
Code sample
In main.dart:
void main {}In shaders/shader.frag:
#version 460 core
#include <flutter/runtime_effect.glsl>
out vec4 fragColor;
struct Color {
vec3 rgb;
};
void main() {
Color color = Color(vec3(1, 0, 0));
fragColor = vec4(color.rgb, 1);
}
Shader is included in pubspec.yaml:
flutter:
shaders:
- shaders/shader.frag
Screenshots or Video
No response
Logs
Logs
$ flutter run -d emulator-5554
Using hardware rendering with device Android SDK built for arm64. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for arm64 in debug mode...
[ERROR:flutter/fml/backtrace.cc(108)] Caught signal SIGABRT during program execution.
Frame 0: 0x1044dab8c std::_LIBCPP_ABI_NAMESPACE::__shared_ptr_emplace<>::~__shared_ptr_emplace()
Frame 1: 0x1046b4f9c spirv_cross::Compiler::type_struct_member_offset()
Frame 2: 0x1044a8c18 impeller::compiler::Reflector::ReadStructMembers()
Frame 3: 0x1044ab7ec impeller::compiler::Reflector::ReflectStructDefinition()
Frame 4: 0x1044a5c20 spirv_cross::ParsedIR::for_each_typed_id<>()
Frame 5: 0x1044a36f8 impeller::compiler::Reflector::GenerateTemplateArguments()
Frame 6: 0x1044a25e8 impeller::compiler::Reflector::Reflector()
Frame 7: 0x10449cfa8 std::_LIBCPP_ABI_NAMESPACE::make_unique[abi:v15000]<>()
Frame 8: 0x10449c568 impeller::compiler::Compiler::Compiler()
Frame 9: 0x104499088 impeller::compiler::Main()
Frame 10: 0x10449a4ec main
Frame 11: 0x181ee7f28 start
Target debug_android_application failed: ShaderCompilerException: Shader compilation of "/project_path/shaders/shader.frag" to "/project_path/build/app/intermediates/flutter/debug/flutter_assets/shaders/shader.frag" failed with exit code -6.
impellerc stdout:
impellerc stderr:
[ERROR:flutter/fml/backtrace.cc(108)] Caught signal SIGABRT during program execution.
Frame 0: 0x1044dab8c std::_LIBCPP_ABI_NAMESPACE::__shared_ptr_emplace<>::~__shared_ptr_emplace()
Frame 1: 0x1046b4f9c spirv_cross::Compiler::type_struct_member_offset()
Frame 2: 0x1044a8c18 impeller::compiler::Reflector::ReadStructMembers()
Frame 3: 0x1044ab7ec impeller::compiler::Reflector::ReflectStructDefinition()
Frame 4: 0x1044a5c20 spirv_cross::ParsedIR::for_each_typed_id<>()
Frame 5: 0x1044a36f8 impeller::compiler::Reflector::GenerateTemplateArguments()
Frame 6: 0x1044a25e8 impeller::compiler::Reflector::Reflector()
Frame 7: 0x10449cfa8 std::_LIBCPP_ABI_NAMESPACE::make_unique[abi:v15000]<>()
Frame 8: 0x10449c568 impeller::compiler::Compiler::Compiler()
Frame 9: 0x104499088 impeller::compiler::Main()
Frame 10: 0x10449a4ec mainFlutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.13.6, on macOS 13.6 22G120 darwin-arm64, locale en-CZ)
• Flutter version 3.13.6 on channel stable at /Users/michalivicic/fvm/versions/3.13.6
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ead455963c (7 weeks ago), 2023-09-26 18:28:17 -0700
• Engine revision a794cf2681
• Dart version 3.1.3
• DevTools version 2.25.0
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/michalivicic/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/michalivicic/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15A240d
• CocoaPods version 1.13.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
[✓] VS Code (version 1.84.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.76.0
[✓] Connected device (3 available)
• Android SDK built for arm64 (mobile) • emulator-5554 • android-arm64 • Android 10 (API 29) (emulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.6 22G120 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 119.0.6045.123
[✓] Network resources
• All expected network resources are available.
• No issues found!
tenhobi, rivella50, chipweinberger and petrnymsa
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work liste: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.17Found to occur in 3.17Found to occur in 3.17good first issueRelatively approachable for first-time contributorsRelatively approachable for first-time contributorshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team