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

See a blank page while visiting joshwcomeau.com #26494

Open
CYBAI opened this issue May 12, 2020 · 4 comments
Open

See a blank page while visiting joshwcomeau.com #26494

CYBAI opened this issue May 12, 2020 · 4 comments

Comments

@CYBAI
Copy link
Collaborator

@CYBAI CYBAI commented May 12, 2020

While trying to visit this page, then I will only see a blank page with following errors

→ ./mach run https://joshwcomeau.com/
ReferenceError: IntersectionObserver is not defined
ReferenceError: IntersectionObserver is not defined
[2020-05-12T13:55:40Z ERROR script::dom::bindings::error] Error at https://joshwcomeau.com/ea3f6d06433ab0a44a93f1f004e3460f11ae48d1-364ab52e7608956f3ebd.js:1:32013 IntersectionObserver is not defined
Servo Firefox
image image

Built with latest master (c5617ef) on macOS 10.14.6

@jdm
Copy link
Member

@jdm jdm commented May 12, 2020

It would be interesting to see if stubbing out the IntersectionObsever interface in a userscript and running with --userscripts=resources/user-agent-js would allow the rest of the page to load.

@CYBAI
Copy link
Collaborator Author

@CYBAI CYBAI commented May 12, 2020

@jdm Cool! Thanks for the tip for userscripts! Didn't know that 👀

I tried to use the polyfill/intersection-observer.js from IntersectionObserver's spec repo.

The page will be rendered for seconds and then crash

→ ./mach run --userscripts=resources/user-agent-js https://joshwcomeau.com/
TypeError: e is undefined
TypeError: e is undefined
[2020-05-12T14:42:52Z ERROR script::dom::bindings::error] Error at https://joshwcomeau.com/framework-2a2b3771655a6aa62b8e.js:1:44473 e is undefined
index out of bounds: the len is 1 but the index is 9223372036854775808 (thread <unnamed>, at components/script/dom/baseaudiocontext.rs:494)
   0: backtrace::backtrace::trace_unsynchronized
   1: <servo::backtrace::Print as core::fmt::Debug>::fmt
   2: core::fmt::write
   3: std::io::Write::write_fmt
   4: servo::backtrace::print
   5: servo::main::{{closure}}
   6: std::panicking::rust_panic_with_hook
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic_bounds_check
  10: <usize as core::slice::SliceIndex<[T]>>::index_mut
  11: core::slice::<impl core::ops::index::IndexMut<I> for [T]>::index_mut
  12: <alloc::vec::Vec<T> as core::ops::index::IndexMut<I>>::index_mut
  13: <script::dom::baseaudiocontext::BaseAudioContext as script::dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextBinding::BaseAudioContextMethods>::DecodeAudioData::{{closure}}
  14: <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call
  15: servo_media_audio::decoder::AudioDecoderCallbacks::progress
  16: <servo_media_gstreamer::audio_decoder::GStreamerAudioDecoder as servo_media_audio::decoder::AudioDecoder>::decode::{{closure}}::{{closure}}::{{closure}}::{{closure}}::{{closure}}
  17: <alloc::boxed::Box<F> as core::ops::function::FnMut<A>>::call_mut
  18: gstreamer_app::app_sink::trampoline_new_sample
  19: gst_app_sink_render_common
  20: gst_base_sink_chain_unlocked
  21: gst_base_sink_chain_main
  22: gst_pad_chain_data_unchecked
  23: gst_pad_push_data
  24: gst_pad_push
  25: gst_queue_loop
  26: gst_task_func
  27: g_thread_pool_thread_proxy
  28: g_thread_proxy
  29: _pthread_body
  30: _pthread_start
