Dear forum,
I’m desperate! I’m cracking my head on this SIGSEGV all day and can’t find the source!
It’s been a long time since I tested my android app, since I was on the apothecary branch, doing the iOS side. I now switched to latest master, and I’m crashing on startup and I can’t pin point the issue.
The crash happens on:
static {
try{
Log.i("OF","static init");
System.loadLibrary("neondetection");
if(hasNeon()){
Log.i("OF","loading neon optimized library");
System.loadLibrary("OFAndroidApp_neon");
}else{
Log.i("OF","loading not-neon optimized library");
System.loadLibrary("OFAndroidApp");
}
}catch(Throwable e){
Log.i("OF","failed neon detection, loading not-neon library",e);
System.loadLibrary("OFAndroidApp"); // <<=====THIS LINE
}
Log.i("OF","initializing app");
}
So I tested the examples and they do work, so it’s not an enviromental issue. So I started stripping down more and more code until I was left with almost nothing - and it fixed it. So I started putting back cpp files to be compiled, and the problem returns, but it seems that I have to do a clean and rebuild each time in order to see if the problem currently exists or not, other wise it may not refresh it properly. Now I don’t actually run more code, I just add more classes that are unreachable. It seems that something that I compile causes this, but I have no clue on how to know what is actually wrong!
The logcat says:
Fatal signal 11 (SIGSEGV) at 0xfffffffc (code=1), thread 9216
Right after it tried to load that neon lib, fails, goes to the catch and tries to load the not-neon one.
I’ll reiterate: it’s not an environmental issue. When I remove most of my cpp files and stay with a skeleton, the same problem does load, it’s just when I add my other classes it fails.
Any push in the right direction will be greatly appreciated!!
Thanks!
Tal