由于我开始使用css(在CN1设置中激活了“ CSS主题支持”),所以每当我在模拟器中启动组件检查器时,在检查器显示之前,都会收到大量的堆栈跟踪错误(下面的示例)。尽管我没有检查过,但似乎屏幕上显示的每个组件都有一个stackTrace。最后,检查器出现并正常工作,但通常需要30至60秒才能首先显示所有堆栈跟踪...
对于一个小的测试示例而言,它并没有发生,因此它似乎是我的代码所特有的,但是由于我在堆栈跟踪中没有看到与我的代码相关的任何内容,所以我对造成该情况的原因有些困惑它。有什么建议或调查途径吗?
谢谢
EDT violation detected!
com.codename1.impl.javase.JavaSEPort$EDTViolation: EDT Violation Stack!
at com.codename1.impl.javase.JavaSEPort.checkEDT(JavaSEPort.java:918)
at com.codename1.impl.javase.JavaSEPort.createFont(JavaSEPort.java:6212)
at com.codename1.ui.Font.<init>(Font.java:99)
at com.codename1.ui.Font.createSystemFont(Font.java:345)
at com.codename1.ui.util.Resources.loadTheme(Resources.java:1351)
at com.codename1.ui.util.Resources.openFileImpl(Resources.java:305)
at com.codename1.ui.util.Resources.openFile(Resources.java:271)
at com.codename1.ui.util.Resources.<init>(Resources.java:191)
at com.codename1.ui.util.Resources.open(Resources.java:742)
at com.codename1.ui.util.Resources.open(Resources.java:679)
at com.codename1.impl.javase.ComponentTreeInspector.<init>(ComponentTreeInspector.java:81)
at com.codename1.impl.javase.JavaSEPort$20.actionPerformed(JavaSEPort.java:2937)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
at java.awt.MenuItem.processEvent(MenuItem.java:628)
at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357)
at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:761)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
答案 0 :(得分:0)
这是我们代码中的EDT违规行为。它不是一个大代码,实际上是允许的,因此此代码是合法的。但是,EDT违规检测代码无法区分我们的代码与您的代码之间的区别。它无法确定特定的违规行为是否为“ OK”。因此,它会使用堆栈跟踪将此警告打印为误报。