-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Apps running with CanvasKit that animate/redraw often seem to crash after a few minutes.
flutter run --release --dart-define=FLUTTER_WEB_USE_SKIA=true -d chrome
Let it run untouched, after 5-10 minutes it'll spew the console with warnings and the app will crash with a white (empty) screen:
This is similar to #52447.
If you let that example above run multiple times, you'll see that it randomly crashes in a few different areas, making it seem like a general instability/corruption that occurs. Usually related to text (either paragraph.layout or calling CanvasKit's ParagraphBuilder.Make).
Out of curiosity, I let a basic CanvasKit fiddle (no flutter) run for a while. It took considerably longer (almost an hour) but it eventually also threw an error (with no interaction), which is why I'm wondering if this is an underlying lower-level issue with web assembled Skia:

CanvasKit fiddle is here:
https://jsfiddle.skia.org/canvaskit/56cb197c724dfdfad0c3d8133d4fcab587e4c4e7f31576e62c17251637d3745c
If you dig further into that stack, you'll see it also blew up when doing something text-related (when drawing a paragraph):

Tried on both master and dev, currently on dev:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, 1.19.0-0.0.pre, on Mac OS X 10.15.4 19E287, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] Connected device (3 available)
• No issues found!
