-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-dart2wasmIssues for the dart2wasm compiler.Issues for the dart2wasm compiler.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
TL;DR I suspect a defect in the implementation of the addTimer code:
sdk/pkg/dart2wasm/bin/run_wasm.js
Line 145 in f53c758
| if (ms == 0 && !isNextTimerDue()) { |
It is connected with isNextTimerDue logic: when ms == 0 and isNextTimerDue() == true, the Task.run may create two separate entries in the timerHeap (in comparison with isNextTimerDue() == false, they will be just added to zeroTimerQueue) when engine runs slow.
The flute engine produces timers with the following cadence: 16 0 0 16 0 0 .. in the scheduleFrame. The defect above causing dart benchmark to fail "Null check operator used on a null value" because the draw frame can be executed out of sequence with corresponding begin frame.
I'm temporary patching it with:
if (ms == 0){
if (!isNextTimerDue()) {
zeroTimerQueue.push(f);
} else {
timerHeap[0].push(f); // keeps Timer.run together
}
} else {Metadata
Metadata
Assignees
Labels
area-dart2wasmIssues for the dart2wasm compiler.Issues for the dart2wasm compiler.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)