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

DataFormatException with badColor3 #2521

Open
2 tasks done
opcoach opened this issue Nov 18, 2024 · 4 comments
Open
2 tasks done

DataFormatException with badColor3 #2521

opcoach opened this issue Nov 18, 2024 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@opcoach
Copy link
Member

opcoach commented Nov 18, 2024

Let's make sure issue is not already fixed in latest builds first.

Steps to reproduce

From a fresh installation and clean workspace:

Install the setup of 'platform ui' by dragging the setup link in the banner of the installer : see Setting your environment and projects guide

Set a breakpoint in StringConverter line 568 (on the throw DataFormatException of asRGB(String) ) :

image

Launch with all the plugins and hit the breakpoint.

The value received is 0,0, 1x which is not compliant with the format expected by StringConverter. Should be 0,0,1 or something with 3 Integers.

If you go up in the stack trace, you will see that it concerns the color definition 'badColor3'.

Tested under this environment:

  • OS & version: macOS X 15.1 (sequoia).
  • Eclipse IDE/Platform version (as shown in Help > About): Version: 2024-12 (4.34) Build id: I20241117-1800 (got from the platform.ui current setup).

Community

  • I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.
@opcoach opcoach added bug Something isn't working good first issue Good for newcomers labels Nov 18, 2024
@opcoach
Copy link
Member Author

opcoach commented Nov 18, 2024

Here is the stack trace :

!ENTRY org.eclipse.ui 2 2 2024-11-18 15:04:13.529
!MESSAGE Could not parse value for theme color badColor3
!STACK 0
org.eclipse.jface.resource.DataFormatException: For input string: "1x"
at org.eclipse.jface.resource.StringConverter.asRGB(StringConverter.java:568)
at org.eclipse.ui.themes.ColorUtil.getColorValue(ColorUtil.java:159)
at org.eclipse.ui.internal.themes.ColorDefinition.getValue(ColorDefinition.java:111)
at org.eclipse.ui.internal.themes.ThemeElementHelper.installColor(ThemeElementHelper.java:272)
at org.eclipse.ui.internal.themes.ThemeElementHelper.populateRegistry(ThemeElementHelper.java:181)
at org.eclipse.ui.internal.Workbench$22.runWithException(Workbench.java:1844)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:35

@vogella
Copy link
Contributor

vogella commented Nov 18, 2024

IIRC this is input for a test case which tests that this exception is thrown. The variable "badColor3" also seems to describe that this is by intention.

@merks
Copy link
Contributor

merks commented Nov 18, 2024

Yes, if you include test bundles in your launch and those intentionally include errors, you should expect this such a problem:

image

This why the setup creates a launcher with meaningful features that do not include tests:

image

So I think the "launch with all the plugins" is not generally a good idea and will generally create strange things, e.g., contributions in the UI that are intended only be to be used in UI tests.

@HannesWell
Copy link
Member

So I think the "launch with all the plugins" is not generally a good idea and will generally create strange things, e.g., contributions in the UI that are intended only be to be used in UI tests.

Yes. That's why I usually start an Eclipse app based on features that contains e.g. only org.eclipse.sdk and automatically includes all dependencies. Unfortunately it's a bit more difficult for tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants