2020-02-18 17:06 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005952Spring engineAIpublic2019-10-14 22:07
Assigned To 
Product Version104.0 +git 
Target VersionFixed in Version 
Summary0005952: Java AIs are not killed on Spring.Reload
DescriptionWhen playing multiple games in a row, Java AIs start colonizing spring's JVM memory. It's possible to reduce the impact by releasing as much memory as possible in the AI once the game is over. It would be best to kill the AI completely though.
Steps To ReproducePlay a game with a java AI.
Restart the game.
The new game has two AIs in the JVM, the old one simply doesn't receive any call-ins anymore.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

related to 0006300new AI Java AI interface sometimes throws "does not implement" error on startup 



abma (administrator)

atm this is by design:

existing env is not reused:

existing env is not freed:


Kloot (developer)

Last edited: 2018-04-09 13:00

View 2 revisions

I remember there being some sort (forgot the details) of issue with sending release events to Java AI's, which was apparently "solved" by making java_skirmishAI_release a no-op.

the Java bridge code also long predates Spring.Reload so envs not being freed wasn't a real problem until that became available and reliable.


aeonios (reporter)

Maybe that's why implementing release() didn't do anything to fix the problem. :P

I can confirm that the AI almost always fails to load by the third game in using default JRE settings. A failure to free the memory from previously instantiated AIs could probably cause that.

I'm not sure if spring crashing on shutdown is related or not, but there was at one time a correlation with java AIs and cpp AIs and crashing when running both in the same game. I'll have to test that later and maybe make a separate issue for it.


abma (administrator)

with spring.reload this makes java ais IMHO unusable -> major

-Issue History
Date Modified Username Field Change
2018-04-04 21:29 DeinFreund New Issue
2018-04-09 11:34 abma Note Added: 0018997
2018-04-09 12:59 Kloot Note Added: 0018998
2018-04-09 13:00 Kloot Note Edited: 0018998 View Revisions
2019-09-10 11:30 abma Relationship added related to 0006300
2019-09-12 08:21 aeonios Note Added: 0020143
2019-10-14 22:06 abma Severity minor => major
2019-10-14 22:06 abma Summary Java AIs are not killed on Spring.Restart => Java AIs are not killed on Spring.Reload
2019-10-14 22:07 abma Note Added: 0020187
+Issue History