Anarchid / zkgbai

Zero-K Graph-Based AI
GNU General Public License v2.0
7 stars 3 forks source link

IntegerInterleavedRaster.getDataElements ArrayIndexOutOfBoundsException #6

Closed PAStheLoD closed 8 years ago

PAStheLoD commented 8 years ago

I've got a few exceptions (about 4 more like these), I thought they worth a new issue.

[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: ZK boxes detected
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: LosManager initialized.
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Detected 130 metal spots in GRP
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: GraphManager initialized.
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: EconomyManager initialized.
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: MilitaryManager initialized.
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: FactoryManager initialized.
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Large Map Detected: Enabling Air Starts.
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Checking Veh Pathability..
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Path Check Failed: unreachable mexes.
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Average Relative Path Cost: 1.4227375
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Checking Hover Pathability..
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Path Check Failed: unreachable mexes.
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Average Relative Path Cost: 1.4432367
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Checking Bot Pathability..
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Average Relative Path Cost: 1.4145821
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Path Check Failed: high path costs.
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Checking Spider Pathability..
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Average Relative Path Cost: 1.1526521
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Terrain Analysis: Spider path check succeeded, enabling spiders and jumps!
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Selected Commander: Zweihander level 0.
[f=0000000] <SkirmishAI: ZKGBAI 0.5 (team 1)>: Start Position Selected!
...
[f=0034187] game_message: Reaper is under attack
[f=0034337] game_message: Reaper is under attack
[f=0034487] game_message: Reaper is under attack
[f=0034638] game_message: Banisher is under attack
[f=0035218] game_message: Reaper is under attack
[f=0035940] <SkirmishAI: ZKGBAI 0.5 (team 1)>: exception(java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
    at sun.awt.image.IntegerInterleavedRaster.getDataElements(Unknown Source)
    at java.awt.image.BufferedImage.getRGB(Unknown Source)
    at zkgbai.military.MilitaryManager.getEffectiveThreat(MilitaryManager.java:275)
    at zkgbai.military.MilitaryManager.assignRaiders(MilitaryManager.java:369)
    at zkgbai.military.MilitaryManager.update(MilitaryManager.java:908)
    at zkgbai.ZKGraphBasedAI.update(ZKGraphBasedAI.java:201)
 ) java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
[f=0035955] <SkirmishAI: ZKGBAI 0.5 (team 1)>: exception(java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
    at sun.awt.image.IntegerInterleavedRaster.getDataElements(Unknown Source)
    at java.awt.image.BufferedImage.getRGB(Unknown Source)
    at zkgbai.military.MilitaryManager.getEffectiveThreat(MilitaryManager.java:275)
    at zkgbai.military.MilitaryManager.assignRaiders(MilitaryManager.java:369)
    at zkgbai.military.MilitaryManager.update(MilitaryManager.java:908)
    at zkgbai.ZKGraphBasedAI.update(ZKGraphBasedAI.java:201)
 ) java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
...
aeonios commented 8 years ago

Fixed. (but not pushed for other reasons)