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

Ruffle Emulation (WebAssembly, HTML5) Fails in Integrated SWT Browser on M1/M2/M3 Macs Post-Sonoma Update #1210

Open
andrinziegler opened this issue May 3, 2024 · 3 comments
Labels
macOS happens on macOS

Comments

@andrinziegler
Copy link

Describe the bug
In the Eclipse RCP integrated browser, we utilize Ruffle to emulate Flash content. However, we have encountered an issue on Mac computers equipped with M1, M2, or M3 chips where Ruffle ceases to function within the integrated SWT browser following an update to Sonoma. Notably, Ruffle continues to operate successfully in the standalone version of Safari, indicating that the problem is specific to the integration within the SWT-Safari environment.

What is Ruffle
Ruffle is an open-source emulator designed to play Adobe Flash content, using WebAssembly and HTML5 technologies instead of the now-deprecated Flash plugin. As Flash was widely used for multimedia applications, games, and interactive content on the web, Ruffle serves as an important tool for preserving this type of content on modern web browsers without needing the original Flash plugin, which is no longer supported or secure to use. (ruffle.rs)

To Reproduce

  1. Open the Eclipse Internal Web Browser with the latest Safari (Sonoma 17.4)

Screenshot 2024-05-03 at 14 32 29

  1. Open the ruffle.rs website with the demo: https://ruffle.rs/demo/
Bildschirmfoto 2024-05-03 um 14 32 26
  1. As you can see the .swf-File is deformed and not working properly

Expected behavior
If you open the same webpage in Safari, outside of the SWT-Browser:
Bildschirmfoto 2024-05-03 um 14 33 10

The SWF is properly displayed.

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • Windows
    • Linux
    • macOS, Sonoma, M1, M2, M3

Version since
Eclipse or SWT version since when the behavior is seen: Eclipse 2024-03

@Phillipus
Copy link
Contributor

I tried it on my setup and it renders OK:

MacBook Air 15" M2
macOS Sonoma 14.4.1
Safari version 17.4.1 (19618.1.15.11.14)
Eclipse 4.31 and 4.32 latest I-build

import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class SWTBrowserTest {
    
    public static void main(String[] args) {
        final Display display = new Display();

        final Shell shell = new Shell(display);
        shell.setText("SWT Browser");
        shell.setLayout(new FillLayout());
        shell.setSize(1024, 768);
        
        Browser browser = new Browser(shell, SWT.NONE);
        browser.setUrl("https://ruffle.rs/demo/");
        
        shell.open();

        while(!shell.isDisposed()) {
            if(!display.readAndDispatch()) {
                display.sleep();
            }
        }

        display.dispose();
    }
}
Screenshot 2024-05-03 at 15 11 54

@andrinziegler
Copy link
Author

Thanks for checking.

It seems like the issue is only with the x86 build of Eclipse; the AArch64 build is working fine. To keep things moving, we're thinking of switching to building for AArch64 instead. Before we make the switch, though we would like to know why x86 is causing trouble.

@Phillipus
Copy link
Contributor

Phillipus commented May 6, 2024

It seems like the issue is only with the x86 build of Eclipse

I can confirm that. Using the same machine as in my previous post I set the target SWT platform to x86_64 and the same for the JDK and I saw the artefacts in your first screenshot. However, it's OK on macOS Ventura x86_64, so it must be something in the combination of Sonoma and x86_64.

@jukzi jukzi added the macOS happens on macOS label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macOS happens on macOS
Projects
None yet
Development

No branches or pull requests

3 participants