-
-
Notifications
You must be signed in to change notification settings - Fork 280
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 1.1.1 VM crash #290
Comments
Yes, disable at command line:
Or in Java code: UIManager.put( "TitlePane.useWindowDecorations", false ); |
Setting the property seems to solve the crash. Thanks! I wonder how hard it can be to detect that native access does not work to avoid a crash 😉 I am not sure I can provide a testing environment, but I can easily test by replacing the JAR file on my setup. Do not hesitate! |
Have tried Webswing and could reproduce the crash. Anyway, trying to use FlatLaf native window decorations in Webswing does not make any sense. |
I agree that using native window decoration in WebSwing does not make sense. Just one comment on the fix, I think relying on WebSwing system property is dangerous: if a product is made to be launched both in WebSwing and regular, it might have some WebSwing related properties set. One possible detection I used (but there may exist better!) is: Thanks a lot for the good work! 👍 |
Hmm, I actually assumed that Do you know that it is also set when not running on Webswing server? Searched for |
Hi, I'm trying flatlaf in my application, which can run on windows 10/11 and webswing.
- if( SystemInfo.isProjector || SystemInfo.isWinPE ) This method is called in JDialog class: if (JDialog.isDefaultLookAndFeelDecorated()) { Can you change this (I even think the original crash was not on this lines) or have any ideia on how can I get the same style on JDialogs both in windows and webswing? I tried to run, during debug, the lines inside the if ( setUndecorated(true); getRootPane().setWindowDecorationStyle(JRootPane.PLAIN_DIALOG); ) and it works like a charm... |
Hi!
I had an experimental project using WebSwing and I upgraded FlatLaf to give WebSwing another try. For some reasons, the VM now crashes. I am using Windows 10.
This crash could well be unrelated to FlatLaf but the crash dump makes me think FlatLaf is the culprit. I think it is because of the native code which might access handles of windows, but these do not really exist (rendering is in memory and it sends graphics directive to a client).
Is there a way to deactivate native accesses (all of them?) so that I can see if this really is the cause?
The relevant part of the crash dump:
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffad7cc4e50, pid=11324, tid=15124
JRE version: OpenJDK Runtime Environment (13.0.2+8) (build 13.0.2+8)
Java VM: OpenJDK 64-Bit Server VM (13.0.2+8, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
Problematic frame:
V [jvm.dll+0x104e50]
(snip)
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.formdev.flatlaf.ui.FlatWindowsNativeWindowBorder$WndProc.installImpl(Ljava/awt/Window;)J+0
j com.formdev.flatlaf.ui.FlatWindowsNativeWindowBorder$WndProc.(Lcom/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder;Ljava/awt/Window;)V+17
j com.formdev.flatlaf.ui.FlatWindowsNativeWindowBorder.install(Ljava/awt/Window;)V+77
j com.formdev.flatlaf.ui.FlatWindowsNativeWindowBorder.setHasCustomDecoration(Ljava/awt/Window;Z)V+6
j com.formdev.flatlaf.ui.FlatNativeWindowBorder.setHasCustomDecoration(Ljava/awt/Window;Z)V+24
j com.formdev.flatlaf.ui.FlatNativeWindowBorder.install(Ljava/awt/Window;Ljava/lang/String;)V+77
j com.formdev.flatlaf.ui.FlatNativeWindowBorder.lambda$install$0(Ljava/beans/PropertyChangeEvent;)V+18
j com.formdev.flatlaf.ui.FlatNativeWindowBorder$$Lambda$278.propertyChange(Ljava/beans/PropertyChangeEvent;)V+1
J 3453 c1 java.beans.PropertyChangeSupport.fire([Ljava/beans/PropertyChangeListener;Ljava/beans/PropertyChangeEvent;)V java.desktop@13.0.2 (39 bytes) @ 0x000001f44d28d80c [0x000001f44d28d6c0+0x000000000000014c]
j java.beans.PropertyChangeSupport.firePropertyChange(Ljava/beans/PropertyChangeEvent;)V+77 java.desktop@13.0.2
J 3427 c1 java.awt.Component.firePropertyChange(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V java.desktop@13.0.2 (59 bytes) @ 0x000001f44ce338f4 [0x000001f44ce33040+0x00000000000008b4]
j javax.swing.JComponent.addNotify()V+13 java.desktop@13.0.2
j javax.swing.JRootPane.addNotify()V+1 java.desktop@13.0.2
j java.awt.Container.addNotify()V+61 java.desktop@13.0.2
j java.awt.Window.addNotify()V+75 java.desktop@13.0.2
j java.awt.Frame.addNotify()V+72 java.desktop@13.0.2
j java.awt.Window.pack()V+28 java.desktop@13.0.2
The text was updated successfully, but these errors were encountered: