New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 591063 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Javascript execution is non-deterministic

Reported by eno...@onshape.com, Mar 1 2016

Issue description

Chrome Version       : Version 50.0.2660.3 canary (64-bit) on OSX
URLs (if applicable) :  https://cad.onshape.com
Other browsers tested:
  Chrome 48: OK
  Safari: OK
  Firefox: OK

What steps will reproduce the problem?
1.  Navigate to:  https://cad.onshape.com/documents/be88cf3dfb120bfc31066502/w/f4f54147163b49be00f6ab81/e/d07d9b751f0eccf330d24c1d
2.  Sign in with an account you have created, or contact bug author for credentials
3.  Once document is open, click on the version button (see "Versions Button.png" for location)
4.  Open the javascript console
5.  Observe that errors are logged (See "JS Error.png" for example)
6.  Observe that the UI is sporadically non-functional


What is the expected result?
It is expected that no error should appear.  In all other browsers and versions of Chrome the code executes successfully.


What happens instead?
The code fails.  The code in question is a usage of underscore's _.findWhere function, which searches a collection of objects to find one that matches a queried set of properties (see http://underscorejs.org/#findWhere).   In Chrome 50, the method _sometimes_ fails to find a contained object.   

I have not yet been able to discern a pattern of when the method will succeed and when it will fail.  I tried reproducing the problem in isolation, but the code always succeeds.   Stepping through the code with the javascript debugger appears to make the code always succeed.

For what it's worth, the problem is particularly problematic, as it is executed as part of Angular's digest cycle.  So when the code does fail, it can kill the update of the UI.  We can code around it to some extent, but it seems like there could be a serious underlying issue that needs to be addressed.

 
Versions Button.png
119 KB View Download
JS Error.png
38.6 KB View Download
Cc: rnimmagadda@chromium.org
Components: Platform>DevTools
Labels: M-50 Type-Bug-Regression Pri-2 OS-Linux OS-Mac OS-Windows
Owner: schenney@chromium.org
Status: Assigned (was: Unconfirmed)
====================================

Good Build:

50.0.2655.0    Base Position: 376333


Bad Build:

50.0.2656.0    Base Position: 376674

=====================================

Able to repro this issue on Windows 7, MAC (10.11.3) & Ubuntu Trusty (14.04) for the Google Chrome Stable Version - 48.0.2564.116

This is a regression issue broken in M40, below mentioned is the bisect info:

CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/e0512c8bd27962ab3cd16871bec499870f119155..ab1b04b5def5e65a07e85727182ea9fae99c9c50

Suspecting Commit: 46a5c2196e3746c376c1bdf75a8339732cd373b0

Review URL: https://codereview.chromium.org/1675823002

@schenney: Could you please look into the issue, and if it has nothing to do with your changes and if possible please do assign it to the concerned owner.

Thank you.

Cc: -rnimmagadda@chromium.org
Components: Blink>JavaScript>Stability
Owner: rnimmagadda@chromium.org
Status: Untriaged (was: Assigned)
This has to be a V8 roll, or at least something involving JS. My patch just affects how background images are drawn.

The bisect seems bad with high probability. Nothing in the linked range is a likely candidate.

Comment 3 by alph@chromium.org, Mar 8 2016

Cc: alph@chromium.org
Components: -Platform>DevTools
@enowak
Can you try to track it down by inserting something like below to the failing line:
if (!assert_condition) (function() { debugger; })();

And then inspect if the list is in fact contains the object.

Comment 4 by j...@zmags.com, Mar 8 2016

We have been affected by a similar "cannot read property 'x' of undefined" issue, which we also tracked down to underscorejs. Our issue has been resolved now, and I suspect that this specific bug fix did the trick: 

https://bugs.chromium.org/p/chromium/issues/detail?id=590989 (callback function not called any more after called lots of times and in different place.)

Do you still see your issue in latest Chrome Canary?

Comment 5 by eno...@onshape.com, Mar 8 2016

It looks like the issue is resolved in 51.0.2671.0.  Thanks!

(FWIW, I did add a debugger break in the older version.  I found that the property was present in the object, even though the assertion failed.)
Cc: rnimmagadda@chromium.org
Owner: ----
Status: WontFix (was: Untriaged)
Issue found fixed on Windows 7, MAC (10.11.3) & Ubuntu Trusty (14.04) for Google Chrome Canary Version - 51.0.2671.0


591063.mov
2.0 MB Download

Sign in to add a comment