Nov 13, 2012 at 5:08am UTC
I don't see anything wrong with the code you have posted, so the problem probably lies somewhere else.
What is the error you are getting when it crashes?
Nov 13, 2012 at 5:15am UTC
I have a file that I have used to narrow the problem down, and it´s always the same.
"trying to create new entity"
crash. I don´t get it, I thought this would work but it does not. It works as long as I don´t kill off any of the entities.
I can´t really give more information than this, I can only guess this is somehow crashing the program since it worked flawless before I added this.
Oh and the program terminates with status 3.
Last edited on
Nov 13, 2012 at 5:20am UTC
Nov 13, 2012 at 5:21am UTC
I'd suggest going through with a debugger and seeing what the state of the program is before the crash occurs.
Nov 13, 2012 at 5:22am UTC
Last edited on
Nov 13, 2012 at 5:31am UTC
Nov 13, 2012 at 5:26am UTC
It's actually quite simple (in theory). Basically, you can set a 'breakpoint' somewhere in your code so that when the program reaches that spot, it pauses and lets you see what all the variables and such are at that point. Then you can step line by line through the code and see where crash-causing values are coming from.
Nov 13, 2012 at 6:02am UTC
If nothing is colliding (or it least shouldn't be) I'd step up the call stack to see where the collision function is being called so you can see why it is being called.
Nov 13, 2012 at 6:27am UTC
Why is it crashing? Look at the state of the variables and the crash message and then figure out why/how the data is getting into the state in the first place.
Nov 13, 2012 at 6:30am UTC
I actually solved it now, and it was just out of pure luck. I had a Cleanup function call by mistake in a Class method that got called in the loop if the object was dead.
Thanks for the help tho :) <3