[macOS] Delay when closing dialog
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- java, macos
- 领域
- desktop, desktop-dev
调研方向
The payload contains only the reproduction snippet, with no source files named. Start by running the snippet on macOS, then find where Display.readAndDispatch() and the Cocoa event loop handle closing a dialog. The bug is confirmed when the dialog stays open during Thread.sleep(4000), and the fix is done when it closes immediately as it does on Windows and Linux.
由索引模型根据 Issue 内容生成。
描述
- All versions of SWT and JFace
- macOS 15, 26 or 27
- Java 25 Temurin
- This problem has always existed
There can be a delay when closing a Dialog (JFace or SWT) on Mac if it's followed by a long running task. This delay does not occur on Windows or Linux where the dialog is closed immediately.
Run the Snippet. On Windows or Linux the dialog or message box closes immediately. On Mac the dialog only closes when the long running task completes.
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
public class DialogCloseDelay {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setText("Dialog Test");
shell.setLayout(new FillLayout());
shell.setSize(450, 250);
shell.open();
// Same behavior on JFace Dialog or SWT Dialog (MessageBox)
boolean useDialog = true;
if(useDialog) {
Dialog dialog = new Dialog(shell) {};
dialog.open();
}
else {
MessageBox box = new MessageBox(shell);
box.open();
}
// Uncomment this to unfreeze it
// shell.getDisplay().readAndDispatch();
// Long running task
try {
Thread.sleep(4000);
}
catch(InterruptedException e) {}
while(!shell.isDisposed()) {
if(!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
If the following line in the Snippet is uncommented there is no freeze:
shell.getDisplay().readAndDispatch();
- 主要语言
- Java
- 星标
- 202
- 派生
- 206
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 109
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-platform/eclipse.platform.swt 的其他 Issue
-
[Win32] Table tooltip indexes cell font with subitem -1可能已有人在做 @fdesbiens 于 16 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
eclipse-platform/eclipse.platform.swt#3752 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
eclipse-platform/eclipse.platform.swt#3546 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
eclipse-platform/eclipse.platform.swt#3428 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 75/100
eclipse-platform/eclipse.platform.swt#3336 · 3 条评论 ·
维护者通常 1 天内回复
-
[Cocoa] NPE in Text.shouldChangeTextInRange_replacementString when the press-and-hold accent menu inserts text可能已有人在做 @Jm6CnDDXBwFTakS 于 1 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 25/100
eclipse-platform/eclipse.platform.swt#3819 ·
维护者通常 1 天内回复
查看 eclipse-platform/eclipse.platform.swt 的全部 Issue
相似的 Issue
-
API `/api/dataverses/{identifier}/dataset/linkingDataverses?alreadyLinking=true` returns at most 1 collection可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭Type: Bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
javaoperatorsdk.client.oauth-token has no effect on the Kubernetes client可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
-
MCP add-on: JSON responses with non-ASCII characters are truncated (wrong Content-Length)可能已有人在做 @dhanushbs10 今天认领。 未关闭add-on bug in:mcp
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Map.Coordinate does not implement proper equals可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭vaadin-map
难度 2/5 1-3 小时 新手友好度 70/100
vaadin/flow-components#10586 ·
维护者通常 1 天内回复
-
WeReadInstaller writes the launcher database on the main thread at handover (Activity pause timeout)未关闭bug good first issue
难度 2/5 1-3 小时 新手友好度 70/100