immersive-web / webxr-polyfill

Use the WebXR Device API today, providing fallbacks to native WebVR 1.1 and Cardboard
Apache License 2.0
378 stars 84 forks source link

Framebuffer deleted before attempting to bind #149

Open stalgiag opened 4 years ago

stalgiag commented 4 years ago

Hi! Thanks for all of the hard work!

I am having an issue when version 2.0.3 is injected with a very basic example. Note that this error doesn't pop up when running in a browser that doesn't require polyfilling.

Here is the error message: WebGL warning: bindFramebuffer: Object 'fb' is already deleted.

This originates with my call to this.gl.bindFramebuffer(); and seems to be triggered at the self.realBindFramebuffer.call() calls in both CardboardDistorter.prototype.submitFrame and CardboardDistorter.prototype.patch.

I am using the default config for the polyfill. Any help would be greatly appreciated!

jsantell commented 4 years ago

Thanks for filing an issue @stalgiag; do you have a link to reproduce this error?

stalgiag commented 4 years ago

This link works in Chrome 83 for Android; but not in older versions of Chrome or any version of Firefox. It also does not work with iOS but I don't have a good way to debug to say for certain it is the same error message.

Note that there may be a DPDB warning (dependent on device). This has never been breaking before, so I assume this isn't the problem. Also this link worked with the older version of the polyfill with both Chrome and Firefox on Android and iOS.

Thank you for the help!

stalgiag commented 4 years ago

This might be more helpful. Here is another test that does not have any code of my own. This is the current Immersive Web Immersive VR test with the most recent build of this polyfill loaded behind a navigator.xr check instead of a url flag. I am seeing the same behavior on firefox for android and chrome+firefox for android. Whereas with past versions of the polyfill this example worked.

Thank you for all of the help!