Year 2 Hawkwood, moving to Li Halan held farm at 43,12 on Rampart with infantry. Also noticed that we had lost a city to Li Halan and they offered peace, but House Window did not list us as being at war and offer peace is not an option for diplomacy with Li Halan.
Reproducible always right from start of the save.
Seems if we try to attack any empty Li Halan city, this is what happens. If we attack an occupied city there is no crash and war is declared and then attacking an empty Li Halan city results in normal capture.
The cause seems to be that showAttackConfirmWindow does not handle empty cities at all
The cause for there not being a state of war with Li Halan could be that the peace contract which they sent was sent before they replied yes to our peace contract thus while they wrote and sent their contract there was a state of war between us, but then later on the same turn they replied yes to our peace contract which was sent the previous year ... so no bug ... this also happens with original EFS1.4
Begin Stack Trace Wed Mar 01 17:02:47 EET 2017
Thread[AWT-EventQueue-0,6,main]
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.checkElementIndex(LinkedList.java:555)
at java.util.LinkedList.get(LinkedList.java:476)
at gui.Gui.showAttackConfirmWindow(Gui.java:2294)
at state.PW4.moveToNextHex(PW4.java:362)
at state.PW4.stackMoveEvent(PW4.java:132)
at gui.Gui$3.actionPerformed(Gui.java:447)
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
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)
End Stack Trace Wed Mar 01 17:02:47 EET 2017
Year 2 Hawkwood, moving to Li Halan held farm at 43,12 on Rampart with infantry. Also noticed that we had lost a city to Li Halan and they offered peace, but House Window did not list us as being at war and offer peace is not an option for diplomacy with Li Halan.
Reproducible always right from start of the save.
Seems if we try to attack any empty Li Halan city, this is what happens. If we attack an occupied city there is no crash and war is declared and then attacking an empty Li Halan city results in normal capture.
The cause seems to be that showAttackConfirmWindow does not handle empty cities at all
The cause for there not being a state of war with Li Halan could be that the peace contract which they sent was sent before they replied yes to our peace contract thus while they wrote and sent their contract there was a state of war between us, but then later on the same turn they replied yes to our peace contract which was sent the previous year ... so no bug ... this also happens with original EFS1.4
Begin Stack Trace Wed Mar 01 17:02:47 EET 2017 Thread[AWT-EventQueue-0,6,main] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.LinkedList.checkElementIndex(LinkedList.java:555) at java.util.LinkedList.get(LinkedList.java:476) at gui.Gui.showAttackConfirmWindow(Gui.java:2294) at state.PW4.moveToNextHex(PW4.java:362) at state.PW4.stackMoveEvent(PW4.java:132) at gui.Gui$3.actionPerformed(Gui.java:447) at javax.swing.Timer.fireActionPerformed(Timer.java:313) at javax.swing.Timer$DoPostEvent.run(Timer.java:245) 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) End Stack Trace Wed Mar 01 17:02:47 EET 2017