Skip to content

iOS App crashs rendering an SVG icon since flutter 3.22.0 #149309

@quoc-huynh-cosee

Description

@quoc-huynh-cosee

Steps to reproduce

If you run the code I provided on an iOS simulator or a real iOS device, the app crashes due to the SVG icon.
I'm using flutter_svg 2.0.10+1 to render the SVG.
It worked with Flutter version 3.16.9.

Expected results

The iOS app should not crash.

Actual results

The iOS app crashes.

Code sample

Code sample
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(),
        body: Center(
          child: Center(
            child: SvgPicture.string(
              '''
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -0.02 142.4 165.25">
    <g transform="translate(-31.1 -22.9)">
        <path
            d="M61.3,28.4h0M63.1,35H84.4V136.1a55.128,55.128,0,0,1-1.2,11c-2.6,13.1-9.8,21.1-22.5,25.3a73.99,73.99,0,0,1-17.8,3.4V155.5c9.6-1.5,16.3-7.9,17.7-17.3a48.653,48.653,0,0,0,.5-6.5V35h2m0-12H54.9c-4.3,0-5.6,1.4-5.6,5.7v103a24.867,24.867,0,0,1-.4,4.7c-.7,4.6-3.9,7.1-9.3,7.4l-4.5.3c-2.5.3-3.7,1.4-3.9,4-.1.6-.1,34.4-.1,34.4,0,4.3,1.2,5.5,5.4,5.5h.1a92.013,92.013,0,0,0,28.1-4.2c16.8-5.6,27-17,30.5-34.4A66.989,66.989,0,0,0,96.6,136c-.1-12.8,0-25.6,0-38.5V28c0-3.7-1.4-5-5-5.1-.2.1-17.3.1-28.5.1Z" />
    </g>
</svg>''',
            ),
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs

flutter_logs.txt

XCode output

xcode.txt

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.22.1, on macOS 14.5 23F79 darwin-x64, locale de-DE)
    • Flutter version 3.22.1 on channel stable at /Users/huynh/.asdf/installs/flutter/3.22.1-stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (vor 8 Tagen), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynh/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynh/Library/Android/sdk
    • Java binary at: /Users/huynh/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/233.14808.21.2331.11842104/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /Users/huynh/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/233.14808.21.2331.11842104/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.10+0-17.0.10b1087.21-11572160)

[✓] Android Studio (version 2023.3)
    • Android Studio at /Users/huynh/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/233.14808.21.2331.11709847/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.10+0-17.0.10b1087.21-11572160)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.2)
    • IntelliJ at /Users/huynh/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/241.17011.79/IntelliJ IDEA.app
    • 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

[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.1)
    • IntelliJ at /Users/huynh/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/241.15989.150/IntelliJ IDEA.app
    • 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

[✓] VS Code (version 1.89.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.88.0

[✓] Connected device (3 available)            
    • iPhone 15 (mobile) • D96B9332-9BED-437A-A566-44569B5855AA • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • macOS (desktop)    • macos                                • darwin-x64     • macOS 14.5 23F79 darwin-x64
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 125.0.6422.77

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: crashStack traces logged to the consolee: impellerImpeller rendering backend issues and features requestsfound in release: 3.22Found to occur in 3.22platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions