Closed angelosilvestre closed 12 months ago
I think I prefer the other proposed change, because that change makes it clear what the problem is - there might not be another frame scheduled so we'll end up with a dangling dirty state.
Also, instead of defining a new method, consider overriding markNeedsPaint
if we always want to schedule a frame in such a case.
@matthew-carroll Updated.
@angelosilvestre to remind myself of the status here, we ended up with you doing further investigation into the root cause, right?
@matthew-carroll Yeah, I still need to figure out how to write a failing test using follow_the_leader only.
@matthew-carroll As discussed, I modified this PR to only schedule a new frame when running in a test on Linux.
Schedule a frame after markNeedsPaint is called
Currently, we are calling
markNeedsPaint
directly when the follower layer transform changes.This is causing some
super_editor
golden tests to fail due to a crash in thecaptureImage
method called bymatchesGoldenFile
. This is the test failure output:This is the method that causes the crash:
An example of a failing test:
As an experiment, I tried to add
await tester.pumpAndSettle();
in the test before theexpectLater
, but the exception still happens.For some reason, the crash doesn't happen on mac.
This PR overrides
markNeedsPaint
to schedule a new frame.