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

[Mac] ClassCastException when selecting a color in FontDialog #1814

Open
Phillipus opened this issue Feb 8, 2025 · 0 comments
Open

[Mac] ClassCastException when selecting a color in FontDialog #1814

Phillipus opened this issue Feb 8, 2025 · 0 comments

Comments

@Phillipus
Copy link
Contributor

Phillipus commented Feb 8, 2025

Describe the bug
Changing the Font and the Color in a FontDialog on Mac leads to CCE

To Reproduce
Use this snippet to test, or just change a font and font color in Eclipse.

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FontDialog;
import org.eclipse.swt.widgets.Shell;

public class MacFontDialogError {
    public static void main(String[] args) {
        Display display = new Display();
        Shell shell = new Shell(display);
        
        FontDialog dialog = new FontDialog(shell);
        dialog.open();

        display.dispose();
    }
}
  1. Run Snippet.
  2. When the font dialog opens, select a different font (important to do this step)
  3. Then from the drop-down menu at the top left of the dialog, select "Color..." and change the color in the Color chooser
  4. CCE in Display class at line 5991 - in this case it's a FontDialog not a ColorDialog.
Image Image Image

Expected behavior
Should not cause CCE.

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • All OS
    • Windows
    • Linux
    • macOS
  1. Additional OS info (e.g. OS version, Linux Desktop, etc)
    macOS Sonoma and Sequoia

  2. JRE/JDK version
    JDK 17 or 21, doesn't matter.

Version since
Probably a long time.

Phillipus added a commit to Phillipus/eclipse.platform.swt that referenced this issue Feb 8, 2025
Phillipus added a commit to Phillipus/eclipse.platform.swt that referenced this issue Feb 8, 2025
@Phillipus Phillipus changed the title ClassCastException on Mac FontDialog [Mac] ClassCastException when selecting a color in FontDialog Feb 8, 2025
Phillipus added a commit to Phillipus/eclipse.platform.swt that referenced this issue Feb 10, 2025
Phillipus added a commit to Phillipus/eclipse.platform.swt that referenced this issue Feb 15, 2025
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

No branches or pull requests

1 participant