Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GTK] REGRESSION: Webview throwing exception on 2.8.0+ #2736

Open
Miepee opened this issue Jan 29, 2025 · 2 comments
Open

[GTK] REGRESSION: Webview throwing exception on 2.8.0+ #2736

Miepee opened this issue Jan 29, 2025 · 2 comments

Comments

@Miepee
Copy link
Contributor

Miepee commented Jan 29, 2025

The following code in an application of mine throws an exception on Eto 2.8.0 and above

Uri changelogUri = new Uri("https://am2r-community-developers.github.io/DistributionCenter/changelog.html");
WebView changelogWebView = new WebView { Url = changelogUri };

Stack trace:

The type initializer for 'NMLinux' threw an exception.
*****Stack Trace*****
   at Eto.GtkSharp.NativeMethods.NMLinux.webkit_web_view_new()
   at Eto.GtkSharp.NativeMethods.webkit_web_view_new()
   at Eto.GtkSharp.Forms.Controls.WebViewHandler..ctor()
   at Eto.GtkSharp.Platform.<>c.<AddTo>b__12_61()
   at Eto.Widget..ctor()
   at Eto.Forms.BindableWidget..ctor()
   at Eto.Forms.Control..ctor()
   at Eto.Forms.WebView..ctor()

Notably, this did not happen on Eto 2.7.5

.NET version: 8
Platform: GTK
Operating system: Can reproduce on Arch Linux and nixOS

@cwensley
Copy link
Member

Hey @Miepee thanks for filing the issue. The only changes between 2.7.5 and 2.8.0 that would have caused this is your PR: #2482. Perhaps you should revert it or maybe it just needs other changes to handle other distros?

@Miepee
Copy link
Contributor Author

Miepee commented Jan 30, 2025

Ah, somehow I did not see that PR when trying to search in the changelog.

Unsure about reverting right now. Due to lack of reports regarding this, I don't know whether it just works for other people, or whether "no one" is using webviews on linux.

I'll try to get some time soonTM to figure out why that happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants