不可重现的崩溃(无错误/异常)。当我运行一个对话框以仅 10 次选择一个文件夹时发生。代码:
public String getFilePathFromDialog(String dialogTitle) {
JFileChooser fileChooser;
fileChooser = new JFileChooser();
fileChooser.setDialogTitle(dialogTitle);
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
fileChooser.setAcceptAllFileFilterUsed(true);
if (fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
return fileChooser.getSelectedFile().toString();
} else {
return "";
}
}
它使我的应用程序崩溃。在此之后,我只能使用以下方法关闭它:Ctrl+Alt+Delete -> 任务管理器 -> 杀死它 -> 然后我得到“Java(TM) Platform SE 二进制文件没有响应”并点击关闭按钮
我做错了什么还是一个错误?
我找到了下面提到的 Peter 的故障转储文件。这是其中的一些:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x62a5ff52, pid=5516, tid=5312
#
# Problematic frame:
# C [nvd3dum.dll+0x2fff52]
#
Current thread (0x04323400): JavaThread "AWT-Windows" daemon [_thread_in_native, id=5312, stack(0x04d60000,0x04db0000)]
siginfo: ExceptionCode=0xc0000005, writing address 0x04ee9004