Community
Participate
Working Groups
Created attachment 287177 [details] demo project containing the code to crash Switching a RCP application to use Edge (-Dorg.eclipse.swt.browser.DefaultType=edge), the vm crashes executing the following code: Button runButton = new Button(parent, SWT.PUSH); runButton.setText("open"); runButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { Shell shell = new Shell(Display.getDefault().getActiveShell(), SWT.CLOSE); shell.setLayout(new FillLayout(SWT.HORIZONTAL)); Browser browser = new Browser(shell, SWT.NONE); browser.setText("<a href=\"javascript:jsTest();\">run</a>"); new BrowserFunction(browser, "jsTest") { @Override public Object function(Object[] arguments) { shell.close(); return null; } }; shell.open(); } }); Attached is a demo project based on the "RCP 3.x application with a view" template. Using a Browser with BrowserFunction, after clicking on the button "open" and "run" in the browser-shell the vm crashes with the following log: # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000000, pid=9136, tid=28176 # # JRE version: OpenJDK Runtime Environment Zulu17.28+13-CA (17.0+35) (build 17+35-LTS) # Java VM: OpenJDK 64-Bit Server VM Zulu17.28+13-CA (17+35-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64) # Problematic frame: # C 0x0000000000000000 # # No core dump will be written. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # D:\dev\software\eclipse\hs_err_pid9136.log # hs_err_pid9136.log is attached to this issue. Environment: Eclipse 2021-09 (4.21) Windows 10 Pro for Workstations: 21H1 Java jdk17.0.0
Created attachment 287178 [details] crash dump file
I have run into this problem too with Edge browser. One possible workaround is to invoke "close" in an async task instead of calling it directly.