You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash if you reuse a PictureRecorder or Canvas #2531
import'dart:ui';
voidmain() {
Rect bounds =newRect.fromLTWH(0.0, 0.0, 1.0, 1.0);
PictureRecorder recorder =newPictureRecorder();
Canvas c1 =newCanvas(recorder, bounds);
c1.save();
Picture p1 = recorder.endRecording();
c1.restore(); // should throw here, currently crash here
}
That second one is actually pretty serious since it's one you'll run into if you forget to make your render object composited, which is an easy error to make.
We should probably address both of these so that people experimenting with layers don't accidentally crash the engine.
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 -v and a minimal reproduction of the issue.
Activity
Hixie commentedon Mar 9, 2016
(Also I'd expect isRecording to throw in that case too.)Hixie commentedon Jun 12, 2017
I just ran into a similar crash:
That second one is actually pretty serious since it's one you'll run into if you forget to make your render object composited, which is an easy error to make.
We should probably address both of these so that people experimenting with layers don't accidentally crash the engine.
[-]Crash if you reuse a PictureRecorder[/-][+]Crash if you reuse a PictureRecorder or Canvas[/+]Hixie commentedon Jun 15, 2017
https://fuchsia-review.googlesource.com/c/34829/Hixie commentedon Jun 22, 2017
https://fuchsia-review.googlesource.com/c/35742/
github-actions commentedon Aug 17, 2021
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.