-
Notifications
You must be signed in to change notification settings - Fork 59
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
Windows console launcher (eclipsec.exe) not reading vmargs from eclipse.ini when there is no console window #117
Comments
…here is no console window (eclipse-equinox#117) Processes on Windows can be created without a window using the CREATE_NO_WINDOW flag. When the console launcher eclipsec.exe is started as such a process, the isConsoleLauncher function wrongly returns 0 because there is no console window and hence, only eclipsec.ini is consulted for vmargs but not eclipse.ini (see also functions getConfigArgs and getIniFile). The fix is to properly propagate the launcher mode from main to the launcher DLL and removing the incomplete isConsoleLauncher function entirely.
…here is no console window (eclipse-equinox#117) Processes on Windows can be created without a window using the CREATE_NO_WINDOW flag. When the console launcher eclipsec.exe is started as such a process, the isConsoleLauncher function wrongly returns 0 because there is no console window and hence, only eclipsec.ini is consulted for vmargs but not eclipse.ini (see also functions getConfigArgs and getIniFile). The fix is to properly propagate the launcher mode from main to the launcher DLL and removing the incomplete isConsoleLauncher function entirely.
…here is no console window (eclipse-equinox#117) Processes on Windows can be created without a window using the CREATE_NO_WINDOW flag. When the console launcher eclipsec.exe is started as such a process, the isConsoleLauncher function wrongly returns 0 because there is no console window and hence, only eclipsec.ini is consulted for vmargs but not eclipse.ini (see also functions getConfigArgs and getIniFile). The fix is to properly propagate the launcher mode from main to the launcher DLL and removing the incomplete isConsoleLauncher function entirely.
This issue has been inactive for 180 days and is therefore labeled as stale. |
…here is no console window (eclipse-equinox#117) Processes on Windows can be created without a window using the CREATE_NO_WINDOW flag. When the console launcher eclipsec.exe is started as such a process, the isConsoleLauncher function wrongly returns 0 because there is no console window and hence, only eclipsec.ini is consulted for vmargs but not eclipse.ini (see also functions getConfigArgs and getIniFile). The fix is to properly propagate the launcher mode from main to the launcher DLL and removing the incomplete isConsoleLauncher function entirely.
…here is no console window (#117) Processes on Windows can be created without a window using the CREATE_NO_WINDOW flag. When the console launcher eclipsec.exe is started as such a process, the isConsoleLauncher function wrongly returns 0 because there is no console window and hence, only eclipsec.ini is consulted for vmargs but not eclipse.ini (see also functions getConfigArgs and getIniFile). The fix is to properly propagate the launcher mode from main to the launcher DLL and removing the incomplete isConsoleLauncher function entirely.
is this fix part of latest eclipse releases? IIUC, the binaries are picked from following location and I don't see a new commit after this fix.. am I missing something here? |
No - doesn't look like it. In the past it looks like someone has manually run https://ci.eclipse.org/releng/job/Build-eclipse-launcher/ I have raised eclipse-platform/eclipse.platform.releng.aggregator#1407 |
When the console launcher
eclipsec.exe
on Windows is started without a console window, thevmargs
specified ineclipse.ini
are ignored. This can easily be tested e.g. by adding debugging arguments-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000
to theeclipse.ini
of an Eclipse IDE installation.Starting the Eclipse IDE running
eclipsec.exe
on the command line works as expected: The JVM waits for a debugger to attach with the messageListening for transport dt_socket at address: 8000
.Starting the Eclipse IDE using
Runtime.getRuntime().exec("eclipsec.exe")
(easiest to do withjshell
) does not work as expected: The JVM does not wait for a debugger to attach and just runs the Eclipse IDE. Apparently, thevmargs
specified ineclipse.ini
are ignored. In fact, usingprocmon
from SysInternals shows that in this caseeclipsec.exe
only attempts to readeclipsec.ini
but noteclipse.ini
.Whether
eclipse.ini
is consulted in addition toeclipsec.ini
to read thevmargs
is determined by the functionisConsoleLauncher
which checks whether there is a console window or not:equinox/features/org.eclipse.equinox.executable.feature/library/eclipse.c
Lines 1609 to 1618 in a3a9628
It turns out that there are ways to start the console launcher without a console window. One such case is via
Runtime.getRuntime().exec("eclipsec.exe")
which apparently uses theCREATE_NO_WINDOW
flag when creating the process (see https://learn.microsoft.com/en-us/windows/win32/procthread/process-creation-flags).The issue came up when running an Ant script that executes an eclipse application using its console launcher in an
exec
task. Ant usesRuntime.getRuntime().exec("<command_line>")
internally. The workaround in this case is to explicitly specify theeclipse.ini
file on the command line:eclipsec.exe --launcher.ini eclipse.ini
.The text was updated successfully, but these errors were encountered: