exokitxr / exokit

Native VR/AR/XR engine for JavaScript 🦖
MIT License
997 stars 117 forks source link

JSSandbox Revret not loading #881

Open shawwn opened 5 years ago

shawwn commented 5 years ago

Describe the bug What happened, and what did you expect to happen? Freeze, no freeze

To Reproduce Steps or commands ran to reproduce the behavior:

  1. node . http://jsboxx.sandboxx.org/index.html?revret
  2. Observe the window freezes

Additional context Note that you'll need to save http://jsboxx.sandboxx.org/index.html?revret locally (e.g. using Chrome HAR) and run it via a local server.

System information:

Screenshots If applicable, add screenshots to help explain your problem.

Imagine an application on macOS that creates a window, turns black, then stops responding.

avaer commented 5 years ago

Note that you'll need to save http://jsboxx.sandboxx.org/index.html?revret locally (e.g. using Chrome HAR) and run it via a local server.

Why is that?

shawwn commented 5 years ago

There seems to be a difference in how Chrome downloads assets vs how Exokit downloads them. In short, it's hosted on a server which can't handle the rate at which Exokit downloads the assets.

For some reason, it works in Chrome. Exokit conforms to the spec, so it's not Exokit's fault per se.

If you add a hack into exokit to retry the download of any url that times out, then the example loads fine in exokit (enough to get to the black screen). But that would cause problems in other areas, so obviously that's not something to merge.

One idea is to somehow support modding exokit. There are a lot of one-off mods like that ("just change the downloader to retry, and hey, this site works!") that shouldn't be merged. And as exokit gains popularity, it seems inevitable that some kind of modding scene would spring up. It might be worth thinking about how that could work. Probably not now.

avaer commented 5 years ago

This is probably indeed therefore the single-threaded resource contention issue, and possibly addressed by the parallelization pr.

We should probably fix that before we dive into requiring a locally hosted HAR deployment.

As to modding, let's keep the discussion here to debugging this particular engine/framework. For proposing architectural changes, a PR is a better avenue.