+1 vote

Sorry if this is obvious but I'm very new to this engine. I made a very simple platformer from a tutorial and I constantly get the errors listed below the moment I run the game. I have no idea how to debug this and it does not seem to cause any side-effects. There is no Stack Trace.

I did notice that deleting my Player and Enemy characters from the scene also gets rid of the errors.

0:00:00:0570 - Condition ' Math::isnan(paabb.size.x) ' is true.
returned: 0
---------- Type:Error Description: Time: 0:00:00:0570 C Error: Condition ' Math::isnan(paabb.size.x) ' is true. returned: 0 C
Source: core\math\octree.h:807 C Function: Octree::create

When I delete only the player from my starting scene I get this error instead:

0:00:00:0691 - Condition ' paabb.position.y > 1e15 ||
aabb.position.y < -1e15 ' is true. returned: 0
---------- Type:Error Description: Time: 0:00:00:0691 C Error: Condition ' paabb.position.y > 1e15 || paabb.position.y < -1e15 ' is
true. returned: 0 C Source: core\math\octree.h:802 C Function:

My code:

Character.gd (Player and Enemies inherit from this)

extends KinematicBody2D

var Hitpoints = 1;
const GRAVITY = 20
const UP = Vector2(0, -1)
var Motion = Vector2()

Player code



extends "res://Scripts/Character.gd"

var Direction = 1
var MoveSpeed = 20

export var HasCliffDetection = true
export var HasWallDetection = true

onready var RayLeft = get_node("RayLeft")
onready var RayRight = get_node("RayRight")
onready var RayDownLeft = get_node("RayDownLeft")
onready var RayDownRight = get_node("RayDownRight")

func _ready():

func _physics_process(delta):
    if HasCliffDetection and is_on_floor():
    if HasWallDetection and is_on_floor():

func Move():
    Motion = Vector2(MoveSpeed * Direction,GRAVITY)
    Motion = move_and_slide(Motion, UP);

func CliffDetection():
    if (Direction == 1) and not RayDownRight.is_colliding():
    elif (Direction == -1) and not RayDownLeft.is_colliding():

func WallDetection():
    if (Direction == 1) and RayRight.is_colliding():
    elif (Direction == -1) and RayLeft.is_colliding():

func Flip(newDirection = 0):
    if (newDirection == 0):
        Direction *= -1
        Direction = newDirection

    #$BaseEnemySprite.flip_h = (Direction == -1)

Note that removing Character.gd and deriving directly from KinematicBody2D still produces the same errors.

in Engine by (21 points)
edited by

I don't have an answer for you but I do have a tip. You don't need all those 'pass' statements except for the one on the func _ready().

All pass does is suppress syntax errors on empty blocks

Ah thanks good tip!

I'm also having a similar problem in my project, with the difference that in my case it crashes on the common case and if I'm lucky I get the position error and don't crash. I'll link the stack trace:

>   [Inline Frame] godot.windows.opt.tools.64.exe!List<Octree<pixiel::Construct,0,DefaultAllocator>::PairData *,DefaultAllocator>::push_back(Octree<pixiel::Construct,0,DefaultAllocator>::PairData * const &) Line 229 C++
[Inline Frame] godot.windows.opt.tools.64.exe!List<Octree<pixiel::Construct,0,DefaultAllocator>::PairData *,DefaultAllocator>::operator=(const List<Octree<pixiel::Construct,0,DefaultAllocator>::PairData *,DefaultAllocator> &) Line 448  C++
godot.windows.opt.tools.64.exe!Octree<pixiel::Construct,0,DefaultAllocator>::Element::operator=(const Octree<pixiel::Construct,0,DefaultAllocator>::Element & __that)   C++
godot.windows.opt.tools.64.exe!Map<unsigned int,Octree<pixiel::Construct,0,DefaultAllocator>::Element,Comparator<unsigned int>,DefaultAllocator>::_insert(const unsigned int & p_key, const Octree<pixiel::Construct,0,DefaultAllocator>::Element & p_value) Line 355   C++
[Inline Frame] godot.windows.opt.tools.64.exe!Map<unsigned int,Octree<pixiel::Construct,0,DefaultAllocator>::Element,Comparator<unsigned int>,DefaultAllocator>::insert(const unsigned int &) Line 564  C++
godot.windows.opt.tools.64.exe!Octree<pixiel::Construct,0,DefaultAllocator>::create(pixiel::Construct * p_userdata, const AABB & p_aabb, int p_subindex, bool p_pairable, unsigned int p_pairable_type, unsigned int p_pairable_mask) Line 805  C++

removing define REALTIS_DOUBLE solved it for me

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.