Skip to content

VisualVM 2.2 misses visualvm.conf at import #636

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

Closed
catap opened this issue Apr 23, 2025 · 10 comments
Closed

VisualVM 2.2 misses visualvm.conf at import #636

catap opened this issue Apr 23, 2025 · 10 comments
Assignees
Labels

Comments

@catap
Copy link

catap commented Apr 23, 2025

Describe the bug

On the first start of VisualVM 2.2 I selected to import settings from 2.1.10, and it had missed custom visualvm.conf.

To Reproduce
Steps to reproduce the behavior:

~ $ find ~/.visualvm -name '*.conf'           
/home/catap/.visualvm/2.1.10/etc/visualvm.conf
~ $ ls ~/.visualvm/                           
2.1.10
~ $ visual                                                                                                                                
visualinfo  visualvm    
~ $ visualvm                                                                                                                              
~ $ find ~/.visualvm -name '*.conf' 
/home/catap/.visualvm/2.1.10/etc/visualvm.conf
~ $ ls ~/.visualvm/                 
2.1.10 2.2
~ $ 

Expected behavior
File should be copied.

VisualVM log

messages.log

Screenshots
It doesn't applicable.

Desktop (please complete the following information):

  • OS: OpenBSD 7.7
  • JDK version: openjdk version "21.0.6" 2025-01-21
  • Version: 2.2

Additional context

@catap catap added the bug label Apr 23, 2025
@thurka thurka self-assigned this Apr 30, 2025
@thurka
Copy link
Member

thurka commented Apr 30, 2025

Note that even if this is copied, it will not be used for the initial start.

@catap
Copy link
Author

catap commented Apr 30, 2025

Sure, but I have visualvm_default_options="${visualvm_default_options} -J-Dsun.java2d.uiScale=3" here to use it on HIDPI screen and an update simple "forgot" that settings.

@thurka
Copy link
Member

thurka commented Apr 30, 2025

Sure, but I have visualvm_default_options="${visualvm_default_options} -J-Dsun.java2d.uiScale=3" here to use it on HIDPI screen and an update simple "forgot" that settings.

The fix will migrate etc/visualvm.conf, but it will only be used during the second startup.

@catap
Copy link
Author

catap commented Apr 30, 2025

That's much better than nothing.

@catap
Copy link
Author

catap commented May 1, 2025

BTW if you may suggest better way to support HIDPI screen, I'll be appricieted.

@thurka
Copy link
Member

thurka commented May 2, 2025

BTW if you may suggest better way to support HIDPI screen, I'll be appricieted.

You can try Flat LAF. It claims to scale on HiDPI displays and runs on Java 8 or newer. To start VisualVM with Flat Light LAF use the command below:
visualvm_22 $ bin/visualvm --cp:a platform/modules/ext/flatlaf-3.3.jar --laf com.formdev.flatlaf.FlatLightLaf

thurka added a commit that referenced this issue May 2, 2025
@catap
Copy link
Author

catap commented May 2, 2025

Thanks, but it doesn't work here :(

~ $ visualvm --cp:a platform/modules/ext/flatlaf-3.3.jar --laf com.formdev.flatlaf.FlatLightLaf 
[0.412s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 4k, detached.
[0.412s][warning][os,thread] Failed to start the native thread for java.lang.Thread "AWT-XAWT"
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
        at java.base/java.lang.Thread.start0(Native Method)
        at java.base/java.lang.Thread.start(Thread.java:1526)
        at java.desktop/sun.awt.X11.XToolkit.<init>(XToolkit.java:445)
        at java.desktop/sun.awt.PlatformGraphicsInfo.createToolkit(PlatformGraphicsInfo.java:41)
        at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:595)
        at java.desktop/java.awt.Window.getToolkit(Window.java:1380)
        at java.desktop/java.awt.Window.init(Window.java:523)
        at java.desktop/java.awt.Window.<init>(Window.java:554)
        at java.desktop/java.awt.Frame.<init>(Frame.java:428)
        at org.netbeans.core.startup.Splash.setRunning(Splash.java:161)
        at org.netbeans.core.startup.Main.start(Main.java:292)
        at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98)
        at java.base/java.lang.Thread.run(Thread.java:1583)
[0.424s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 4k, detached.
[0.424s][warning][os,thread] Failed to start the native thread for java.lang.Thread "XToolkt-Shutdown-Thread"
~ $

BTW Intellij IDEA works on the same machine.

@catap
Copy link
Author

catap commented May 2, 2025

and that issue wasn't related to VisualVM. It was related to a patch which I had tested O:-)

Without it, it did started, but without -J-Dsun.java2d.uiScale=3 it doesn't scale anything, and I haven't see any differences with or without FlatLAF.

@thurka
Copy link
Member

thurka commented May 5, 2025

Fixed in master.

HiDPI and LAF is off-topic here. If you have more question please use our feedback email address.

@thurka thurka closed this as completed May 5, 2025
@neilcsmith-net
Copy link

FlatLaf is also now the only properly supported LaF in the NetBeans platform.

@oracle oracle locked as off-topic and limited conversation to collaborators May 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants