I have compiled Stockfish 16 with CMake to and SharedLibary (.so). But when i run this libary in my code, Logcat give me the following Error:
2023-07-24 18:14:11.770 0-0 lib_stockfish_s[4976] kernel I segfault at 0 ip 000071fa37c9f047 sp 00007fffb509c0e0 error 6 in lib_stockfish_sixten.so[71fa37c9f000+281c000]
2023-07-24 18:14:11.773 0-0 Code kernel I 00 00 00 40 00 00 00 00 00 00 00 88 6c 82 02 00 00 00 00 00 00 00 00 40 00 38 00 0a 00 40 00 1a 00 19 00 06 00 00 00 04 00 00 <00> 40 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 40 00 00 00 00
This is the code that i am using to load the shared libary:
File stockfish = new File(getApplication().getApplicationInfo().nativeLibraryDir + "/lib_stockfish_sixten.so");
try {
engineProcess = Runtime.getRuntime().exec(stockfish.getPath());
processReader = new BufferedReader(new InputStreamReader(engineProcess.getInputStream()));
processWriter = new OutputStreamWriter(engineProcess.getOutputStream());
} catch (IOException e) {
Log.println(Log.INFO, "Stockfish", "Error while loading Stockfish");
e.printStackTrace();
}
I was expecting that after i started stockfish i can send him the command isready but nothing happen and i get this error. (And i also geting this error when i dont send this command)