Skip to content

Panic when deleting text on bhtml url bar #11901

Closed

Description

@cbrewster

Running from bhtml master with:
./mach run -d -- -b -w --resolution=1024x720 --pref dom.mozbrowser.enabled --pref dom.forcetouch.enabled --pref dom.quit-on-escape.enabled=false http://localhost:6060

  1. Type text in the URL bar
  2. Hover over suggestion
  3. Hit delete until panic
Render took 64.79874900000004ms & will cause frame drop
Unhandled error occured
ReferenceError: navigator.mozSettings API is not available
Render took 64.90834999999998ms & will cause frame drop
Render took 38.891733000000386ms & will cause frame drop
ERROR:constellation::constellation: Panic: begin <= end (3 <= 1) when slicing `a`
ERROR:constellation::constellation: Backtrace:
frame #0  - 0x000000010fb3a780 - backtrace::backtrace::trace::hccde8df28b4db2a2
frame #1  - 0x000000010fb3a62a - backtrace::capture::Backtrace::new::h42f95930bb8c5ee8
frame #2  - 0x000000010e2b3355 - util::thread::spawn_named_with_send_on_panic::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h8e08bac0ce5835b1
frame #3  - 0x000000010e2b3950 - extern $u22$rust.call$u22$$u20$fn$LP$$u5b$closure$SP$DefId$u20$$u7b$$u20$krate.$u20$47$C$$u20$node.$u20$DefIndex$LP$2380$RP$$u20$$u7d$$u20$0.ipc_channel..ipc..IpcSender$LT$$LP$core..option..Option$LT$msg..constellation_msg..PipelineId$GT$$C$$u20$std..string..String$C$$u20$std..string..String$RP$$GT$$C$$u20$1.core..option..Option$LT$msg..constellation_msg..PipelineId$GT$$u5d$$C$$u20$$LP$$RF$core..any..Any$C$$RP$$RP$::once_shim.210704::h3190046b5fea3554
frame #4  - 0x000000010e2b38fc - _<F as alloc..boxed..FnBox<A>>::call_box::hebb3b95724d7c6a0
frame #5  - 0x000000010f9ff63f - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hddf831bcfa835e79
frame #6  - 0x000000010f9ff243 - _<std..thread..local..LocalKey<T>>::with::h49e68c592f601e39
frame #7  - 0x000000010f9ff096 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h0fcde37d4d058867
frame #8  - 0x000000010feac714 - std::panicking::rust_panic_with_hook::h983af77c1a2e581b
frame #9  - 0x000000010fec57d6 - std::panicking::begin_panic::he426e15a3766089a
frame #10 - 0x000000010feadd58 - std::panicking::begin_panic_fmt::hdddb415186c241e7
frame #11 - 0x000000010fec542f - rust_begin_unwind
frame #12 - 0x000000010feec2b0 - core::panicking::panic_fmt::hf4e16cb7f0d41a25
frame #13 - 0x000000010fef428a - core::str::slice_error_fail::ha8f4daeb58b867c4
frame #14 - 0x000000010ce2b52c - core::str::traits::_<impl core..ops..Index<core..ops..RangeFrom<usize>> for str>::index::hbdc52817d320a9bf
frame #15 - 0x000000010dfc0449 - _<script..textinput..TextInput<T>>::replace_selection::ha5616f5185516242
frame #16 - 0x000000010dfc45f2 - _<script..textinput..TextInput<T>>::delete_char::h6a3dc6d05bc6fd31
frame #17 - 0x000000010dfbeb4e - _<script..textinput..TextInput<T>>::handle_keydown_aux::h53780aad87c6bdca
frame #18 - 0x000000010dfbe75e - _<script..textinput..TextInput<T>>::handle_keydown::h04b717b2a3e0a2d5
frame #19 - 0x000000010dfbe284 - _<script..dom..htmlinputelement..HTMLInputElement as script..dom..virtualmethods..VirtualMethods>::handle_event::h86107a9c7fec09db
frame #20 - 0x000000010df16508 - script::dom::eventdispatcher::dispatch_event::h2af7a9aca7ed0603
frame #21 - 0x000000010ce9c413 - script::dom::eventtarget::EventTarget::dispatch_event::h81415f3730b3c0d9
frame #22 - 0x000000010de513bc - script::dom::event::Event::fire::hc8f0f175fa50a18c
frame #23 - 0x000000010de58d41 - script::dom::document::Document::dispatch_key_event::hf0b3c82ee1e5d75d
frame #24 - 0x000000010e332e3d - script::script_thread::ScriptThread::handle_event::hb1054401ed8869b2
frame #25 - 0x000000010e363127 - script::script_thread::ScriptThread::handle_msg_from_constellation::hb125e29adccf30ce
frame #26 - 0x000000010e361bde - script::script_thread::ScriptThread::handle_msgs::_$u7b$$u7b$closure$u7d$$u7d$::hdfba591677ee0854
frame #27 - 0x000000010e3617c5 - script::script_thread::ScriptThread::profile_event::h180ff2036b8c2783
frame #28 - 0x000000010e32f6dd - script::script_thread::ScriptThread::handle_msgs::h45a47f1f1786f911
frame #29 - 0x000000010e2c80bc - script::script_thread::ScriptThread::start::hf0f02e16b9da3912
frame #30 - 0x000000010e2c806b - _<script..script_thread..ScriptThread as script_traits..ScriptThreadFactory>::create::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h60e2514d7c15aeaf
frame #31 - 0x000000010e2c7dc1 - profile_traits::mem::ProfilerChan::run_with_memory_reporting::h90164fdc02bc9ddf
frame #32 - 0x000000010e2b4076 - _<script..script_thread..ScriptThread as script_traits..ScriptThreadFactory>::create::_$u7b$$u7b$closure$u7d$$u7d$::hc2f6bfd107201055
frame #33 - 0x000000010e2b270e - util::thread::spawn_named_with_send_on_panic::_$u7b$$u7b$closure$u7d$$u7d$::h44d46100d4f5f190
frame #34 - 0x000000010e2b24c7 - _<std..panic..AssertUnwindSafe<F> as core..ops..FnOnce<()>>::call_once::h4974dfb1034d8cd6
frame #35 - 0x000000010e2b241b - std::panicking::try::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h4326e3cb5bf9d187
frame #36 - 0x000000010e2b2cd4 - std::panicking::try::call::h78061d8f9ce27ca7
frame #37 - 0x000000010fec84bb - __rust_try
frame #38 - 0x000000010fec8455 - __rust_maybe_catch_panic
frame #39 - 0x000000010e2b236d - std::panicking::try::_$u7b$$u7b$closure$u7d$$u7d$::he258e52e28311769
frame #40 - 0x000000010e2b22bf - _<std..thread..local..LocalKey<T>>::with::h6a07862be6a45706
frame #41 - 0x000000010e2b20ef - std::panicking::try::h90b38a4a00a80b43
frame #42 - 0x000000010e2b1fce - std::panic::catch_unwind::h066dae249590ffb5
frame #43 - 0x000000010e2b1e2c - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::hb658a84aa2bff2ef
frame #44 - 0x000000010e2b2ed7 - _<F as alloc..boxed..FnBox<A>>::call_box::h2ec158fb92e41aca
frame #45 - 0x000000010fec3f38 - std::sys::thread::Thread::new::thread_start::h9c883b6d445ece46
frame #46 - 0x00007fff9eeb699c - _pthread_body
frame #47 - 0x00007fff9eeb6919 - _pthread_start

