2025-07-21 16:53 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001890Spring engineLinuxpublic2011-01-01 20:20
Reporterjandd 
Assigned Toabma 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionunable to reproduce 
Product Version0.81.2 
Target VersionFixed in Version 
Summary0001890: Java AI JNA crash on Debian
DescriptionAfter trying to get the Java AIs running in the Debian packaged version of spring together with hoijui we got stuck last night. I fixed a bug in Debian's version of libjna-java to properly load the platform specific .so file and got to another bug that produces the following stacktrace (with HughAI):

<SkirmishAI: HughAI 0.1 (team 1)>: Creating new cachefile for mod Balanced Annihilation V7.12
0 ms INFO: Generating indexes mod Balanced Annihilation V7.12
Segmentation fault (SIGSEGV) in spring 0.81.2.1
Stacktrace:
spring [0x8f7407]
/usr/lib/jvm/java-6-sun/jre/lib/amd64/server/libjvm.so [0x7f4ead3b8acd]
/usr/lib/jvm/java-6-sun/jre/lib/amd64/server/libjvm.so [0x7f4ead3b608b]
/usr/lib/jvm/java-6-sun/jre/lib/amd64/server/libjvm.so(JVM_handle_linux_signal+0x170) [0x7f4ead3b9660]
/usr/lib/jvm/java-6-sun/jre/lib/amd64/server/libjvm.so [0x7f4ead3b5f9e]
/lib/libpthread.so.0 [0x7f4ebb446990]
spring(skirmishAiCallback_UnitDef_MoveData_getMaxSlope+0x10) [0x993f10]
/usr/lib/libffi.so.5(ffi_call_unix64+0x4c) [0x7f4e90790f18]
/usr/lib/libffi.so.5(ffi_call+0x204) [0x7f4e90790cb4]
/usr/lib/jni/libjnidispatch.so [0x7f4e9099a47e]
/usr/lib/jni/libjnidispatch.so(Java_com_sun_jna_Function_invokeFloat+0x18) [0x7f4e9099a8b8]
[0x7f4e888d6f50] # NOTE: no path -> not translating

The bug is reproducible with both Sun JRE and OpenJDK's JRE. The Java AI Interface is compiled using OpenJDK (which is the default JDK on Debian AMD64).

I experimented with the JNA jar file which is bundled with the spring tarball but got the same result.
Additional InformationThe current spring packaging code is available from http://git.debian.org/?p=pkg-games/spring.git
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0004819

hoijui (reporter)

HughAI is long unmaintained, and even before that, it was hardly ever tested, so it might well be a problem with HughAI.
One particular limitation of the JavaAI Interface is, that only a single thread is allowed to call back to the engine, and it has to be the same thread that receives the events from the engine. Could be that HughAI violates this.. in theory (though i have seen it working already).
The bad thing is.. as said HughAI is not really reliable.. nobody still active in the community knows much about it, but it is the only Java AI with sources publicly available that really does something.

~0006181

abma (administrator)

please retry with curren version, as i couldn't reproduce this.
+Notes

-Issue History
Date Modified Username Field Change
2010-04-08 20:22 jandd New Issue
2010-04-11 10:51 hoijui Note Added: 0004819
2011-01-01 20:19 abma Severity minor => crash
2011-01-01 20:19 abma Note Added: 0006181
2011-01-01 20:19 abma Status new => resolved
2011-01-01 20:19 abma Resolution open => fixed
2011-01-01 20:19 abma Assigned To => abma
2011-01-01 20:20 abma Resolution fixed => unable to reproduce
+Issue History