It worked in galaxy nexus, but now when using Samsung S4 it suddenly gives fatal signal 11 upon start. I havn’t changed anything in my code.
I have installed other games on my galaxy nexus, made by myself with jme3, and they all work fine. Just this one that doesn’t co/op.
I found another thread (only one) about fatal signal 11. And it seems like the problem was that you attach the geometry directly to the geometry.
I, on the other hand, does not attach anything to this controller. I simply get the position of it and adjust my geometries by that.
Anyhow heres (part of) my code:
[java] public class PlayerBody extends RigidBodyControl{
public PlayerBody(Person person){
super(new SphereCollisionShape(0.8f),0.2f);
}
}[/java]
Anyone has any idea of what might be causing this?
Native bullet (which is used for android due to jbullets slowness there) still isn’t finished. Especially the collision code still is buggy and theres few checks or fallbacks to avoid native crashes. Is the sphere maybe colliding already at the beginning? Do you add or remove any object twice? Bullet doesn’t like that. Generally you give way too few info on whats actually happening or what part of your code fails. If you don’t know, use System.out.println’s until you find out to where it gets before crashing.
What seems to be happening is that the game starts twice.
[java] public MainActivity() throws Exception{
Log.d("adde", "Starting");
appClass = "start.MainClass";
eglConfigType = ConfigType.FASTEST;
exitDialogTitle = "Exit?";
exitDialogMessage = "Do you wish to exit?";
eglConfigVerboseLogging = true;
screenOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
mouseEventsInvertX = false;
mouseEventsInvertY = false;
if (thais != null){
//throw new Exception("Multiple instance of class MainActivity is NOT ALLOWED.");
}
thais = this;
}[/java]
First this code is run once.
Then
[java]public MainGame(){
Log.d(“adde”, “New maingamee created”);
app = this;
}[/java]
But it never reaches to simpleInitApp()
Instead it runs
[java]public MainActivity() throws Exception{
Log.d(“adde”, “Starting”);
appClass = “start.MainClass”;…[/java]
again.
MainClass extends MainGame btw.
But as for this problem I have found no way of solving it. Why would it startup twice?
Hm throw and catcha exception in the doubl eclaled method, (in the catch write it to a file, at the end you should have two stacktraces written down with the path they were called from) Maybee this helps further.
I can uncomment that throwing of exception that I made but that doesn’t help. It will just throw the exception then. If I throw, it why catch it at the same place? I could just use println instead then…
Not sure I understand what u ment…
@Addez said:
I can uncomment that throwing of exception that I made but that doesn't help. It will just throw the exception then. If I throw, it why catch it at the same place? I could just use println instead then..
Not sure I understand what u ment..
He just wants you to be able to see the calling stack trace for who is calling the method both times. Generating and printing an exception is an easy why to do this. You don’t even have to throw it.
new Throwable().printStackTrace();
…for example, will dump the current stack trace to System.out.
Now I’v fixed the problem with double initiation. It will start twice, but the first one close, then I reset thais (this variable) and then the new one starts.
The thing that makes the game restart is this line:
[java]screenOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;[/java]
If I remove this, the game starts only once.
But get fatal signal 1 between creating SimpleApplication instance and the simpleInitApp() .
On the other hand if I keep the screenOrientation line and let it start twice. Then it does not even create a SimpleApplication object and does not run a simpleInitApp at all either.
Changing my own exception throwing with this
[java]new Throwable().printStackTrace();[/java]
Will also only print fatal signal 11 and nothing more.
Man Im so stuck on this…
@Addez said:
Changing my own exception throwing with this
[java]new Throwable().printStackTrace();[/java]
Will also only print fatal signal 11 and nothing more.
Man Im so stuck on this..
Note: that idea was not to replace any existing exception handling you are doing. It purely a way to get DEBUG info on what the calling stack trace is. It will show you who called what methods and so on that led to where you are. It’s a good way to hunt down why things happen twice when they aren’t supposed to, etc…
But anyway, I have no idea what a println does on an Android device. That was just an example. You might have to print the trace to a file or something.