Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351981 - [Native Launcher] Fails to start when paths are long paths
Summary: [Native Launcher] Fails to start when paths are long paths
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Launcher (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-13 10:31 EDT by z.graignic CLA
Modified: 2019-10-08 14:26 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description z.graignic CLA 2011-07-13 10:31:31 EDT
Build Identifier: 

On Windows it is not possible to use in Unicode a long path prefix so paths can go beyond the _MAX_PATH limit. When such paths are used the win32 native launcher fails to find and load the library, producing the "the executable launcher was unable to locate its companion shared library" error when used on the console native launcher.

The given reproduction steps are using eclipse as an example. We are using the console version to start our RCP software.

We have tried with the latest code of the native launcher from the CVS and its the same.


Reproducible: Always

Steps to Reproduce:
1. Write a small console program with the follow code:

#include <windows.h>

#define PATH_TO_RCP_EXE_DIR L"C:\\Dev\\eclipse3.6-perso"
#define EXE_FILENAME L"eclipse.exe"

#define PATH_TO_RCP_EXE PATH_TO_RCP_EXE_DIR L"\\" EXE_FILENAME

int wmain(int argc, wchar_t argv[])
{
	STARTUPINFOW startupInfo;
    ZeroMemory(&startupInfo, sizeof(startupInfo));
    startupInfo.cb = sizeof(startupInfo);
    PROCESS_INFORMATION processInfo;
    ZeroMemory(&processInfo, sizeof(processInfo));

	// This one is working
	//if (CreateProcessW(PATH_TO_RCP_EXE, EXE_FILENAME, NULL, NULL, TRUE, CREATE_NO_WINDOW , NULL, PATH_TO_RCP_EXE_DIR, &startupInfo, &processInfo))

	// This one is not working
    if (CreateProcessW(L"\\\\?\\" PATH_TO_RCP_EXE, EXE_FILENAME, NULL, NULL, TRUE, CREATE_NO_WINDOW , NULL, L"\\\\?\\" PATH_TO_RCP_EXE_DIR, &startupInfo, &processInfo))
	{
	    WaitForSingleObject(processInfo.hProcess, INFINITE);
		CloseHandle(processInfo.hThread);
		CloseHandle(processInfo.hProcess);
	}

	return 0;
}


2. Execute the program

=> The child procress is started but the launcher fails to start the RCP application
Comment 1 Eclipse Genie CLA 2019-10-08 14:26:29 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.