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

Crash in get_or_create_similar_vao_with_offset #160

Closed
paulrouget opened this issue Feb 1, 2016 · 7 comments
Closed

Crash in get_or_create_similar_vao_with_offset #160

paulrouget opened this issue Feb 1, 2016 · 7 comments

Comments

@paulrouget
Copy link
Collaborator

@paulrouget paulrouget commented Feb 1, 2016

This happens regularly. I'm loading github.com in browser.html:

flushing 1 raster batches
drawing triangles due to GL texture cache update
thread '<main>' panicked at 'Didn't find source vertex buffer ID in `get_or_create_similar_vao_with_offset()`!', ../src/libcore/option.rs:298
stack backtrace:
   1:        0x105d362f8 - sys::backtrace::tracing::imp::write::hdd549f07f7745d62xZt
   2:        0x105d384ef - panicking::default_handler::_<closure>::closure.41800
   3:        0x105d37f6f - panicking::default_handler::haa11ce011d688073GWx
   4:        0x105d230c4 - sys_common::unwind::begin_unwind_inner::h5fdd923b078bc2aaz2s
   5:        0x105d2356e - sys_common::unwind::begin_unwind_fmt::hca18532ec345b882F1s
   6:        0x105d35917 - rust_begin_unwind
   7:        0x105d5ce80 - panicking::panic_fmt::he5f9c513e9167673LnK
   8:        0x105144c1f - renderer::Renderer::draw_layer::hc0e95dab74ba165ep9r
   9:        0x10514281d - renderer::Renderer::draw_layer::hc0e95dab74ba165ep9r
  10:        0x10514281d - renderer::Renderer::draw_layer::hc0e95dab74ba165ep9r
  11:        0x105140693 - renderer::Renderer::render::_<closure>::closure.31646
  12:        0x105139722 - renderer::Renderer::render::h9dae376e3cd94111zEr
  13:        0x104530716 - compositor::IOCompositor<Window>::composite_specific_target::h10113247411632487028
  14:        0x104537fa1 - compositor::IOCompositor<Window>::composite::h16885897470770606551
  15:        0x104508129 - compositor::IOCompositor<Window>.CompositorEventListener::handle_events::h6724463297334094989
  16:        0x10453ea07 - Browser::handle_events::hb5df1fa922709898bfa
  17:        0x1044ed955 - main::h8517eb49d15e90fbNaa
  18:        0x105d37ba2 - sys_common::unwind::try::try_fn::h16979644675838301807
  19:        0x105d35738 - __rust_try
  20:        0x105d37a49 - rt::lang_start::h4b7f6b2baa86b84daPx
Servo exited with return value 101
@glennw
Copy link
Member

@glennw glennw commented Feb 1, 2016

We'll try and reproduce this - have you come across anything with a smaller test case that repros this?

@paulrouget
Copy link
Collaborator Author

@paulrouget paulrouget commented Feb 2, 2016

No small test case.

Loading http://github.com directly in Servo (no browser.html) crashes the same way, before the page finish loading.

It happens regularly, but not all the time.

For the record, this is how I run Servo:

./mach run -r -- --resolution 800x600 -b -w --pref dom.mozbrowser.enabled http://github.com/servo
@paulrouget
Copy link
Collaborator Author

@paulrouget paulrouget commented Feb 2, 2016

I was using this code:

<script>
  setTimeout(() => {
    var div = document.querySelector(".v");
    var i = 0;
    var max = 550;
    function step() {
      if (i < max) {
        requestAnimationFrame(step);
      }
      div.style.opacity = i++ / max;
    }
    step();
  }, 1000);
</script>

<div style="width: 400px; height: 400px; padding-top: 40px; overflow: hidden; background: blue">
  <div class="v" style="opacity: 0; color: white">FOOBAR</div>
</div>

with:

./mach run -r -- -w /tmp/a.html

… it crashes, maybe, one out of twelve runs.

@glennw
Copy link
Member

@glennw glennw commented Feb 2, 2016

@paulrouget @pcwalton I've spent about two hours now trying to reproduce this and it just doesn't seem to occur on my Linux system. I don't see how it could be mac-specific, but I'll try to build on mac in the morning and see if I can reproduce. Failing that, we may need to see if @pcwalton can reproduce it, or add some debugging logs and run it on Paul's machine.

@paulrouget
Copy link
Collaborator Author

@paulrouget paulrouget commented Feb 2, 2016

I'm pretty sure this happens every time my computer (macbook) wakes up.

Then, after the first crash, it's hard to reproduce.

@glennw glennw mentioned this issue Feb 2, 2016
15 of 15 tasks complete
@pcwalton
Copy link
Collaborator

@pcwalton pcwalton commented Feb 2, 2016

@paulrouget Complete shot in the dark, but since you mentioned it's based on wakeup, have you tried switching between integrated and discrete GPUs to see if the results change? gfxCardStatus allows you to control this: https://gfx.io/

pcwalton added a commit to pcwalton/webrender that referenced this issue Feb 3, 2016
Before this patch, there was a chance that batch updates could be
delivered to the compositor thread (destroying old resources) and then a
render operation could be invoked before arrival of the new frame. This
would cause the compositor thread to attempt to render frame N with the
resources of frame N+1, which would usually crash.

Closes servo#160.
@glennw glennw closed this in #169 Feb 3, 2016
@paulrouget
Copy link
Collaborator Author

@paulrouget paulrouget commented Feb 3, 2016

(My macbook air has only one GPU)

Thanks a lot for looking at this!
It appears to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.