Git Product home page Git Product logo

Comments (10)

rhzx86 avatar rhzx86 commented on July 29, 2024

I'll try to reproduce this.

from web-view.

rhzx86 avatar rhzx86 commented on July 29, 2024

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?

from web-view.

green-s avatar green-s commented on July 29, 2024

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?

from web-view.

rhzx86 avatar rhzx86 commented on July 29, 2024

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.

from web-view.

FrankenApps avatar FrankenApps commented on July 29, 2024

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.

from web-view.

fungos avatar fungos commented on July 29, 2024

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

from web-view.

federico-terzi avatar federico-terzi commented on July 29, 2024

Hey,
I experienced the issue myself when trying to load a local file using the edge feature. In particular:

  • Everything works correctly when loading a remote url, such as https://google.com
  • When I try to open a local file using the file: uri prefix, the same crash happens.

Steps to reproduce:

  1. Create a local file index.html with the following content:
<html lang="en">
<head>
    <title>Hello</title>   
</head>

<body>
    Hello
</body>

</html>
  1. Load the file using the File URI path:
 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

from web-view.

federico-terzi avatar federico-terzi commented on July 29, 2024

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 CommunityToolkit/WindowsCommunityToolkit#2211

from web-view.

rhzx86 avatar rhzx86 commented on July 29, 2024

Hopefully this will be fixed, when we switch to Edge Preview, I am working on it.

from web-view.

federico-terzi avatar federico-terzi commented on July 29, 2024

Glad to hear that @Zxey, thanks for your reply

from web-view.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.