我的 NetBeans 8.2 在启动后冻结。我昨天安装了 8.2,使用大约一小时后关闭。几个小时后,我尝试再次使用它,它冻结了。我卸载了所有内容,安装了 8.1,使用它,在第二次启动时 8.1 开始显示相同的行为(它自发布以来一直正常工作)。我卸载了 8.1,再次安装了 8.2。它在第一次使用时可以正常工作,但之后它开始冻结。
只有在卸载/安装后才能正常工作。我已经尝试删除 C:\Users{my_user}\AppData\Roaming\NetBeans 8.x,但还是不起作用。我将 JDK 更新到最新版本(u112,我使用的是 u92),但同样的问题仍然存在。
以下是 messages.log 的内容:
-------------------------------------------------------------------------------
>Log Session: Thursday, November 10, 2016 7:02:15 PM BRST
>System Info:
Product Version = NetBeans IDE 8.2 (Build 201609300101) (#5fd841261bf9)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0_112; Java HotSpot(TM) 64-Bit Server VM 25.112-b15; Oracle Corporation
Runtime = Java(TM) SE Runtime Environment 1.8.0_112-b15
Java Home = C:\Program Files\Java\jdk1.8.0_112\jre
System Locale; Encoding = en_US (nb); Cp1252
Home Directory = C:\Users\David
Current Directory = C:\Program Files\NetBeans 8.2
User Directory = C:\Users\David\AppData\Roaming\NetBeans\8.2
Cache Directory = C:\Users\David\AppData\Local\NetBeans\Cache\8.2
Installation = C:\Program Files\NetBeans 8.2\nb
C:\Program Files\NetBeans 8.2\ergonomics
C:\Program Files\NetBeans 8.2\ide
C:\Program Files\NetBeans 8.2\extide
C:\Program Files\NetBeans 8.2\java
C:\Program Files\NetBeans 8.2\apisupport
C:\Program Files\NetBeans 8.2\webcommon
C:\Program Files\NetBeans 8.2\websvccommon
C:\Program Files\NetBeans 8.2\enterprise
C:\Program Files\NetBeans 8.2\profiler
C:\Program Files\NetBeans 8.2\php
C:\Program Files\NetBeans 8.2\harness
C:\Program Files\NetBeans 8.2\javafx
C:\Program Files\NetBeans 8.2\platform
Boot & Ext. Classpath = C:\Program Files\Java\jdk1.8.0_112\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_112\jre\classes;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\zipfs.jar
Application Classpath = C:\Program Files\NetBeans 8.2\platform\lib\boot.jar;C:\Program Files\NetBeans 8.2\platform\lib\org-openide-modules.jar;C:\Program Files\NetBeans 8.2\platform\lib\org-openide-util-lookup.jar;C:\Program Files\NetBeans 8.2\platform\lib\org-openide-util-ui.jar;C:\Program Files\NetBeans 8.2\platform\lib\org-openide-util.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\boot_ja.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\boot_pt_BR.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\boot_ru.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\boot_zh_CN.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-modules_ja.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-modules_pt_BR.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-modules_ru.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-modules_zh_CN.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-util-lookup_ja.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-util-lookup_pt_BR.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-util-lookup_ru.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-util-lookup_zh_CN.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-util-ui_ja.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-util-ui_pt_BR.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-util-ui_ru.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-util-ui_zh_CN.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-util_ja.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-util_pt_BR.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-util_ru.jar;C:\Program Files\NetBeans 8.2\platform\lib\locale\org-openide-util_zh_CN.jar;C:\Program Files\Java\jdk1.8.0_112\lib\dt.jar;C:\Program Files\Java\jdk1.8.0_112\lib\tools.jar
Startup Classpath = C:\Program Files\NetBeans 8.2\platform\core\asm-all-5.0.1.jar;C:\Program Files\NetBeans 8.2\platform\core\core-base.jar;C:\Program Files\NetBeans 8.2\platform\core\core.jar;C:\Program Files\NetBeans 8.2\platform\core\org-netbeans-libs-asm.jar;C:\Program Files\NetBeans 8.2\platform\core\org-openide-filesystems-compat8.jar;C:\Program Files\NetBeans 8.2\platform\core\org-openide-filesystems.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\core-base_ja.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\core-base_pt_BR.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\core-base_ru.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\core-base_zh_CN.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\core_ja.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\core_pt_BR.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\core_ru.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\core_zh_CN.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\org-netbeans-libs-asm_ja.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\org-netbeans-libs-asm_pt_BR.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\org-netbeans-libs-asm_ru.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\org-netbeans-libs-asm_zh_CN.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\org-openide-filesystems-compat8_ja.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\org-openide-filesystems-compat8_pt_BR.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\org-openide-filesystems-compat8_ru.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\org-openide-filesystems-compat8_zh_CN.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\org-openide-filesystems_ja.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\org-openide-filesystems_pt_BR.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\org-openide-filesystems_ru.jar;C:\Program Files\NetBeans 8.2\platform\core\locale\org-openide-filesystems_zh_CN.jar;C:\Program Files\NetBeans 8.2\nb\core\org-netbeans-upgrader.jar;C:\Program Files\NetBeans 8.2\nb\core\locale\core_nb.jar;C:\Program Files\NetBeans 8.2\nb\core\locale\core_nb_ja.jar;C:\Program Files\NetBeans 8.2\nb\core\locale\core_nb_pt_BR.jar;C:\Program Files\NetBeans 8.2\nb\core\locale\core_nb_ru.jar;C:\Program Files\NetBeans 8.2\nb\core\locale\core_nb_zh_CN.jar;C:\Program Files\NetBeans 8.2\nb\core\locale\org-netbeans-upgrader_ja.jar;C:\Program Files\NetBeans 8.2\nb\core\locale\org-netbeans-upgrader_pt_BR.jar;C:\Program Files\NetBeans 8.2\nb\core\locale\org-netbeans-upgrader_ru.jar;C:\Program Files\NetBeans 8.2\nb\core\locale\org-netbeans-upgrader_zh_CN.jar
-------------------------------------------------------------------------------
INFO [org.netbeans.modules.netbinox]: Install area set to file:/C:/Program Files/NetBeans 8.2/
WARNING [org.netbeans.core.modules]: the modules [org.netbeans.modules.xml.text] use org.netbeans.modules.editor.deprecated.pre65formatting which is deprecated.
WARNING [org.netbeans.core.modules]: the modules [org.netbeans.modules.ide.kit, org.netbeans.modules.xml.text] use org.netbeans.modules.editor.structure which is deprecated.
INFO [org.netbeans.core.startup.NbEvents]: Turning on modules:
org.openide.util.lookup [8.33.1 201609300101]
org.openide.util [9.7.1 201609300101]
org.openide.util.ui [9.6.1 201609300101]
org.openide.modules [7.48.1 201609300101]
org.netbeans.api.annotations.common/1 [1.27.1 201609300101]
// lots of other modules here...
org.eclipse.equinox.app [1.3.100 1.3.100.v20110321]
org.eclipse.core.runtime.compatibility.auth [3.2.200 3.2.200.v20110110]
org.eclipse.core.net [1.2.100 1.2.100.I20110511-0800]
org.eclipse.core.contenttype [3.4.100 3.4.100.v20110423-0524]
org.apache.xmlrpc [3.0.0 3.0.0]
org.apache.ws.commons.util [1.0.1 1.0.1]
org.apache.commons.lang [2.6 2.6]
org.apache.commons.codec [1.3.0 1.3.0]
com.jcraft.jzlib [1.0.7 1.0.7]
com.googlecode.javaewah.JavaEWAH [0.7.9 0.7.9]
com.google.guava [15.0.0 15.0.0]
INFO [org.netbeans.core.netigso.Netigso]: bundle [email protected] started
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy resolver: Windows
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy reloading succeeded.
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - mode: direct
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy: fell to default (correct if direct mode went before)
Diagnostic information
Input arguments:
-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade
-Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense
-client
-Xss2m
-Xms32m
-Dapple.laf.useScreenMenuBar=true
-Dapple.awt.graphics.UseQuartz=true
-Dsun.java2d.noddraw=true
-Dsun.java2d.dpiaware=true
-Dsun.zip.disableMemoryMapping=true
-Xmx1024m
-Djdk.home=C:\Program Files\Java\jdk1.8.0_112
-Djdk.launcher.addexports.0=java.desktop/sun.awt=ALL-UNNAMED
-Djdk.launcher.addexports.1=java.base/jdk.internal.jrtfs=ALL-UNNAMED
-Djdk.launcher.addexports.2=java.desktop/java.awt.peer=ALL-UNNAMED
-Djdk.launcher.addexports.3=java.desktop/com.sun.beans.editors=ALL-UNNAMED
-Djdk.launcher.addexports.3=java.desktop/sun.awt.im=ALL-UNNAMED
-Djdk.launcher.addexports.4=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED
-Djdk.launcher.addexports.5=java.management/sun.management=ALL-UNNAMED
-Dnetbeans.home=C:\Program Files\NetBeans 8.2\platform
-Dnetbeans.user=C:\Users\David\AppData\Roaming\NetBeans\8.2
-Dnetbeans.default_userdir_root=C:\Users\David\AppData\Roaming\NetBeans
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=C:\Users\David\AppData\Roaming\NetBeans\8.2\var\log\heapdump.hprof
-Dsun.awt.keepWorkingSetOnMinimize=true
-Dnetbeans.dirs=C:\Program Files\NetBeans 8.2\nb;C:\Program Files\NetBeans 8.2\ergonomics;C:\Program Files\NetBeans 8.2\ide;C:\Program Files\NetBeans 8.2\extide;C:\Program Files\NetBeans 8.2\java;C:\Program Files\NetBeans 8.2\apisupport;C:\Program Files\NetBeans 8.2\webcommon;C:\Program Files\NetBeans 8.2\websvccommon;C:\Program Files\NetBeans 8.2\enterprise;C:\Program Files\NetBeans 8.2\mobility;C:\Program Files\NetBeans 8.2\profiler;C:\Program Files\NetBeans 8.2\python;C:\Program Files\NetBeans 8.2\php;C:\Program Files\NetBeans 8.2\identity;C:\Program Files\NetBeans 8.2\harness;C:\Program Files\NetBeans 8.2\cnd;C:\Program Files\NetBeans 8.2\cndext;C:\Program Files\NetBeans 8.2\dlight;C:\Program Files\NetBeans 8.2\groovy;C:\Program Files\NetBeans 8.2\extra;C:\Program Files\NetBeans 8.2\javacard;C:\Program Files\NetBeans 8.2\javafx
exit
Compiler: HotSpot 64-Bit Tiered Compilers
Heap memory usage: initial 32.0MB maximum 910.5MB
Non heap memory usage: initial 2.4MB maximum -1b
Garbage collector: PS Scavenge (Collections=9 Total time spent=0s)
Garbage collector: PS MarkSweep (Collections=2 Total time spent=0s)
Classes: loaded=6357 total loaded=6357 unloaded 0
INFO [org.netbeans.core.ui.warmup.DiagnosticTask]: Total memory 8,478,961,664
INFO [org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogParser]: Unpaired license 00000008 without any module.
有人知道会发生什么吗?
答案1
在这些情况下,准确诊断问题需要的是线程转储。它通常会给出冻结原因的线索。
NetBeans IDE 是基于 Java 构建的,而 Java 有 5 或 6 种不同的方法来获取正在运行的应用程序的线程转储(只需谷歌一下)。在这些方法中,首选的是所谓的Ctrl-Break 方法因为它是提供最多信息的方法。该方法的缺点是您需要从控制台窗口启动应用程序(在本例中为 NetBeans IDE)。但如果您可以始终如一地复制冻结,那么我认为这对您来说不是问题。如果您使用的是 Windows,请执行以下操作:
- 开始
cmd.exe
- 从命令窗口启动您的应用程序,例如
C:\Program Files\NetBeans 8.2\bin\netbeans64.exe
。 - 等待冻结发生。
- 现在按 Ctrl-Break在命令窗口中从步骤 1 开始。这将在命令窗口中打印一个线程转储。
- 将线程转储作为问题的一部分上传。(如果太大,则将其托管在某处)
Linux/MacOSX 的说明类似,尽管在步骤 4 中您需要QUIT
使用 kill 命令向您的进程发送信号。
答案2
好吧,我真的不能说这是否 100% 确定,但在我看来,这似乎与我的显示器的使用方式有关。使用扩展桌面时,NetBeans 会冻结。仅显示主显示器或仅显示辅助显示器时,它可以正常工作。除非有人可以确认,否则我不会将此答案标记为正确。