Repository navigation
[impeller]: superellipse crash in the engine on iOS simulator. #176894
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: fatal crashCrashes that terminate the processCrashes that terminate the processe: 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.37Found to occur in 3.37Found to occur in 3.37has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyiOS 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
Steps to reproduce
- Run the sample code
- After a few iterations, the app crashes
Note: only tried on iOS simulator (iPhone 16/iOS 18.0). Happens on both stable (3.35.3), and master (3.37.0-1.0.pre-420)
Expected results
No crash
Actual results
A crash occurs. Logs seem to indicate something in impeller::DrawCircularArc. Sometimes it crashes on the main thread thread, but the raster thread is always parked at that method.
Here's a sample full error log: https://gist.github.com/kekland/161f4d2c2b19193c4d65c2c9a87291da
Code sample
Screenshots or Video
Screenshots / Video demonstration
Screen.Recording.2025-10-12.at.17.38.58.mov
Logs
Logs
Just launching through flutter run in VSCode.
Flutter Doctor output
Doctor output
[✓] Flutter (Channel master, 3.37.0-1.0.pre-420, on macOS 15.0.1 24A348 darwin-arm64, locale en-US) [2.3s]
• Flutter version 3.37.0-1.0.pre-420 on channel master at /Users/kekland/fvm/versions/master
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b95ab963a4 (6 days ago), 2025-10-06 03:11:29 -0400
• Engine revision b95ab963a4
• Dart version 3.10.0 (build 3.10.0-285.0.dev)
• DevTools version 2.50.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop,
enable-android, enable-ios, cli-animations, enable-native-assets, enable-swift-package-manager,
omit-legacy-version-file, enable-lldb-debugging
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc4) [995ms]
• Android SDK at /Users/kekland/Library/Android/sdk
• Emulator version 35.5.10.0 (build_id 13402964) (CL:N/A)
• Platform android-36, build-tools 35.0.0-rc4
• ANDROID_HOME = /Users/kekland/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/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 21.0.6+-13391695-b895.109)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0) [679ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [4ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Connected device (3 available) [6.0s]
• iPhone 16 (mobile) • C9A53EC2-8D4F-4D3F-9E0E-DCB232768D46 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-18-0 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 15.0.1 24A348
darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome
141.0.7390.66
[✓] Network resources [457ms]
• All expected network resources are available.
• No issues found!Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: fatal crashCrashes that terminate the processCrashes that terminate the processe: 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.37Found to occur in 3.37Found to occur in 3.37has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyiOS 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
darshankawar commentedon Oct 13, 2025
crash log
[-]Weird superellipse crash in the engine[/-][+][impeller]: superellipse crash in the engine on iOS simulator.[/+]darshankawar commentedon Oct 13, 2025
Thanks for the report. This only seems to occur in iOS simulator, as I tried the same with physical device in which the code ran properly without throwing any errors or crash.
21 remaining items
chinmaygarde commentedon Oct 13, 2025
Triage: @jason-simmons is going to take a stab at this. Perhaps @dkwingsmt has an idea too.
dkwingsmt commentedon Oct 13, 2025
I took a brief look at the
DrawCircularArc. The only thing I can suspect immediately is an out-of-bound access atPoint* output. I'll let jason handle the investigation, but I'm happy to help with anything.jason-simmons commentedon Oct 14, 2025
This is crashing in a case in where:
RoundSuperellipseParamcallsComputeQuadrantwith acornerand acenterthat have equal values in one of the dimensionsComputeQuadrantthen has acorner_vectorwhere one of the coordinates is zeroComputeOctantwhere theaparameter is zeroComputeOctantoutputs likecircle_max_angleto be calculated as NaNEventually
DrawCircularArcreceives the NaN, and its loop runs forever and goes out of bounds when writing points.@dkwingsmt Not sure how best to handle this. Would it work to have
ComputeOctantapply a special case for a zeroavalue similar to how it handles a zeroradius?dkwingsmt commentedon Oct 14, 2025
I'm taking a look! Thanks for the investigation.
Fix RoundedSuperellipse crashes for tiny corners (#177070)
Fix RoundedSuperellipse crashes for tiny corners (#177070)
github-actions commentedon Nov 11, 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.Fix RoundedSuperellipse crashes for tiny corners (flutter#177070)
Fix RoundedSuperellipse crashes for tiny corners (#177070)