I know this is an error with accessing memory outside the readspace but i have absolutely no idea how to fix this. I'm new to android, so i don't exactly know how to print out a more detailed error list from logcat in eclipse. I've tried everything from disposing literally everything, to calling System.gc to setting all my variables to null. However, whenever i switch screens the fatal signal occurs. I just need someone to tell me what exactly is going on or how i could get more details about the error.
Asked
Active
Viewed 1.2k times
1
-
1Well SIGSEGV is a termination signal sent by UNIX to kill a process that violates memory in some way. Your fault address is 0x00000000, which means you've got a null pointer. Without more, I'm not sure what else we can do. – guyfleeman Feb 26 '15 at 05:42
-
look this is a similar question: http://stackoverflow.com/questions/28756371/libgdx-game-crashes-with-java-platform-se-binary-stopped-working – Angel Angel Feb 27 '15 at 17:28
-
When you switch screens? My guess is that you have something that keeps reading the memory and doesn't die when everything else dies. You need to kill that thread, it doesn't get to have access to memory when it's no longer your memory. – Tatarize Oct 12 '15 at 11:44
2 Answers
1
I had the same error, what solved it was to make sure i'm on the UI thread, like this:
Gdx.app.postRunnable(new Runnable() {
@Override
public void run() {
// Your crashing code here
}
});
-
Quite commonly this is for some cases when synchronization is broken. The object is poofed because it's sent to the gpu for drawing or something and you try to read it, and get a runtime null pointer error. You can still run it in a different thread, but you must fix the sync issue. – Tatarize Oct 12 '15 at 11:46
0
In my case i received same error when i try to create a new body and attach it's fixture, from beginContact (inside Contact Listener). After i moved outside Contact Listener my body creation everything was ok. Probably some conflict appears in Fixture createFixture (FixtureDef def) because according to manual: Contacts are not created until the next time step.

Liviu
- 768
- 8
- 9