Boscop / Boscop/web-view

SIGABRT when creating a second instance in a child thread

Open
#81 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2k
Forks
179
PR merge metrics
No merged PRs in 30d

Description

In trying to work on my project using webview [here](https://github.com/Redrield/elm-ds), I ran into an issue when I tried to open a second webview window in a child thread, the relevant code is

```rust
let (tx, rx) = mpsc::channel::>();
thread::spawn(move || {
let wv = web_view::builder()
.title("Robot Console")
.size(750, 750)
.content(Content::Url("http://localhost:8000/stdout"))
.debug(true)
.user_data(())
.invoke_handler(|_, _| { Ok(()) })
.build().unwrap();

tx.send(wv.handle());

wv.run()
});

self.extra_stdout_handle = Some(rx.recv().unwrap());
self.update_consumer(super_handle);
```

When I reach the branch that calls the function this code resides in, the window begins to open but closes with SIGABRT before any content is loaded, I've run the exec through lldb and gotten the following backtrace https://hasteb.in/avubihan.php. I'm not sure whether this is related to #26 in being cause by a child thread, or whether it's a case of running 2 webview instances in parallel.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.