ERROR:constellation::constellation: Panic: called `Result::unwrap()` on an `Err` value: Error { repr: Custom(Custom { kind: Other, error: StringError("MPSC send failed") }) }

Activity

  1. added
    A-content/dom
    I-panic
    on Jun 28, 2016
  2. asajeffrey commented on Jun 28, 2016

    @asajeffrey
    Contributor

    This is tricky to replicate, as it seems very sensitive to timing, but I can confirm it under Linux:

    $ ./mach run -d -- -b -w --resolution=1024x720 --pref dom.mozbrowser.enabled --pref dom.forcetouch.enabled --pref dom.quit-on-escape.enabled=false http://localhost:6060
    Render took 60.452557999999954ms & will cause frame drop
    Unhandled error occured 
    ReferenceError: navigator.mozSettings API is not available
    Render took 62.965703000000076ms & will cause frame drop
    Render took 24.25673900000038ms & will cause frame drop
    Render took 22.44771399999445ms & will cause frame drop
    ERROR:constellation::constellation: Panic: begin <= end (20 <= 19) when slicing `tarek and christina`
    ERROR:constellation::constellation: Backtrace:
    frame #0  - 0x0000559bbf0bb3c0 - backtrace::backtrace::libunwind::trace
                                   @ /home/ajeffrey/github/asajeffrey/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.2.2/src/backtrace/libunwind.rs:54
                                   - backtrace::backtrace::trace<closure>
                                   @ /home/ajeffrey/github/asajeffrey/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.2.2/src/backtrace/mod.rs:70
    frame #1  - 0x0000559bbf0bb26a - backtrace::capture::{{impl}}::new
                                   @ /home/ajeffrey/github/asajeffrey/servo/target/debug/build/backtrace-84fe7449c57aed39/out/capture.rs:79
    frame #2  - 0x0000559bbd8ddd8a - util::thread::spawn_named_with_send_on_panic::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hfd21b0f94366a818
    frame #3  - 0x0000559bbd8de360 - extern $u22$rust.call$u22$$u20$fn$LP$$u5b$closure$SP$DefId$u20$$u7b$$u20$krate.$u20$47$C$$u20$node.$u20$DefIndex$LP$2388$RP$$u20$$u7d$$u20$0.ipc_channel..ipc..IpcSender$LT$$LP$core..option..Option$LT$msg..constellation_msg..PipelineId$GT$$C$$u20$std..string..String$C$$u20$std..string..String$RP$$GT$$C$$u20$1.core..option..Option$LT$msg..constellation_msg..PipelineId$GT$$u5d$$C$$u20$$LP$$RF$core..any..Any$C$$RP$$RP$::once_shim.212920::h50189665d8ae7f41
    frame #4  - 0x0000559bbd8de30b - alloc::boxed::{{impl}}::call_box<(&Any),closure>
                                   @ /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/liballoc/boxed.rs:544
    frame #5  - 0x0000559bbf096ad1 - util::panicking::initiate_panic_hook::{{closure}}::{{closure}}::{{closure}}
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/util/panicking.rs:43
    frame #6  - 0x0000559bbf0966d9 - std::thread::local::{{impl}}::with<core::cell::RefCell<core::option::Option<util::panicking::PanicHandlerLocal>>,closure,()>
                                   @ /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/thread/local.rs:211
    frame #7  - 0x0000559bbf096556 - util::panicking::initiate_panic_hook::{{closure}}::{{closure}}
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/util/panicking.rs:40
    frame #8  - 0x0000559bbf41392c - std::panicking::rust_panic_with_hook::h983af77c1a2e581b
    frame #9  - 0x0000559bbf42e0a1 - std::panicking::begin_panic::he426e15a3766089a
    frame #10 - 0x0000559bbf41519a - std::panicking::begin_panic_fmt::hdddb415186c241e7
    frame #11 - 0x0000559bbf42e03e - rust_begin_unwind
    frame #12 - 0x0000559bbf46463f - core::panicking::panic_fmt::hf4e16cb7f0d41a25
    frame #13 - 0x0000559bbf46c1df - core::str::slice_error_fail::ha8f4daeb58b867c4
    frame #14 - 0x0000559bbc4b925c - core::str::traits::{{impl}}::index
                                   @ /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libcore/str/mod.rs:1489
    frame #15 - 0x0000559bbd5f9ff4 - script::textinput::{{impl}}::replace_selection<ipc_channel::ipc::IpcSender<script_traits::script_msg::ScriptMsg>>
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/textinput.rs:290
    frame #16 - 0x0000559bbd5fdfb2 - script::textinput::{{impl}}::delete_char<ipc_channel::ipc::IpcSender<script_traits::script_msg::ScriptMsg>>
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/textinput.rs:190
    frame #17 - 0x0000559bbd5f8930 - script::textinput::{{impl}}::handle_keydown_aux<ipc_channel::ipc::IpcSender<script_traits::script_msg::ScriptMsg>>
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/textinput.rs:511
    frame #18 - 0x0000559bbd5f854e - script::textinput::{{impl}}::handle_keydown<ipc_channel::ipc::IpcSender<script_traits::script_msg::ScriptMsg>>
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/textinput.rs:475
    frame #19 - 0x0000559bbd5f8084 - script::dom::htmlinputelement::{{impl}}::handle_event
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/dom/htmlinputelement.rs:948
    frame #20 - 0x0000559bbd552afa - script::dom::eventdispatcher::dispatch_event
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/dom/eventdispatcher.rs:156
    frame #21 - 0x0000559bbc526183 - script::dom::eventtarget::{{impl}}::dispatch_event
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/dom/eventtarget.rs:308
    frame #22 - 0x0000559bbd4905dc - script::dom::event::{{impl}}::fire
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/dom/event.rs:297
    frame #23 - 0x0000559bbd497e63 - script::dom::document::{{impl}}::dispatch_key_event
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/dom/document.rs:1097
    frame #24 - 0x0000559bbd957f24 - script::script_thread::{{impl}}::handle_event
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:1945
    frame #25 - 0x0000559bbd987095 - script::script_thread::{{impl}}::handle_msg_from_constellation
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:910
    frame #26 - 0x0000559bbd985c1e - script::script_thread::{{impl}}::handle_msgs::{{closure}}
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:802
    frame #27 - 0x0000559bbd985886 - script::script_thread::{{impl}}::profile_event<closure,core::option::Option<bool>>
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:899
    frame #28 - 0x0000559bbd954881 - script::script_thread::{{impl}}::handle_msgs
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:795
    frame #29 - 0x0000559bbd8f250c - script::script_thread::{{impl}}::start
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:642
    frame #30 - 0x0000559bbd8f24bb - script::script_thread::{{impl}}::create::{{closure}}::{{closure}}
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:480
    frame #31 - 0x0000559bbd8f2205 - profile_traits::mem::{{impl}}::run_with_memory_reporting<closure,fn(profile_traits::mem::ReportsChan) -> script::script_runtime::CommonScriptMsg,script::script_runtime::CommonScriptMsg,std::sync::mpsc::Sender<script::script_thread::MainThreadScriptMsg>>
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/profile_traits/mem.rs:59
    frame #32 - 0x0000559bbd8dea23 - script::script_thread::{{impl}}::create::{{closure}}
                                   @ /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:479
    frame #33 - 0x0000559bbd8dd16f - util::thread::spawn_named_with_send_on_panic::_$u7b$$u7b$closure$u7d$$u7d$::ha6b3906dd3d1b3b8
    frame #34 - 0x0000559bbd8dcf37 - std::panic::{{impl}}::call_once<(),closure>
                                   @ /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panic.rs:251
    frame #35 - 0x0000559bbd8dce8b - std::panicking::try::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hf4a06afd8fb1cadd
    frame #36 - 0x0000559bbd8dd724 - std::panicking::try::call<closure>
                                   @ /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:272
    frame #37 - 0x0000559bbf43829b - __rust_try
    frame #38 - 0x0000559bbf43823e - __rust_maybe_catch_panic
    frame #39 - 0x0000559bbd8dcddd - std::panicking::try::_$u7b$$u7b$closure$u7d$$u7d$::hc0fe076a800e7fa5
    frame #40 - 0x0000559bbd8dcd2f - std::thread::local::{{impl}}::with<core::cell::Cell<usize>,closure,core::result::Result<(), Box<Any>>>
                                   @ /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/thread/local.rs:211
    frame #41 - 0x0000559bbd8dcb6f - std::panicking::try<(),std::panic::AssertUnwindSafe<closure>>
                                   @ /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:235
    frame #42 - 0x0000559bbd8dca4e - std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure>,()>
                                   @ /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panic.rs:307
    frame #43 - 0x0000559bbd8dc8bc - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::h88df1cd8e8d23dc6
    frame #44 - 0x0000559bbd8dd917 - alloc::boxed::{{impl}}::call_box<(),closure>
                                   @ /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/liballoc/boxed.rs:544
    frame #45 - 0x0000559bbf42c264 - std::sys::thread::Thread::new::thread_start::h9c883b6d445ece46
    frame #46 - 0x00007f4f5b06c6a9 - start_thread
    frame #47 - 0x00007f4f5ab8b13c - __clone
    frame #48 - 0x0000000000000000 - <unknown>
    
  3. added 5 commits that reference this issue on Jun 28, 2016
    4550188
    8802f37
    52d48aa
    61b9f60
    aa91412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/domI-panic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions