Search Unity

Chrome 53 breaks raycasting in WebGL?

Discussion in 'WebGL' started by sirrus, Sep 6, 2016.

  1. sirrus

    sirrus

    Joined:
    Jun 10, 2012
    Posts:
    250
    So... many of our players just updated to Chrome (chromium) v53.x and now much of our core game functionality is simply not working. The game loads fine but mouse interactions and other functions simply don't work.

    I tried Google Chrome Canary which is currently using v55.x and that works fine.

    Is anyone else experiencing issues with the latest stable Chrome release?
     
  2. sirrus

    sirrus

    Joined:
    Jun 10, 2012
    Posts:
    250
    Just to note:

    Using Unity 5.3.5f1 (production) and 5.3.5p5 (development). No errors or warnings in console logs.
     
  3. sirrus

    sirrus

    Joined:
    Jun 10, 2012
    Posts:
    250
    FWIW, something seems to be causing raycasts to be invalid (i.e, .direction = (NaN, NaN, NaN)). We're trying to isolate what is specifically causing it in code but Chrome 53 is definitely the culprit.
     
  4. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,633
    This sounds like a bug in Chrome's JavaScript engine, causing it to evaluate math incorrectly. It definitely sounds like something you should file a bug report for with Google, to make them aware of the issue.
     
  5. sirrus

    sirrus

    Joined:
    Jun 10, 2012
    Posts:
    250
    I have done this through the Chrome bug reporter. Is there somewhere else I should provide info to Google?

    Im also working on a repro project to submit to Unity. Will that be helpful at all?
     
  6. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,633
    Do you have a link? We could ping the right people at Google.
    (I report Chrome bugs here: https://bugs.chromium.org/p/chromium/issues/entry - I'm not sure if the Chrome bug reporter goes to the same place?). Be sure to specify that it is a regression and from where.

    Probably not much - most likely we'd end up opening a bug report at Google ourselves for that.
     
  7. sirrus

    sirrus

    Joined:
    Jun 10, 2012
    Posts:
    250
    Here's an example project where the issue is occurring:

    http://a.gardenacres.com.s3.amazonaws.com/webgl/ChromeBug.2/index.html

    The app simply performs a Camera.main.ScreenPointToRay(Input.mousePosition) each time the button is clicked. The resulting ray data is printed in the blue box.

    After a few clicks in Google Chrome v53.x you will notice that the direction data on the ray output is bogus. Works fine in Firefox (and other version of Chrome).

    This is kind of a critical issue for us as it renders our game unusable for anyone using that version of Chrome.
     
  8. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    460
    Working fine for me on canary 55.0.2853.0 , maybe a fixe is coming?
     
  9. sirrus

    sirrus

    Joined:
    Jun 10, 2012
    Posts:
    250
  10. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    460
    Sound so bad, they force us to switch on WebGL and they are not able to have something working on their web browser ..... Thank Google .....
     
  11. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,633
  12. sirrus

    sirrus

    Joined:
    Jun 10, 2012
    Posts:
    250
  13. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,633
    Thanks - I forwarded this to my contact at Google.
     
    sirrus likes this.
  14. sirrus

    sirrus

    Joined:
    Jun 10, 2012
    Posts:
    250
    Thanks Jonas, I appreciate that very much!
     
  15. azolla

    azolla

    Joined:
    Apr 8, 2016
    Posts:
    2
    Hello everyone, I am a member of Home3D team. we created a cloud platform that lets you create, customize and share plans. (www.planimetrie3d.com)

    Now we have a similar problem to "Sirrus" or some way related to mathematics. In fact, with the latest version of Chrome V53 we encounter this problem for Windows PC only: When the character controller hit the ground, the camera flicker, and after passes through the ground.

    Here I propose a demo that reproduces the problem, which occurs only on Chrome installed on Windows no with other browsers, which can be reached via the following link:

    www.planimetrie3d.com/chromepcbug

    We appreciate every clue helps everyone.
     
  16. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,633
    So, it looks like Google has bisected the problem to a specific change, and they are planning to release a patch for the issue in the next 53 dot release.
     
    sirrus likes this.
  17. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,633
    Can you verify if the problem is specific to Chrome 53, and will not happen in older or newer versions? If yes, it is likely the same. You could also submit a comment to the Chromium bug report at https://bugs.chromium.org/p/chromium/issues/detail?id=644742 to have Google take a look.
     
  18. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,633
    In general, it is very advisable to regularly test your content on upcoming browser versions, to be able to catch regressions like these before they ship.
     
  19. sirrus

    sirrus

    Joined:
    Jun 10, 2012
    Posts:
    250
  20. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,633
    Yes, Google reacted very fast on this one (once they had the bug report from you!), and got the patch into the next 53 dot-dot release.
     
unityunity