ComplexRalex/Completed-Games-Registers

[BUG] InvocationTargetException when running a jar with Java command

Closed this issue · 1 comments

Describe the bug
The program won't open due to this exception.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the directory where the jar file is located
  2. Run it with java -jar jarName.jar
  3. Wait to see the Exception

Expected behavior
Expected to show up the main window.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version of the program: 1.0.0

Additional context
I was adding new registers, but when the list got bigger, the problem showed up.

Stack trace

Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.util.ConcurrentModificationException
        at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:911)
        at java.util.ArrayList$Itr.next(ArrayList.java:861)
        at controller.GeneralController.obtainInitialValues(GeneralController.java:126)
        at controller.GeneralController.initialize(GeneralController.java:108)
        at controller.MainController.set(MainController.java:215)
        at controller.MainController.<init>(MainController.java:142)
        at MainLauncher.main(MainLauncher.java:68)
        ... 5 more

Fixed for the next update (1.0.1).