voxelgame
voxelgame copied to clipboard
Attempt to call function 'XXX' in base 'previously freed instance' on a null instance
Hello folks!
I'm playing with the Blocky scene and everything work good so far, but when I try to do some "extreme" tests, like fly high enough until all blocks is fadeout and then fall off to the ground, I got some random errors like this:
Attempt to call function 'raycast' in base 'previously freed instance' on a null instance.
I've tried to fix'em by add some:
if is_instance_valid(self) == false || _terrain == null || is_instance_valid(_head) == false:
return
But it seems to be a concurrent issue, like other thread destroyed the object while the script is using it (this is just a guess).
So my question is: How to get rid of those errors, without flooding if statements everywhere?
Note: I'm new to godot engine, I'm learning it just because I saw this aweoame library.
I get these often also in Zylann's demo scenes. But I rarely get them in my own. I think it might have to do with the debug information. Try turning that off, or experimenting with the fps_demo branch on my fork (which is still using the old raycast collision based model, but you can comment out any raycast stuff) or create your own scene from scratch and see if you continue to get errors.
I still get some errors (fewer tho) after disabling debug info. But I'll test on my own project and scene and check if it persists.
Thanks for the help!
I just pushed an updated fps_demo branch that is designed to work with the collision PR of voxel tools. My scenes have been very stable for me.
Is this still an issue? I haven't had the issue in the title for a few months now, and raycast/collision is now in physics and is pretty solid. The rare crashing I get is from Bullet I believe, not VT.