-
Notifications
You must be signed in to change notification settings - Fork 12
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
Swing Example Crashes #29
Comments
Yeah it looks like this was introduced in an update to the upstream library. Still trying to figure it out. |
@e3ndr any updates on this? |
So it definetly has something todo with this line: |
Where do you get the binaries from? Maybe trying a newer version of webview fixes it. |
Reverting to the webview version in 1.3.0 seems to fix this issue. Maybe this even is even only related to the webview2loader.dll not being preset, who knows and maybe this is only a Windows issue. Use with 1JPM: implementation("com.github.Osiris-Team.webview_java:core:1.3.2");
implementation("com.github.Osiris-Team.webview_java:bridge:1.3.2"); |
They were self-built. You can checkout this GH action to see how I was doing it.
Unfortunately not, I have decided to step away from webview_java and have been meaning to get in contact with some people about someone taking over maintaining. |
@e3ndr Support Swing |
@Osiris-Team if you're willing to contribute, i believe the issue is weak references to the native callback interfaces. basically, the JVM will garbage collect those callbacks since the function is returning. i don't think that fixes the swing issue but it might be related. |
@e3ndr I would love to. However I have no idea what that even means, and since I got it working by downgrading the dll there is little motivation for me to fix that haha. |
The error is posted below. This happens when just running the Swing example from this repo.
Exception in thread "Thread-0" java.lang.Error: Invalid memory access at com.sun.jna.Native.invokeLong(Native Method) at com.sun.jna.Function.invoke(Function.java:431) at com.sun.jna.Function.invoke(Function.java:364) at com.sun.jna.Library$Handler.invoke(Library.java:270) at dev.webview.webview_java.$Proxy0.webview_create(Unknown Source) at dev.webview.webview_java.Webview.<init>(Webview.java:193) at dev.webview.webview_java.Webview.<init>(Webview.java:185) at dev.webview.webview_java.Webview.<init>(Webview.java:177) at dev.webview.webview_java.Webview$1.lambda$paint$0(Webview.java:77) at java.base/java.lang.Thread.run(Thread.java:833)
The text was updated successfully, but these errors were encountered: