Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GL error on android for Going Home #21763

Closed
jdm opened this issue Sep 20, 2018 · 5 comments
Closed

GL error on android for Going Home #21763

jdm opened this issue Sep 20, 2018 · 5 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Sep 20, 2018

http://goinghome.302chanwoo.com/

On android there's a panic from an unexpected GL error, then libunwind segfaults while handling the panic.

@jdm
Copy link
Member Author

@jdm jdm commented Sep 20, 2018

There is no GL error on mac desktop, only:

ERROR 2018-09-20T17:20:34Z: script::dom::bindings::error: Error at http://goinghome.302chanwoo.com/build/script.js?v=180618:131:22289 b.style is undefined
ERROR 2018-09-20T17:20:34Z: script::dom::bindings::error: Error at http://goinghome.302chanwoo.com/:167:12 CW is not a constructor
@jdm
Copy link
Member Author

@jdm jdm commented Sep 21, 2018

The plot thickens - when I build with the NDK15c to avoid the libunwind segfault, I hit a panic when a WebGLTexture object is GCed and the WebGL thread no longer exists.

@jdm
Copy link
Member Author

@jdm jdm commented Sep 21, 2018

The underlying GC error is reproducible with the following page:

<canvas id="c"></canvas>
<script>
var c = document.getElementById('c');
var gl = c.getContext('webgl');
var r = gl.createRenderbuffer();
gl.bindRenderbuffer(gl.RENDERBUFFER, r);
console.log(gl.getError());
gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, 1024, 1024);
console.log(gl.getError());
</script>
@jdm
Copy link
Member Author

@jdm jdm commented Sep 21, 2018

It appears that the GL drivers don't like the DEPTH_STENCIL format.

@jdm
Copy link
Member Author

@jdm jdm commented Sep 21, 2018

I suspect that Gecko internally uses DEPTH24_STENCIL8 in place of DEPTH_STENCIL, per https://searchfox.org/mozilla-central/source/dom/canvas/WebGLFormats.cpp#822-823.

@jdm jdm mentioned this issue Sep 21, 2018
4 of 4 tasks complete
bors-servo added a commit that referenced this issue Sep 21, 2018
Use standard buffer format for DEPTH_STENCIL

This makes the Going Home title display for me on my Pixel 2.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21763
- [x] There are tests for these changes
bors-servo added a commit that referenced this issue Sep 23, 2018
Use standard buffer format for DEPTH_STENCIL

This makes the Going Home title display for me on my Pixel 2.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21763
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21784)
<!-- Reviewable:end -->
@atouchet atouchet added this to Done in WebGL content Sep 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
WebGL content
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant
You can’t perform that action at this time.