| Summary: | Exception is thrown when submitting the user name | ||
|---|---|---|---|
| Product: | Limited Linking Kindergarten | Reporter: | qihuadong2-c |
| Component: | Main Game | Assignee: | qihuadong2-c |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | dehezhang2-c |
| Priority: | High | ||
| Version: | V1.0 | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Bug Depends on: | |||
| Bug Blocks: | 344 | ||
|
Description
qihuadong2-c
2019-12-04 22:25:44 HKT
Steps to reproduce: 1, Run main game 2, Enter the name and submit Acutal result: The console outputs: Error java.lang.ArrayIndexOutOfBoundsException: 1 at GUI.Score.ScoreBoard.showScoreBoard(ScoreBoard.java:25) at GUI.MainPage.<init>(MainPage.java:51) at GUI.PreGamePage.actionPerformed(PreGamePage.java:123) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Expected output: No exception displayed The problem is solved by resetting the ArrayList in the scoreboard. Please try the updated version!! *** Bug 344 has been marked as a duplicate of this bug. *** The problem is solved by deleting the static function in the ScoreBoard class. Please try the updated version!! |