-1

安装了插件 WindowBuilder 的 Eclipse 4.3 (Kepler)(来自http://download.eclipse.org/windowbuilder/WB/integration/4.3/)。在节省约 60% 时导致冻结。使用的组件:JFrame、JLabel、JTextField、JButton、JTable(带模型)、JTabbedPanel、JPanel。

如果我只添加 2 个组件并保存它,那么保存没有问题,但如果我添加超过 5 个组件,那么它在保存时会冻结。中止储蓄没有帮助。所以我按 CTRL+Print 打开我的 ScreenshotCapturer,捕捉屏幕截图然后保存。如果没有 ScreenshotCapturer(我自己用 C# 编写的应用程序),我无法在 Eclipse 中保存我的项目,因为它被冻结了。

所以我在工作区/.metadata/.log 中查找并找到了保存时导致的 NullPointerException:

!MESSAGE Designer [1.6.0.r43x201305211944.201308211039]: java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.wb.core.eval.AstEvaluationEngine$1.runObject(AstEvaluationEngine.java:65) at org .eclipse.wb.internal.core.utils.execution.ExecutionUtils.runObjectLog(ExecutionUtils.java:304) 在 org.eclipse.wb.core.eval.AstEvaluationEngine.evaluate(AstEvaluationEngine.java:63) 在 org.eclipse.wb .internal.swing.model.component.JTableInfo.evaluateColumnModelInvocations(JTableInfo.java:76) 在 org.eclipse.wb.internal.swing.model.component.JTableInfo.access$0(JTableInfo.java:69) 在 org.eclipse。 wb.internal.swing.model.component.JTableInfo$1.evaluateAfter(JTableInfo.java:62) 在 sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source) 在 sun.reflect.DelegatingMethodAccessorImpl。在 org.eclipse.wb.core.model.broadcast.BroadcastSupport$1.intercept(BroadcastSupport.java:208) 在 org.eclipse.wb 的 java.lang.reflect.Method.invoke(Unknown Source) 调用(未知源)。 core.model.broadcast.EvaluationEventListener$$EnhancerByCGLIB$$83eb11fe.evaluateAfter() at org.eclipse.wb.internal.core.parser.JavaInfoParser.evaluateNode(JavaInfoParser.java:1311) at org.eclipse.wb.internal.core .parser.JavaInfoParser.access$1(JavaInfoParser.java:1300) 在 org.eclipse.wb.internal.core.parser.JavaInfoParser$ExecutionFlowParseVisitor$3.run(JavaInfoParser.java:602) 在 org.eclipse.wb.internal.core .utils.execution.ExecutionUtils.runRethrow(ExecutionUtils.java:119) 在 org.eclipse.wb.internal.core.parser.JavaInfoParser$ExecutionFlowParseVisitor.postVisit(JavaInfoParser.java:592) 在 sun.reflect。GeneratedMethodAccessor24.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) .....

我打开 Java VisualVM 查看冻结时正在运行的线程:RMI TCP Accept-0 100% AWT-Windows 100% Attach Listener 100% Signal Dispatcher 100% Main 100%

堆就像疯了一样,每秒钟上升然后下降。

我使用带有 JRE 7 和 JDK 7 的 Windows 7 Professional(64 位,Eclipse 64 位)。

我希望有人有同样的问题并知道解决方案。

4

1 回答 1

0

尝试在 eclipse.ini 中扩大你的 eclipse 内存添加类似的东西

-XX:MaxPermSize=256m

-Xms40m

-Xmx1024m

于 2013-08-21T10:00:07.347 回答