[Linux] Crash to desktop in Browser using OpenWindowListener

Đang mở
#3,416 7 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
java, linux
Lĩnh vực
desktop

Hướng nghiên cứu

Run the provided Java SWT snippet on Linux and click the link to reproduce the crash; compare with Windows or Mac, where it works. Then trace the SWT Browser path involving OpenWindowListener on Linux. Done means clicking the link opens it without the application quitting to desktop.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug Linux/GTK regression

On Linux with the latest SWT I-build run the following snippet and click the "Click" link. It should open the link in the Browser but after a few seconds quits to desktop. In an RCP app the whole app quits to desktop.

  • Works on Windows and Mac
  • Crashes on Linux Mint 22.3 (X11) and Ubuntu 26.04 (Wayland)
  • Java 21
  • Latest SWT 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(400, 400);
        
        Browser browser = new Browser(shell, SWT.NONE);
        browser.setText("<a href='https://www.eclipse.org' target='_blank'>Click</a>");
        
        browser.addOpenWindowListener(event -> {
            event.browser = browser;
        });
        
        shell.open();

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

        display.dispose();
    }
}
Ngôn ngữ chính
Java
Star
202
Fork
206
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
99

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-platform/eclipse.platform.swt

Tất cả issue của eclipse-platform/eclipse.platform.swt

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.