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

닫힘
kolja7 년 전을 오픈 · 3개의 코멘트
Kolja Strohm 코멘트됨, 7 년 전
아직 콘텐츠가 없습니다.
Eren B. Yilmaz 코멘트됨, 7 년 전
소유자

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) ```
Eren B. Yilmaz 코멘트됨, 7 년 전
소유자
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 년 전가 Close
로그인하여 이 대화에 참여
마일스톤 없음
담당자 없음
참여자 2명
로딩중...
취소
저장
아직 콘텐츠가 없습니다.