New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flutter beta channel broken for fragment shaders (windows 11) #141838
Comments
Hi @jtmcdole Could you share how to produce the issue like in the screenshot you share? When running on Web, the app is a black screen only and there is an exception from the output console. On Flutter stable Exception on stable 3.16.8 - WebLaunching lib\main.dart on Chrome in debug mode...
This app is linked to the debug service: ws://127.0.0.1:52440/gwPuHYsLAV8=/ws
Debug service listening on ws://127.0.0.1:52440/gwPuHYsLAV8=/ws
Connecting to VM Service at ws://127.0.0.1:52440/gwPuHYsLAV8=/ws
Got object store box in database hydrated_box.
[log] RangeError (index): Index out of range: index should be less than 5: 19
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:3 throw_
dart-sdk/lib/_internal/js_dev_runtime/private/js_array.dart 610:7 _set]
lib/_engine/engine/shader_data.dart 56:15 fromBytes
lib/_engine/engine/canvaskit/painting.dart 305:46 fromBytes
lib/_engine/engine/canvaskit/renderer.dart 397:32 <fn>
dart-sdk/lib/async/zone.dart 1661:54 runUnary
dart-sdk/lib/async/future_impl.dart 162:18 handleValue
dart-sdk/lib/async/future_impl.dart 846:44 handleValueCallback
dart-sdk/lib/async/future_impl.dart 875:13 _propagateToListeners
dart-sdk/lib/async/future_impl.dart 647:5 [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 721:7 callback
dart-sdk/lib/async/schedule_microtask.dart 40:11 _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5 _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7 <fn> |
The screen shot is from a private repo. It's only Flutter with a single fragment shader- and that's the "good case" (i.e. Flutter Stable). The bad case is the logs.
Yes, so when I run Turi, it runs for the first part, but when I get to the jumping phase; the graphics get corrupted. I probably should not have mixed windows + web in the same bug report. The gits of it is:
|
3.19.0-0.1.pre - planet shader works on windows, not on web. |
\cc @jonahwilliams For any potential insights. |
@jtmcdole Do you mean these spots in these red circles? If they are not, could you please share a demo for the issue? Please split this into separate issues for tracking them better. Thank you! |
No; though I do see those. What I see is a black splotch that covers the middle of the screen. |
I just ran the project on Windows 11 machine but can't see this. Could you share a demo screenshot? For the team to investigate this issue easier, could you narrow down and provide a completed and minimal reproducible code sample ? |
I re-upgraded to the beta channel and the only glitches I'm getting now are the green dots mentioned before. |
I do still get shader errors when running a single fragment shader in chrome:
|
I'm not sure if this is an issue as it's a complex project that needs to dig dive. It would be better if there is a minimal sample code to reproduce it. I will label this issue for the error on Web platform: flutter doctor -v (stable, beta and master)[!] Flutter (Channel stable, 3.16.8, on Microsoft Windows [Version 10.0.22000.2538], locale en-US)
• Flutter version 3.16.8 on channel stable at C:\WORKING\SDK\flutter
! Warning: `flutter` on your path resolves to C:\Aliases\flutter.bat, which is not inside your current Flutter SDK checkout at C:\WORKING\SDK\flutter. Consider adding
C:\WORKING\SDK\flutter\bin to the front of your path.
! The dart binary is not on your path. Consider adding C:\WORKING\SDK\flutter\bin to your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 67457e669f (5 days ago), 2024-01-16 16:22:29 -0800
• Engine revision 6e2ea58a5c
• Dart version 3.2.5
• DevTools version 2.28.5
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[√] Windows Version (Installed version of Windows is version 10 or higher)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.5)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.6.33829.357
• Windows 10 SDK version 10.0.22000.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
[√] VS Code (version 1.85.2)
• VS Code at C:\Users\huynq\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.80.0
[√] Connected device (2 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.2538]
• Chrome (web) • chrome • web-javascript • Google Chrome 120.0.6099.217
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 3 categories. [!] Flutter (Channel master, 3.19.0-9.0.pre.50, on Microsoft Windows [Version 10.0.22000.2538], locale en-US)
• Flutter version 3.19.0-9.0.pre.50 on channel master at C:\WORKING\SDK\flutter_master
! Warning: `flutter` on your path resolves to C:\Aliases\flutter.bat, which is not inside your current Flutter SDK checkout at C:\WORKING\SDK\flutter_master. Consider
adding C:\WORKING\SDK\flutter_master\bin to the front of your path.
! The dart binary is not on your path. Consider adding C:\WORKING\SDK\flutter_master\bin to your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5dea6b994e (13 hours ago), 2024-01-21 12:01:23 -0500
• Engine revision a7b207d5a1
• Dart version 3.4.0 (build 3.4.0-52.0.dev)
• DevTools version 2.31.0
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[√] Windows Version (Installed version of Windows is version 10 or higher)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.5)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.6.33829.357
• Windows 10 SDK version 10.0.22000.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
[√] VS Code (version 1.85.2)
• VS Code at C:\Users\huynq\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.80.0
[√] Connected device (2 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.2538]
• Chrome (web) • chrome • web-javascript • Google Chrome 120.0.6099.217
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 3 categories. [!] Flutter (Channel beta, 3.19.0-0.2.pre, on Microsoft Windows [Version 10.0.22000.2538], locale en-US)
• Flutter version 3.19.0-0.2.pre on channel beta at C:\WORKING\SDK\flutter
! Warning: `flutter` on your path resolves to C:\Aliases\flutter.bat, which is not inside your current Flutter SDK checkout at C:\WORKING\SDK\flutter. Consider adding
C:\WORKING\SDK\flutter\bin to the front of your path.
! The dart binary is not on your path. Consider adding C:\WORKING\SDK\flutter\bin to your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c1df7d07ac (4 days ago), 2024-01-17 15:42:07 -0800
• Engine revision 4f18bb4dcb
• Dart version 3.3.0 (build 3.3.0-279.0.dev)
• DevTools version 2.31.0
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[√] Windows Version (Installed version of Windows is version 10 or higher)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.5)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.6.33829.357
• Windows 10 SDK version 10.0.22000.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
[√] VS Code (version 1.85.2)
• VS Code at C:\Users\huynq\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.80.0
[√] Connected device (2 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.2538]
• Chrome (web) • chrome • web-javascript • Google Chrome 120.0.6099.217
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 3 categories. |
This PR changes the ShaderData construction on canvaskit to consider array uniforms. flutter/flutter#141296 flutter/flutter#141838 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This PR changes the ShaderData construction on canvaskit to consider array uniforms. flutter/flutter#141296 flutter/flutter#141838 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Closing as fixed because flutter/engine#49754 has landed |
Hello there, |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to reproduce
Clone a project like https://github.com/renancaraujo/turi
flutter run -d windows
Expected results
Turi running.
Web shaders working.
Actual results
Turi runs, but the screen gets corrupted with some black frames.
Also:
Using shaders on flutter web stopped working with a runtime error loading the shader.
flutter run -d chrome --web-renderer canvaskit
With Flutter 3.13.0: see screenshot
With Flutter 3.19.0-0.2.pre: exception (see logs)
3.19.0-0.2.pre compiled for web throws in some stack trace checking if the shader is a
typeof string
when its anobject
.Code sample
none
Screenshots or Video
Screenshots / Video demonstration
Logs
Logs
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: