yew: Panic error message: already borrowed: BorrowMutError

After update to 0day version i’ve startedto recieve this error. Its happening here:

    fn create_bridge(&mut self, callback: Option<Callback<AGN::Output>>) -> PublicBridge<AGN> {
        let respondable = callback.is_some();
        let id: usize = self.slab.borrow_mut().insert(callback);

Stack trace:

at __rust_start_panic (wasm-function[1577]:1)
    at rust_panic (wasm-function[1571]:31)
    at _ZN3std9panicking20rust_panic_with_hook17ha5670d736e99ae94E (wasm-function[1566]:302)
    at _ZN3std9panicking18continue_panic_fmt17h0074a0c70d16fab2E (wasm-function[1565]:118)
    at rust_begin_unwind (wasm-function[1564]:3)
    at _ZN4core9panicking9panic_fmt17h3193bda3e8bc74e4E (wasm-function[1615]:67)
    at _ZN4core6result13unwrap_failed17h9c05c57d02ddc984E (wasm-function[1660]:127)
    at _ZN3yew5agent22RemoteAgent$LT$AGN$GT$13create_bridge17hf8193481f19ad7f8E (wasm-function[818]:712)
    at _ZN3std6thread5local17LocalKey$LT$T$GT$4with17hfd8aaa3058f91029E (wasm-function[769]:1154)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (13 by maintainers)

Commits related to this issue

Most upvoted comments

It’s in a webworker context. Not many messages, but perhaps there has been a short (e.g. 1) queue of messages anyway because the webworker do some cpu intensive tasks which keeps it busy. Don’t really know, but here is my stack trace from the main browser thread where the error appears.

stack backtrace:
    __cargo_web_snippet_2f78e4cc64af80f304583a14e6a83b1646948d5e http://127.0.0.1/frontend.js:583
    _ZN8frontend17set_panic_handler28_$u7b$$u7b$closure$u7d$$u7d$17h5c5741e293e76328E http://127.0.0.1/frontend.wasm:53211
    _ZN3std9panicking20rust_panic_with_hook17h40ace5a7f5384ebfE http://127.0.0.1/frontend.wasm:250465
    _ZN3std9panicking18continue_panic_fmt17hcebaabb0ad62a6a7E http://127.0.0.1/frontend.wasm:250211
    rust_begin_unwind http://127.0.0.1/frontend.wasm:250087
    _ZN4core9panicking9panic_fmt17hb8d688d3cd43290fE http://127.0.0.1/frontend.wasm:275517
    _ZN4core6result13unwrap_failed17h7a2eef961320ea13E http://127.0.0.1/frontend.wasm:282017
    4369276589512264894 http://127.0.0.1/frontend.wasm:92619
    _ZN3yew5agent22RemoteAgent$LT$AGN$GT$13remove_bridge17h7269a3f0bbfaa7d7E http://127.0.0.1/frontend.wasm:92705
    _ZN3std6thread5local17LocalKey$LT$T$GT$8try_with17hb5cf64b265eade3eE http://127.0.0.1/frontend.wasm:37425
    _ZN3std6thread5local17LocalKey$LT$T$GT$4with17h99745439f68a1af8E http://127.0.0.1/frontend.wasm:37273
    Drop$GT$4drop17h69845601f25b22faE http://127.0.0.1/frontend.wasm:94313
    _ZN4core3ptr18real_drop_in_place17hdbfb14af4982a446E http://127.0.0.1/frontend.wasm:94274
    5935776017095784423 http://127.0.0.1/frontend.wasm:81641
    5935776017095784423 http://127.0.0.1/frontend.wasm:82303
    Runnable$GT$3run17h49a7cd76352d4f21E http://127.0.0.1/frontend.wasm:88982
    _ZN3yew9scheduler9Scheduler15put_and_try_run17hb8b82a87f587e70cE http://127.0.0.1/frontend.wasm:140535
    _ZN3yew4html5scope17Scope$LT$COMP$GT$6update17hca61c0b71a663d59E http://127.0.0.1/frontend.wasm:77600
    _ZN3yew4html5scope17Scope$LT$COMP$GT$12send_message17hf9f0b890c46ee8e6E http://127.0.0.1/frontend.wasm:77522
    _ZN3yew4html25ComponentLink$LT$COMP$GT$8callback28_$u7b$$u7b$closure$u7d$$u7d$17hdf517031f2b1c44fE http://127.0.0.1/frontend.wasm:23078
    _ZN3yew8callback18Callback$LT$IN$GT$4emit17hced39d6de59b750aE http://127.0.0.1/frontend.wasm:23353
    _ZN3yew5agent27locate_callback_and_respond17h2cf87eede590cc6bE http://127.0.0.1/frontend.wasm:93360
    FuncallAdapter$LT$F$GT$$GT$15funcall_adapter17hf1c98d02098b5fd0E http://127.0.0.1/frontend.wasm:49038
    dyncall http://127.0.0.1/frontend.js:476
    output http://127.0.0.1/frontend.js:175
    onmessage http://127.0.0.1/frontend.js:712