dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.26k stars 1.58k forks source link

Calls to window.requestLayoutFrame() sometimes shows javascript console message 'Uncaught TypeError: Cannot read property 'length' of null' #783

Closed DartBot closed 9 years ago

DartBot commented 12 years ago

This issue was originally filed by prujoh...@gmail.com


What steps will reproduce the problem? I think it has to do when making multiple calls to window.requestLayoutFrame under certain circumstances. I must confess I can reproduce this in my own code, but have been unable to isolate it to a simple example.

What is the expected output? What do you see instead? Everything renders fine on the browser, but the javascript console displays this message: Uncaught TypeError: Cannot read property 'length' of null _completeMeasurementFutures _maybeScheduleMeasurementFrame.$globals._firstMeasurementRequest wrapped

Digging in to the javascript itself I see that it's happening here when $globals._pendingRequests returns null in this function:

function _completeMeasurementFutures() {   if ($eq($globals._nextMeasurementFrameScheduled, false)) {     return;   }   $globals._nextMeasurementFrameScheduled = false;   var $list = $globals._pendingRequests;   for (var $i = 0;$i < $list.length; $i++) { //LUCA_UI_Demo.dart.app.js:3983 Uncaught TypeError: Cannot read //property 'length' of null     var request = $list.$index($i);     try {       request.value = request.computeValue();     } catch (e) {       e = _toDartException(e);       request.value = e;       request.exception = true;     }   }

What version of the product are you using? On what operating system? frog, Ubuntu

Please provide any additional information below.

DartBot commented 12 years ago

This comment was originally written by drfibonacci@google.com


Added Area-Frog, Triaged labels.

dgrove commented 12 years ago

Set owner to @jacob314. Removed Area-Frog label. Added Area-UI label.

dgrove commented 12 years ago

Without repro info, presuming that this has been fixed over the past few months.


Added AssumedStale label.