Repository navigation
[Impeller]Impeller errors appear when app opens:Break on 'ImpellerValidationBreak' to inspect point of failure: Could not find glyph position in the atlas. #164606
Copy link
Copy link
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: regressionIt was better in the past than it is nowIt was better in the past than it is nowe: 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.from: manual-qaIssue caught from manual QA processIssue caught from manual QA processr: 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
Steps to reproduce
- Install and run Wonderous app on Android and iOS, my devices are:
Pixel 7, Android 15andiPhone 16 Pro Max (iOS 18.3.1). - Home page/screen will appear (since the second time open app), and observe Impeller errors appear from the run output log. If you swipe pages, more same errors may appear.
Observing this issue on Flutter master channel 3.30.0-1.0.pre.448while I don't see it on stable 3.29.0.
Expected results
No error appear
Actual results
Multiple same errors are printed out as shared in Logs section.
Code sample
Screenshots or Video
Screenshots / Video demonstration
Screen.Recording.2025-03-05.at.14.35.06.mov
Logs
Logs
Connecting to VM Service at ws://127.0.0.1:58613/UshQ4FN6TyY=/ws
Connected to the VM Service.
flutter: bootstrap start...
flutter: Navigate to: /
flutter: Saving...
flutter: setting discoveredCount for home widget 2
flutter: Navigate to: /home
11
[ERROR:flutter/impeller/entity/contents/text_contents.cc(161)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not find glyph position in the atlas.
2
flutter: Saving...
19
[ERROR:flutter/impeller/entity/contents/text_contents.cc(161)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not find glyph position in the atlas.
2
flutter: Saving...
24
[ERROR:flutter/impeller/entity/contents/text_contents.cc(161)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not find glyph position in the atlas.Flutter Doctor output
Doctor output
[!] Flutter (Channel master, 3.30.0-1.0.pre.448, on macOS 15.3.1 24D70 darwin-x64, locale en-VN) [4.1s]
• Flutter version 3.30.0-1.0.pre.448 on channel master at /Users/huynq/Documents/GitHub/flutter_master
! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 24418d0d80 (2 hours ago), 2025-03-04 00:04:22 -0500
• Engine revision 24418d0d80
• Dart version 3.8.0 (build 3.8.0-133.0.dev)
• DevTools version 2.43.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.
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1) [4.5s]
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-35, build-tools 35.0.1
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This JDK is specified in your Flutter configuration.
To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.2) [1,828ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16C5032a
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [27ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.3) [25ms]
• 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
• android-studio-dir = /Applications/Android Studio.app
• Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29)
[✓] VS Code (version 1.97.2) [23ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.106.0
[✓] Connected device (4 available) [7.2s]
• Pixel 7 (mobile) • 2B171FDH20084L • android-arm64 • Android 15 (API 35)
• iPhone 16 pro max (wireless) (mobile) • 00008140-00194CC23A68801C • ios • iOS 18.3.1 22D72
• macOS (desktop) • macos • darwin-x64 • macOS 15.3.1 24D70 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 133.0.6943.142
[✓] Network resources [477ms]
• All expected network resources are available.
! Doctor found issues in 1 category.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: regressionIt was better in the past than it is nowIt was better in the past than it is nowe: 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.from: manual-qaIssue caught from manual QA processIssue caught from manual QA processr: 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
Activity
huycozy commentedon Mar 5, 2025
Just detected a similar issue reported recently at #164605. Two different things are:
RaadShariat commentedon Mar 6, 2025
The same issue is happening on Flutter 3.29.1 in the stable channel. The debug console is getting filled with this error:
Doctor results:
RaadShariat commentedon Mar 6, 2025
Could this be prioritized @jonahwilliams ? The issue will prevent certain projects from upgrading to 3.29.1, which includes several important fixes.
gaaclarke commentedon Mar 6, 2025
stacktrace:
gaaclarke commentedon Mar 7, 2025
debugger
The lookup is failing from the subpixel differences. This could be because the FontGlyphAtlas was loaded incorrectly, or we are grabbing the wrong FontGlyphAtlas since querying it depends on the
rounded_scalekey.TextFrame::ComputeSubpixelPositionusageTextFrame::ComputeSubpixelPositionis called twice, once when filling the glyph atlas and once when reading from the glyph atlas and they are returning different values for some reason. In testing here are the stack traces for loading glyphs vs using themloading
using
gaaclarke commentedon Mar 8, 2025
This is really tricky since it seems to be a race condition. If I put in a lot of tracing I'll stop being able to reproduce the bug. Here is one log that shows what's going on:
So, this is in the span of one
SetPerFrameData(I hate stateful stuff like this for this exact reason). Glyph 584 is getting added at subpixel position 1 for scale 481/200. Then later we are looking up glyph 584 with subpixel position 0 for that same scale.I've printed out the 2 matrices that are used to call
TextFrame::ComputeSubpixelPosition. We can see that the offsets differ for some reason.[Impeller] Workaround for mismatched transform in preroll vs paint fo…
Switched the font atlas to discrete math for hash keys (#164822)
[CP] fix missing glyph error. (#165055)
github-actions commentedon Mar 25, 2025
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
flutter doctor -vand a minimal reproduction of the issue.[Impeller] Workaround for mismatched transform in preroll vs paint fo…
Switched the font atlas to discrete math for hash keys (flutter#164822)