index out of bounds: the len is 1 but the index is 9223372036854775808 (thread <unnamed>, at components/script/dom/baseaudiocontext.rs:494)
[2020-05-12T14:42:53Z ERROR servo] index out of bounds: the len is 1 but the index is 9223372036854775808
   0: backtrace::backtrace::trace_unsynchronized
   1: <servo::backtrace::Print as core::fmt::Debug>::fmt
   2: core::fmt::write
   3: std::io::Write::write_fmt
   4: servo::backtrace::print
   5: servo::main::{{closure}}
   6: std::panicking::rust_panic_with_hook
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic_bounds_check
  10: <usize as core::slice::SliceIndex<[T]>>::index_mut
  11: core::slice::<impl core::ops::index::IndexMut<I> for [T]>::index_mut
  12: <alloc::vec::Vec<T> as core::ops::index::IndexMut<I>>::index_mut
  13: <script::dom::baseaudiocontext::BaseAudioContext as script::dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextBinding::BaseAudioContextMethods>::DecodeAudioData::{{closure}}
  14: <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call
  15: servo_media_audio::decoder::AudioDecoderCallbacks::progress
  16: <servo_media_gstreamer::audio_decoder::GStreamerAudioDecoder as servo_media_audio::decoder::AudioDecoder>::decode::{{closure}}::{{closure}}::{{closure}}::{{closure}}::{{closure}}
  17: <alloc::boxed::Box<F> as core::ops::function::FnMut<A>>::call_mut
  18: gstreamer_app::app_sink::trampoline_new_sample
  19: gst_app_sink_render_common
  20: gst_base_sink_chain_unlocked
  21: gst_base_sink_chain_main
  22: gst_pad_chain_data_unchecked
  23: gst_pad_push_data
  24: gst_pad_push
  25: gst_queue_loop
  26: gst_task_func
  27: g_thread_pool_thread_proxy
  28: g_thread_proxy
  29: _pthread_body
  30: _pthread_start
[2020-05-12T14:42:54Z ERROR servo] index out of bounds: the len is 1 but the index is 9223372036854775808
index out of bounds: the len is 1 but the index is 9223372036854775808 (thread <unnamed>, at components/script/dom/baseaudiocontext.rs:494)
fatal runtime error: failed to initiate panic, error 5
Redirecting call to abort() to mozalloc_abort

   0: backtrace::backtrace::trace_unsynchronized
   1: <servo::backtrace::Print as core::fmt::Debug>::fmt
   2: core::fmt::write
   3: std::io::Write::write_fmt
   4: servo::backtrace::print
   5: servo::main::{{closure}}
   6: std::panicking::rust_panic_with_hook
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic_bounds_check
  10: <usize as core::slice::SliceIndex<[T]>>::index_mut
  11: core::slice::<impl core::ops::index::IndexMut<I> for [T]>::index_mut
  12: <alloc::vec::Vec<T> as core::ops::index::IndexMut<I>>::index_mut
  13: <script::dom::baseaudiocontext::BaseAudioContext as script::dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextBinding::BaseAudioContextMethods>::DecodeAudioData::{{closure}}
  14: <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call
  15: servo_media_audio::decoder::AudioDecoderCallbacks::progress
  16: <servo_media_gstreamer::audio_decoder::GStreamerAudioDecoder as servo_media_audio::decoder::AudioDecoder>::decode::{{closure}}::{{closure}}::{{closure}}::{{closure}}::{{closure}}
  17: <alloc::boxed::Box<F> as core::ops::function::FnMut<A>>::call_mut
  18: gstreamer_app::app_sink::trampoline_new_sample
  19: gst_app_sink_render_common
  20: gst_base_sink_chain_unlocked
  21: gst_base_sink_chain_main
  22: gst_pad_chain_data_unchecked
  23: gst_pad_push_data
  24: gst_pad_push
  25: gst_queue_loop
  26: gst_task_func
  27: g_thread_pool_thread_proxy
  28: g_thread_proxy
  29: _pthread_body
  30: _pthread_start
index out of bounds: the len is 1 but the index is 9223372036854775808 (thread <unnamed>, at components/script/dom/baseaudiocontext.rs:494)
[2020-05-12T14:42:54Z ERROR servo] index out of bounds: the len is 1 but the index is 9223372036854775808
   0: backtrace::backtrace::trace_unsynchronized
fatal runtime error: failed to initiate panic, error 5
Redirecting call to abort() to mozalloc_abort

Servo exited with return value 11
@CYBAI
Copy link
Collaborator Author

@CYBAI CYBAI commented May 12, 2020

Just did a little investigation and AudioContext is used in the https://joshwcomeau.com/26-0a6958ee125b7c9ecb67.js file.

When switching between dark mode and light mode in the site, it will play a sound.
But, in Servo, I didn't even try to switch dark mode; then it crashed.

@nicoabie
Copy link

@nicoabie nicoabie commented Jul 26, 2020

Screen Shot 2020-07-26 at 14 55 45

Now it seems to render, but it is not possible to change to dark mode because the icon is svg and is not rendered

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.