Open green-s opened 5 years ago
I'll try to reproduce this.
So I looked a bit into this, first i thought maybe it was an older sdk, but you have the same version as me 10.0.18362.0. I remember I had problems with with compiler from MSVC 2017, could you try installing 2019 Build Tools (no need for the whole Visual Studio) and try if it fixes the issue?
I already have Visual Studio 2019 installed and as far as I know I'm using the latest build tools. I tried building from the "Developer Command Prompt for VS 2019" and "x64 Native Tools Command Prompt for VS 2019", with no difference. Did you see something that indicates that I'm using MSVC 2017?
Did you see something that indicates that I'm using MSVC 2017?
No it's just that I remember having problems with that. I cannot reproduce this yet, I'll try again when I have more energy to delve deeper.
I have the same problem, with everything installed as suggested in the readme. EDIT: I've experienced the issue on my laptop, but not my desktop PC. Both are on windows 10.
I have a very similar problem, possible related but not exactly the same stack. The webview starts and closes almost instantly without any information, when debugging with visual studio, it is clear that there is an exception internal to webview-sys navigate function.
void navigate(const char* url)
{
std::string html = html_from_uri(url);
if (html != "") {
m_webview.NavigateToString(winrt::to_hstring(html.c_str()));
} else {
Uri uri(winrt::to_hstring(url));
m_webview.Navigate(uri); <------ HERE
}
}
Then further down windows sdk will try to convert the exception using to_hresult()
, which in turn calls a std::terminate()
. I'll missed which was the exception, I'll try to collect more info once I'm at the problematic machine.
Windows SDK 10.0.18362.0
Hey, I experienced the issue myself when trying to load a local file using the edge feature. In particular:
https://google.com
file:
uri prefix, the same crash happens.index.html
with the following content:<html lang="en">
<head>
<title>Hello</title>
</head>
<body>
Hello
</body>
</html>
web_view::builder()
.title("My Project")
.content(Content::Url("file:///C:/Users/Freddy/Documents/testgui/index.html"))
.size(700, 480)
.resizable(true)
.user_data(())
.invoke_handler(|_webview, _arg| Ok(()))
.run()
.unwrap();
The script will crash with exit code: (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)
I'll try to dig myself into the code to find the root of the issue.
I'm running Visual Studio 2019
Cheers
Following up to my previous comment, it turns out my use case (loading a file using the file://
protocol uri) is not currently possible. See https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/2211
Hopefully this will be fixed, when we switch to Edge Preview, I am working on it.
Glad to hear that @zxey, thanks for your reply
When running any of the examples with the
edge
feature enabled I'm getting an access violation (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN).Minidump