Repository navigation
Closed
Labels
A-content/scriptRelated to the script threadC-assignedThere is someone working on resolving the issueC-reproducedThe issue was reproduced by someone other than the original filer.I-panicServo encounters a panic.
Description
called Option::unwrap() on a None value
URL:
Backtrace:
frame #0 - 0x000000011086c6ce - backtrace::backtrace::trace::hccde8df28b4db2a2
frame #1 - 0x000000011086c651 - backtrace::capture::Backtrace::new::h42f95930bb8c5ee8
frame #2 - 0x000000010fb3d086 - _<F as alloc..boxed..FnBox<A>>::call_box::h6059122298f825d8
frame #3 - 0x00000001107e0947 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h2c0e77c593c00c08
frame #4 - 0x0000000110a54844 - std::panicking::rust_panic_with_hook::h983af77c1a2e581b
frame #5 - 0x0000000110a6d786 - std::panicking::begin_panic::he426e15a3766089a
frame #6 - 0x0000000110a55e88 - std::panicking::begin_panic_fmt::hdddb415186c241e7
frame #7 - 0x0000000110a6d3df - rust_begin_unwind
frame #8 - 0x0000000110a94260 - core::panicking::panic_fmt::hf4e16cb7f0d41a25
frame #9 - 0x0000000110a9455c - core::panicking::panic::h907815f47e914305
frame #10 - 0x000000010f938895 - script::dom::event::Event::new_uninitialized::he3ccb94702598d61
frame #11 - 0x000000010f940aa7 - script::dom::event::Event::new::h115b505636eaa661
frame #12 - 0x000000010fa0d312 - script::dom::htmlscriptelement::HTMLScriptElement::dispatch_event::hfd4452ea712f8efd
frame #13 - 0x000000010f927241 - script::dom::htmlscriptelement::HTMLScriptElement::execute::hd6eb39d1b33b28da
frame #14 - 0x000000010f37580c - script::dom::document::Document::finish_load::h1ce7e49c25d85fc2
frame #15 - 0x000000010fa069b8 - _<script..dom..htmlscriptelement..ScriptContext as net_traits..AsyncResponseListener>::response_complete::h536287b80705375c
frame #16 - 0x000000010fa0c5c5 - _<script..network_listener..ListenerRunnable<A, Listener> as script..script_thread..Runnable>::handler::h213e3c65c1a0f2f0
frame #17 - 0x000000010fb4895c - script::script_thread::ScriptThread::handle_msg_from_script::hd1f5e7b2423a8c64
frame #18 - 0x000000010fba4a71 - script::script_thread::ScriptThread::handle_msgs::_$u7b$$u7b$closure$u7d$$u7d$::hc67d8b381c013b79
frame #19 - 0x000000010fb8a73f - script::script_thread::ScriptThread::handle_msgs::h236c5be60a207bea
frame #20 - 0x000000010fb3b907 - std::panicking::try::call::h645a328f039d97c6
frame #21 - 0x0000000110a7046b - __rust_try
frame #22 - 0x0000000110a70405 - __rust_maybe_catch_panic
frame #23 - 0x000000010fb3cab4 - _<F as alloc..boxed..FnBox<A>>::call_box::h3db95636eb747818
frame #24 - 0x0000000110a6bee8 - std::sys::thread::Thread::new::thread_start::h9c883b6d445ece46
frame #25 - 0x00007fff94f6f99c - _pthread_body
frame #26 - 0x00007fff94f6f919 - _pthread_start
Metadata
Metadata
Assignees
Labels
A-content/scriptRelated to the script threadC-assignedThere is someone working on resolving the issueC-reproducedThe issue was reproduced by someone other than the original filer.I-panicServo encounters a panic.
Activity
[-]called `Option::unwrap()` on a `None` value[/-][+]called `Option::unwrap()` on a `None` value (Event::new_uninitialized)[/+]jdm commentedon Jul 2, 2016
I hit #12081 while trying to reproduce this.
jdm commentedon Jul 2, 2016
We have two instances of layout threads being shut down (removing iframes, perhaps?), and then a network response completing and a script attempting to execute in a script thread that was previously shut down.
cbrewster commentedon Jul 5, 2016
More useful backtrace:
cbrewster commentedon Jul 5, 2016
@jdm in this scenario is there anyway to check if the script thread has been shut down before attempting to execute a script?
jdm commentedon Jul 5, 2016
There's a mechanism for marking runnables as revocable based on the
ignore_further_async_eventsmember inWindow(see the use ofwindow.get_runnable_wrapperandwrap_runnableinhtmlimageelement.rs). This probably requires making all the runnables created byNetworkListenerrevocable.jdm commentedon Jul 5, 2016
It's possible to write code to not execute script by adding an API to GlobalRef and calling it from
evaluate_script_on_global_with_result; it's not really clear to me whether we would end up playing whack-a-mole with non-script related things if we added that restriction instead of the plan in the previous comment.Auto merge of #12277 - ConnorGBrewster:network_listener_cancellable, …
Auto merge of #12277 - ConnorGBrewster:network_listener_cancellable, …
Auto merge of #12277 - ConnorGBrewster:network_listener_cancellable, …
Auto merge of #12277 - ConnorGBrewster:network_listener_cancellable, …
cbrewster commentedon Jul 16, 2016
Fixed in #12277