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

flatlaf-demo-1.6.4.jar exits with UnsatisfiedLinkError on AdoptOpenJDK build 11.0.7+10 #436

Closed
ThisOtterBeGood opened this issue Nov 26, 2021 · 7 comments
Milestone

Comments

@ThisOtterBeGood
Copy link

java -version:

openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)

Exception:

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: 'long com.formdev.flatlaf.ui.FlatWindowsNativeWindowBorder$WndProc.installImpl(java.awt.Window)'
        at com.formdev.flatlaf.ui.FlatWindowsNativeWindowBorder$WndProc.installImpl(Native Method)
        at com.formdev.flatlaf.ui.FlatWindowsNativeWindowBorder$WndProc.<init>(FlatWindowsNativeWindowBorder.java:318)
        at com.formdev.flatlaf.ui.FlatWindowsNativeWindowBorder.install(FlatWindowsNativeWindowBorder.java:166)
        at com.formdev.flatlaf.ui.FlatWindowsNativeWindowBorder.setHasCustomDecoration(FlatWindowsNativeWindowBorder.java:142)
        at com.formdev.flatlaf.ui.FlatNativeWindowBorder.setHasCustomDecoration(FlatNativeWindowBorder.java:234)
        at com.formdev.flatlaf.ui.FlatNativeWindowBorder.install(FlatNativeWindowBorder.java:130)
        at com.formdev.flatlaf.ui.FlatNativeWindowBorder.lambda$install$0(FlatNativeWindowBorder.java:101)
        at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:341)
        at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:334)
        at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:266)
        at java.desktop/java.awt.Component.firePropertyChange(Component.java:8727)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4784)
        at java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:733)
        at java.desktop/java.awt.Container.addNotify(Container.java:2800)
        at java.desktop/java.awt.Window.addNotify(Window.java:786)
        at java.desktop/java.awt.Frame.addNotify(Frame.java:490)
        at java.desktop/java.awt.Window.pack(Window.java:824)
        at com.formdev.flatlaf.demo.FlatLafDemo.lambda$main$0(FlatLafDemo.java:64)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
@Nibby
Copy link

Nibby commented Dec 1, 2021

Bump. This exception happened to us after a user reported this issue after installing a system update for Windows.

@DevCharly
Copy link
Collaborator

Unfortunately can not reproduce this exception...

Seems that extracting the DLL from flatlaf.jar to temporary folder works fine.
Also loading the DLL seems go well.
But invoking a method in the DLL fails...

Could you please run following on command line and post the output:

dir %TEMP%\flatlaf.temp
java -XshowSettings:properties -version

@DevCharly
Copy link
Collaborator

Does this occur on every start? Or occasionally?

@ThisOtterBeGood
Copy link
Author

I'm sorry I hadn't have time to test last week. I just realize it might be a problem with our corporate execution policy, so you might want to stop investigating until i can hash that out.

DevCharly added a commit that referenced this issue Dec 6, 2021
…r` in case that FlatLaf DLL cannot be executed because of restrictions on temporary directory (issue #436)
@DevCharly
Copy link
Collaborator

@ThisOtterBeGood thanks for the info. This could be the reason.

I've modified the code to catch the UnsatisfiedLinkError and continue with standard window decorations.

A updated demo is in the build artifacts here (at the bottom):
https://github.com/JFormDesigner/FlatLaf/actions/runs/1547109693

@Nibby please try the latest 1.6.5-SNAPSHOT: https://github.com/JFormDesigner/FlatLaf#snapshots

@DevCharly DevCharly added this to the 1.6.5 milestone Dec 6, 2021
@ThisOtterBeGood
Copy link
Author

It's our execution policy. It prohibits the usage of ('%temp%\flatlaf.temp\flatlaf-windows-x86_64-9110333436000.dll"

That snapshot works: https://github.com/JFormDesigner/FlatLaf/actions/runs/1547109693
grafik

Thank you so much!

@DevCharly
Copy link
Collaborator

@ThisOtterBeGood many thanks for the update.

FlatLaf 1.6.5 released

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

3 participants