I've seen interesting issue and found a workaround. I'm posting here in case anyone will have this issue too.
I have Java application with exe launcher and splash screen (“PhpStorm.exe”, “idea.exe”). Recently it stopped launching with error:
The JVM could not be started. The maximum heap size (-Xmx) might be
too large or an antivirus or firewall tool could block the execution.
Error log of application:
ERROR: could not initialize JVM
Hiding splash screen
Default options are (“PhpStorm.exe.vmoptions”):
FARR sometimes can launch application, and sometimes can not (error message). If I launch directly, it always works.
If I raise maximum heap size to 1200 MB (“-Xmx1200m”), FARR will never be able to launch application, but manual launch will still work.
This issue is explained here: "The JVM could not be started. The main method may have thrown an exception" error when starting idea.exe :: JetBrains Developer Community
It happens because the native idea.exe executable built with the exe4j uses the splash screen which loads a dll (to decode the splash image) in the address space of the process. The jvm.dll loaded after the splash needs to allocate the heap memory in one chunk, however the dll loaded before the jvm.dll can fragment the address space (limited to 2GB for the 32-bit applications) too much and there will be no single chunk of free memory required for the JVM to initialize.
Depending on the other DLLs loaded, applications with DLL hooks and drivers installed on the system, IntelliJ IDEA may be not able to start even with relatively low heap size of 512m.
To make it work again with FARR you should uncheck (Program Options → Settings → Launching Files):
[ ] Use file launch helper utilityAlternative way - uncheck:
[ ] Always launch shortcuts directly instead of resolving links
You don't need to lower maximum heap size (-Xmx).
Seems that launch helper somehow changes memory allocation of child process and application can't launch.
I've unchecked “Use file launch helper utility” and all is working correct now (and I still can launch *.doc, Word 2010, etc).
Environment: Java 1.6.0_31, Windows 7 x64, FARR v2.105.01.