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

Lamp demo crashes with GL errors #23960

Closed
asajeffrey opened this issue Aug 13, 2019 · 4 comments · Fixed by #24111
Closed

Lamp demo crashes with GL errors #23960

asajeffrey opened this issue Aug 13, 2019 · 4 comments · Fixed by #24111
Labels
A-content/webgl 3d canvas API I-panic Servo encounters a panic.

Comments

@asajeffrey
Copy link
Member

https://www.joshmatthews.net/demos/lamp.html fails with GL errors.

On MacOS:

2019-08-13T15:19:29Z ERROR canvas::webgl_thread] Last GL operation failed: CreateVertexArray(WebGLSender(..))
assertion failed: `(left == right)`
  left: `1282`,
 right: `0`: Unexpected WebGL error: 0x502 (1282) (thread WebGL thread, at components/canvas/webgl_thread.rs:1566)
stack backtrace:
   0: __ZN9backtrace9backtrace5trace17hb2e1a993483438edE (0x1073f39db)
   1: __ZN9backtrace7capture9Backtrace3new17h44e3130a04525300E (0x1073f2bc7)
   2: __ZN5servo4main28_$u7b$$u7b$closure$u7d$$u7d$17h7f02304ba1b3d571E (0x1044d8a9e)
   3: __ZN3std9panicking20rust_panic_with_hook17hd74f2a8d2e16645eE (0x107564b20)
   4: __ZN3std9panicking18continue_panic_fmt17h1403da195dda2b33E (0x10756457c)
   5: __ZN3std9panicking15begin_panic_fmt17h32eb68a68805b61eE (0x1075644d0)
   6: __ZN6canvas12webgl_thread9WebGLImpl5apply17h4273e47cb4e2e84bE (0x106c8684a)
   7: __ZN6canvas12webgl_thread11WebGLThread10handle_msg17hf03fedcc7b921b75E.llvm.13527655942091432055 (0x106c7cfbb)
   8: __ZN6canvas12webgl_thread11WebGLThread7process17he56ae56dc1f124fdE (0x106c7b9b7)
   9: __ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h69b252f995c89da8E (0x106c6023c)
  10: __ZN3std9panicking3try7do_call17h954bfa73bd54e4afE.llvm.7882251710829835445 (0x106d12311)
  11: ___rust_maybe_catch_panic (0x10756ce9e)
  12: __ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h5a9052ecdec8ca10E (0x106cdfdd4)
  13: __ZN83_$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$9call_once17h96c14a1408a74534E (0x10755420d)
  14: __ZN3std3sys4unix6thread6Thread3new12thread_start17h4fa68360d5b30757E (0x10756c3cd)
  15: __pthread_body (0x7fff5f5312ea)
  16: __pthread_start (0x7fff5f534248)
[2019-08-13T15:19:29Z ERROR servo] assertion failed: `(left == right)`
  left: `1282`,
 right: `0`: Unexpected WebGL error: 0x502 (1282)

on ML1:

08-13 10:15:14.583 12026    19 E NoTag   : Last GL operation failed: Clear(16384)
08-13 10:15:14.583 12026     5 I NoTag   : thread 'WebGL thread' panicked at 'assertion failed: `(left == right)`
08-13 10:15:14.583 12026     5 I NoTag   :   left: `1286`,
08-13 10:15:14.583 12026     5 I NoTag   :  right: `0`: Unexpected WebGL error: 0x506 (1286)', components/canvas/webgl_thread.rs:1566:9
@asajeffrey asajeffrey added I-panic Servo encounters a panic. A-content/webgl 3d canvas API labels Aug 13, 2019
@jdm
Copy link
Member

jdm commented Aug 29, 2019

On macOS that's INVALID_OPERATION, on ML1 that's INVALID_FRAMEBUFFER_OPERATION.

@jdm
Copy link
Member

jdm commented Aug 30, 2019

bors-servo pushed a commit that referenced this issue Aug 30, 2019
webgl: Support vertex array objects on macOS.

Depends on servo/gleam#199.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23960

<!-- 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/24111)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Aug 30, 2019
webgl: Support vertex array objects on macOS.

Depends on servo/gleam#199.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23960

<!-- 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/24111)
<!-- Reviewable:end -->
@jdm
Copy link
Member

jdm commented Aug 30, 2019

Forked the magic leap error to #24112 since it won't be solved by #24111.

@asajeffrey
Copy link
Member Author

Sigh. Computers.

bors-servo pushed a commit to servo/gleam that referenced this issue Aug 30, 2019
Expose vertex array object extension API

This is needed in order to solve servo/servo#23960. There's no way to transparently fall back to the APPLE method from the existing API because they are loaded in non-legacy GL contexts on macOS but point to the very unhelpful glInvalidFunction API and cause a crash.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/gleam/199)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/webgl 3d canvas API I-panic Servo encounters a panic.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants