Skip to content
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

Child app launched from Eclipse no longer shows splash screen since I20240507-2220 build (Mac aarch64) #625

Closed
Phillipus opened this issue May 10, 2024 · 9 comments · Fixed by #629

Comments

@Phillipus
Copy link

Phillipus commented May 10, 2024

I'm not sure if Equinox is the right place for this but I'll try....

When I launch my RCP app (or a child Eclipse instance) from Eclipse I get to see the splash screen and the RCP app gains the focus. Since I-Build I20240507-2220 this no longer happens. This is on macOS aarch64.

@HannesWell Can you help? Did something change?

@Phillipus Phillipus changed the title Child RCP app launched from Eclipse no longer shows splash screen since I20240508-0410 build Child RCP app launched from Eclipse no longer shows splash screen since I20240508-0410 build (Mac aarch64) May 10, 2024
@Phillipus
Copy link
Author

Phillipus commented May 10, 2024

Steps to reproduce:

  1. Download I-build Eclipse for mac aarch64 - https://download.eclipse.org/eclipse/downloads/drops4/I20240505-1800/
  2. Launch this Eclipse with a clean workspace and create a new Launch Configuration and select "org.eclipse.platform.ide" in the "Run a Product" section.
  3. Launch this child Eclipse and see the splash screen

And:

  1. Download I-build Eclipse for mac aarch64 - https://download.eclipse.org/eclipse/downloads/drops4/I20240507-2220/ (or later)
  2. Launch this Eclipse with the previous workspace to re-use the previous Launch Configuration (or create a new one as before)
  3. Launch this child Eclipse and there is no splash screen

@Phillipus Phillipus changed the title Child RCP app launched from Eclipse no longer shows splash screen since I20240508-0410 build (Mac aarch64) Child app launched from Eclipse no longer shows splash screen since I20240508-0410 build (Mac aarch64) May 10, 2024
@HannesWell
Copy link
Member

I don't have time to investigate this before next week, sorry. But there have been a couple of changes affecting the executable and launcher library for Mac the day before that build, e.g. regarding file-permissions.
I don't recall a change in PDE form the top of my head, which could be another location influencing that.

@Phillipus Phillipus changed the title Child app launched from Eclipse no longer shows splash screen since I20240508-0410 build (Mac aarch64) Child app launched from Eclipse no longer shows splash screen since I20240507-2220 build (Mac aarch64) May 10, 2024
@Phillipus
Copy link
Author

I don't have time to investigate this before next week, sorry. But there have been a couple of changes affecting the executable and launcher library for Mac the day before that build, e.g. regarding file-permissions. I don't recall a change in PDE form the top of my head, which could be another location influencing that.

Actually it's since version I20240507-2220 so I've edited the original posts. This is only affecting Mac aarch64. Windows and Mac x86_64 is OK. At the moment I can't see any changes that would affect this so any clues are helpful. :-)

@Phillipus
Copy link
Author

@HannesWell I found the problem.

The org.eclipse.equinox.launcher.cocoa.macosx_1.2.1000.v20240507-1834 folder is missing the eclipse_11902.so file. This file is in the org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.1000.v20240507-1834 folder but it needs to be in the first folder as well.

Build I20240505-1800:

1

 

Build I20240507-2220 and later:

2

@Phillipus
Copy link
Author

Phillipus commented May 10, 2024

It's interesting that on Mac aarch64 two launcher bundles are created:

org.eclipse.equinox.launcher.cocoa.macosx_xxxxxxxx
org.eclipse.equinox.launcher.cocoa.macosx.aarch64_xxxxxxxx

Whereas on Mac x86_64 only one is created:

org.eclipse.equinox.launcher.cocoa.macosx.x86_64_xxxxxxxx

I once asked why this is so. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=572797#c4

I'm not sure which one is actually used on aarch64. As reported here, the first one is needed for the splash screen to show when launching a child Eclipse/RCP app but the second one is needed to actually launch Eclipse/RCP app.

@Phillipus
Copy link
Author

Phillipus commented May 10, 2024

Another strange thing...

To test my RCP app I have a target definition file targeting the latest I-builds and one targeting the Eclipse 4.28 p2 repo so I can compare.

It seems that when launching my RCP app from Eclipse it looks for the most recent org.eclipse.equinox.launcher.cocoa.macosx_xxxxx bundle in the target bundle pool because the splash screen is now not showing even though I'm targeting Eclipse 4.28 and it should use the org.eclipse.equinox.launcher.cocoa.macosx_1.2.700.v20221108-1024 bundle.

If I manually delete the latest org.eclipse.equinox.launcher.cocoa.macosx_xxxxx bundle (the one with the missing eclipse_11902.so file) from the target bundle pool it works again.

TL;DR - PDE launch uses the latest version org.eclipse.equinox.launcher in the target bundle pool regardless of what target you specify.

@HannesWell
Copy link
Member

The missing so-file is could be a side-effect of #612. Maybe tycho does not follow sym-links.

But from what you have described #622 (comment) could fix this too.

@Phillipus
Copy link
Author

Phillipus commented May 10, 2024

The missing so-file is could be a side-effect of #612. Maybe tycho does not follow sym-links.

But from what you have described #622 (comment) could fix this too.

I don't really understand all of this, but from my experiments it seems that launching Eclipse or an RCP app natively requires the longer named bundle, but launching a child Eclipse/RCP app from Eclipse requires the shorter named bundle? Also, Mac requires different archs for the so binaries?

@Phillipus
Copy link
Author

I've been trying to figure out why the so library is loaded from the org.eclipse.equinox.launcher.cocoa.macosx location rather than org.eclipse.equinox.launcher.cocoa.macosx.aarch64

I debugged and came to this:

private String getFragmentString(String fragmentOS, String fragmentWS, String fragmentArch) {
StringJoiner buffer = new StringJoiner("."); //$NON-NLS-1$
buffer.add(PLUGIN_ID).add(fragmentWS).add(fragmentOS);
if (!(fragmentOS.equals(Constants.OS_MACOSX) && !Constants.ARCH_X86_64.equals(fragmentArch))) {
buffer.add(fragmentArch);
}
return buffer.toString();
}

fragmentArch is not being added to the string because of the if condition. If that condition is removed the so file is loaded from org.eclipse.equinox.launcher.cocoa.macosx.aarch64.

HannesWell added a commit to HannesWell/equinox that referenced this issue May 13, 2024
For all supported platforms full-named native launcher fragments exist
with name 'org.eclipse.equinox.launcher.<ws>.<os>.<arch>' for a long
time, even for all architectures supported on mac.

Also remove consideration of old development locations of the launcher
fragments.

This also fixes eclipse-equinox#625
HannesWell added a commit to HannesWell/equinox that referenced this issue May 13, 2024
For all supported platforms full-named native launcher fragments exist
with name 'org.eclipse.equinox.launcher.<ws>.<os>.<arch>' for a long
time, even for all architectures supported on mac.

Also remove consideration of old development locations of the launcher
fragments.

This also fixes eclipse-equinox#625
HannesWell added a commit that referenced this issue May 13, 2024
For all supported platforms full-named native launcher fragments exist
with name 'org.eclipse.equinox.launcher.<ws>.<os>.<arch>' for a long
time, even for all architectures supported on mac.

Also remove consideration of old development locations of the launcher
fragments.

This also fixes #625
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants