Repository navigation
[Android][Impeller/Vulkan][vector_graphics / flutter_svg] — Rendering corruption and crashes after upgrading to Flutter 3.35.4 #177380
Copy link
Copy link
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: fatal crashCrashes that terminate the processCrashes that terminate the processc: 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.found in release: 3.35Found to occur in 3.35Found to occur in 3.35found in release: 3.38Found to occur in 3.38Found to occur in 3.38has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: flutter_svgThe Flutter SVG drawing packagesThe Flutter SVG drawing packagesp: vector_graphicsThe vector_graphics package setThe vector_graphics package setpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: 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
Overview
After upgrading from Flutter 3.24.0 to Flutter 3.35.4, several previously working SVG assets now render incorrectly or cause crashes on specific Android devices. On Flutter 3.24.0, all SVGs displayed properly without corruption. However, on 3.35.4, certain SVGs become broken, while others cause the app to crash silently (no log output). This issue is particularly severe on Redmi Note 11, where displaying large or complex SVG/VG assets leads to consistent crashes.
Steps to reproduce
- Use the same SVG/VG assets that rendered fine in Flutter 3.24.0.
- Upgrade the project to Flutter 3.35.4.
- Display the assets in a simple widget tree, such as a
GridVieworListViewwith multiple vector items. - Run on Redmi Note 11 with Impeller enabled.
Result:
- App crashes or assets render broken.
- Disabling Impeller (
--no-enable-impeller) prevents crashes but does not fully fix rendering corruption.
Expected results
- SVG and VG assets should render correctly and consistently across Flutter versions.
- Rendering should not crash on any supported Android device when using Impeller.
- Visual output should remain identical across all devices and GPU vendors, ensuring consistent rendering quality regardless of hardware differences.
Actual results
- Many SVG/VG assets appear broken or fail to render on Flutter 3.35.4.
- Crashes occur silently (no log output) on specific devices, especially Redmi Note 11.
- Performance lag is noticeable when rendering multiple vector assets.
Code sample
Code sample
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:vector_graphics/vector_graphics.dart';
void main() => runApp(const CompareApp());
class CompareApp extends StatelessWidget {
const CompareApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: const ComparePage(),
theme: ThemeData(useMaterial3: true),
);
}
}
class ComparePage extends StatelessWidget {
const ComparePage({super.key});
@override
Widget build(BuildContext context) {
final items = const [
('env_dog1.svg', _Renderer.svg),
('env_dog1.vg.bin', _Renderer.vg),
('rectangle_4433.svg', _Renderer.svg),
('rectangle_4433.vg.bin', _Renderer.vg),
];
return Scaffold(
appBar: AppBar(
title: const Text('SVG vs VG comparison'),
bottom: PreferredSize(
preferredSize: const Size.fromHeight(36),
child: Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Text(
'Run with: flutter run --enable-impeller and --no-enable-impeller',
style: Theme.of(context).textTheme.labelSmall,
),
),
),
),
body: GridView.builder(
padding: const EdgeInsets.all(16),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
mainAxisSpacing: 16,
crossAxisSpacing: 16,
childAspectRatio: 1,
),
itemCount: items.length,
itemBuilder: (_, i) {
final (path, type) = items[i];
return _VectorTile(path: 'assets/$path', type: type);
},
),
);
}
}
enum _Renderer { svg, vg }
class _VectorTile extends StatelessWidget {
const _VectorTile({required this.path, required this.type});
final String path;
final _Renderer type;
@override
Widget build(BuildContext context) {
return Card(
elevation: 1,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Center(
child: AspectRatio(
aspectRatio: 1,
child: switch (type) {
_Renderer.svg => SvgPicture.asset(
path,
width: 220,
height: 220,
fit: BoxFit.contain,
clipBehavior: Clip.none,
placeholderBuilder: (_) => const CircularProgressIndicator(),
errorBuilder: (_, __, ___) => const DecoratedBox(
decoration: BoxDecoration(color: Color(0x11000000)),
child: Center(child: Text('SVG error')),
),
),
_Renderer.vg => VectorGraphic(
loader: AssetBytesLoader(path),
width: 220,
height: 220,
clipViewBox: false,
),
},
),
),
),
const SizedBox(height: 8),
Text(
path.split('/').last,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.labelMedium,
),
Text(
type.name.toUpperCase(),
style: Theme.of(context).textTheme.labelSmall,
),
],
),
),
);
}
}Sample Assets
svg_vg_repro_assets.zip
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
No response
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.35.4, on Microsoft Windows [Version 10.0.26100.6899], locale en-ID) [510ms]
• Flutter version 3.35.4 on channel stable at D:\src\flutter\fvm\versions\3.35.4
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision d693b4b9db (5 weeks ago), 2025-09-16 14:27:41 +0000
• Engine revision c298091351
• Dart version 3.9.2
• DevTools version 2.48.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations,
enable-lldb-debugging
[✓] Windows Version (11 Home Single Language 64-bit, 24H2, 2009) [1,577ms]
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [3.1s]
• Android SDK at D:\src\android\Sdk
• Emulator version 35.4.9.0 (build_id 13025442) (CL:N/A)
• Platform android-36, build-tools 36.0.0
• Java binary at: D:\src\Apps\Android\jbr\bin\java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
• All Android licenses accepted.
[✓] Chrome - develop for the web [170ms]
• Chrome at C:\Users\HP\AppData\Local\Google\Chrome\Application\chrome.exe
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.14.11) [168ms]
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.14.36401.2
• Windows 10 SDK version 10.0.26100.0
[✓] Android Studio (version 2024.1) [52ms]
• Android Studio at D:\src\Apps\Android
• 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 = D:\src\Apps\Android
• Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
[✓] IntelliJ IDEA Community Edition (version 2023.2) [49ms]
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.2.2
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin version 232.9559.10
[✓] VS Code (version 1.105.1) [15ms]
• VS Code at C:\Users\HP\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.120.0
[✓] Connected device (4 available) [756ms]
• 2201117TY (mobile) • ac548bae • android-arm64 • Android 13 (API 33)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26100.6899]
• Chrome (web) • chrome • web-javascript • Google Chrome 141.0.7390.122
• Edge (web) • edge • web-javascript • Microsoft Edge 141.0.3537.71
[✓] Network resources [690ms]
• All expected network resources are available.
• No issues found!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: fatal crashCrashes that terminate the processCrashes that terminate the processc: 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.found in release: 3.35Found to occur in 3.35Found to occur in 3.35found in release: 3.38Found to occur in 3.38Found to occur in 3.38has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: flutter_svgThe Flutter SVG drawing packagesThe Flutter SVG drawing packagesp: vector_graphicsThe vector_graphics package setThe vector_graphics package setpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: 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 Oct 23, 2025
Thanks for the report. I'm also able to reproduce the issue on the latest Flutter stable and master channels. Tested on Realme 6, Android 11.
package versions
Flutter versions (stable and master)
jason-simmons commentedon Oct 23, 2025
Reproduced this on a Samsung Galaxy A02s (Adreno 506 GPU) using the Impeller Vulkan back end.
The app renders as expected with the GLES back end.
The Vulkan back end will submit hundreds of command buffers while rendering the assets in this app. While this is happening, the
MemAvailablevalue in/proc/meminfocontinually decreases.The Android low memory killer daemon will eventually kill the app process when available memory goes below a threshold.
4 remaining items
chinmaygarde commentedon Oct 27, 2025
As a policy, I think we should try to avoid rescuing Vulkan support using increasingly egregious workarounds. Our GLES backend is easier to reason about on older devices. We should document the consequences of removing the
WorkaroundsVK::input_attachment_self_dependency_brokenand attempt to remove it and favor the OpenGL fallback.[Impeller] Fall back to OpenGL ES on older Adreno GPUs
[Impeller] Fall back to OpenGL ES on older Adreno GPUs
[Impeller] Fall back to OpenGL ES on older Adreno GPUs (#177747)
ziii08 commentedon Oct 31, 2025
Thanks for the Vulkan fallback fix — it works perfectly on my Redmi Note 11 (Adreno 610).
SVG rendering is now smooth and stable (no lag or crash). However, a few SVG assets still appear visually broken under Impeller-OpenGL ES — these rendered fine on Flutter 3.24.0, so it seems to be a rendering difference with Impeller.
I also noticed that the app can still crash when rendering some VG assets. Unlike before, there are now several driver logs printed right before the crash. I’ve attached the output below for reference:
log output
Flutter Doctor output
Doctor output
Let me know if a new issue would be better — happy to provide repro assets or an APK.
jason-simmons commentedon Oct 31, 2025
Please file a new issue with the assets that reproduce the problem.
ziii08 commentedon Nov 1, 2025
I’ve opened a follow-up issue with detailed reproduction steps, test assets, and video recordings:
👉 #177873
The new report covers SVG and VG rendering results across different GPUs
Please let me know if there’s anything else I can check or provide.
github-actions commentedon Nov 15, 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] Fall back to OpenGL ES on older Adreno GPUs (flutter#177747)
[Impeller] Fall back to OpenGL ES on older Adreno GPUs (#177747)