#12 Exception in thread "AWT-EventQueue-0"

بسته‌شده
7 سال پیش باز شده توسط kolja · 3 دیدگاه
هنوز محتوایی ایجاد نشده.

it is a race condition caused by iterating through the lines in the pseudo code tree backwards. the vector somehow gets smaller and in the first iteration the index is out of bound.

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 36 >= 34
	at java.util.Vector.elementAt(Vector.java:474)
	at javax.swing.tree.VariableHeightLayoutCache.getNode(VariableHeightLayoutCache.java:994)
	at javax.swing.tree.VariableHeightLayoutCache.getMaxNodeWidth(VariableHeightLayoutCache.java:1007)
	at javax.swing.tree.VariableHeightLayoutCache.getPreferredWidth(VariableHeightLayoutCache.java:309)
	at javax.swing.plaf.basic.BasicTreeUI.updateCachedPreferredSize(BasicTreeUI.java:1900)
	at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(BasicTreeUI.java:2003)
	at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(BasicTreeUI.java:1991)
	at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
	at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:791)
	at java.awt.Container.layout(Container.java:1510)
	at java.awt.Container.doLayout(Container.java:1499)
	at java.awt.Container.validateTree(Container.java:1695)
	at java.awt.Container.validate(Container.java:1630)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:711)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:708)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1731)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	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.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	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)
it is a race condition caused by iterating through the lines in the pseudo code tree backwards. the vector somehow gets smaller and in the first iteration the index is out of bound. ``` Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 36 >= 34 at java.util.Vector.elementAt(Vector.java:474) at javax.swing.tree.VariableHeightLayoutCache.getNode(VariableHeightLayoutCache.java:994) at javax.swing.tree.VariableHeightLayoutCache.getMaxNodeWidth(VariableHeightLayoutCache.java:1007) at javax.swing.tree.VariableHeightLayoutCache.getPreferredWidth(VariableHeightLayoutCache.java:309) at javax.swing.plaf.basic.BasicTreeUI.updateCachedPreferredSize(BasicTreeUI.java:1900) at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(BasicTreeUI.java:2003) at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(BasicTreeUI.java:1991) at javax.swing.JComponent.getPreferredSize(JComponent.java:1662) at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:791) at java.awt.Container.layout(Container.java:1510) at java.awt.Container.doLayout(Container.java:1499) at java.awt.Container.validateTree(Container.java:1695) at java.awt.Container.validate(Container.java:1630) at javax.swing.RepaintManager$3.run(RepaintManager.java:711) at javax.swing.RepaintManager$3.run(RepaintManager.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:708) at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1731) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) 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.awt.EventQueue.dispatchEvent(EventQueue.java:726) 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) ```
I recommend reading https://stackoverflow.com/questions/18311972/swing-thread-safe-programming
Kolja Strohm نظر 7 سال پیش
مالک

Im BetterStructure Branch wurde eine Änderung durchgeführt, welche das Problem beheben sollte. Es muss aber noch ausführlich getestet werden. Siehe 3847267d08 für mehr Details.

Im BetterStructure Branch wurde eine Änderung durchgeführt, welche das Problem beheben sollte. Es muss aber noch ausführlich getestet werden. Siehe https://koljastrohm-games.com:3000/GraphDrawer/NodeShuffler/commit/3847267d087ea670fe35f5b38cf50aebd26ee153 für mehr Details.
eren 7 سال پیش بسته شد
برای پیوستن به گفتگو، وارد شودید.
بدون نقطه عطف
بدون مسئول رسیدگی
2 مشارکت کننده
درحال بارگذاری...
لغو
ذخيره
هنوز محتوایی ایجاد نشده.