0 votes

Guys what does it error means?
My game is fine and still running but this error showing up. This is happening in this line of code:

func _on_EnemyArea_body_exit( body ):
    #print(body.get_name())
    if(body.get_name().begins_with("Enemy")):
        #arrenem.erase(body.get_name())
        arrenem.erase(body.get_name())

This is the error:

DETECTED MONITORS: 1
ERROR: Area::clearmonitoring: Condition ' !node ' is true. Continuing..:
At: scene\3d\area.cpp:247
ERROR: Area::clearmonitoring: Condition ' !node ' is true. Continuing..:
At: scene\3d\area.cpp:247
ERROR: Area::clearmonitoring: Condition ' !node ' is true. Continuing..:
At: scene\3d\area.cpp:247
ERROR: Area::clearmonitoring: Condition ' !node ' is true. Continuing..:
At: scene\3d\area.cpp:247
ERROR: Area::clearmonitoring: Condition ' !node ' is true. Continuing..:
At: scene\3d\area.cpp:247
ERROR: Area::clearmonitoring: Condition ' !node ' is true. Continuing..:
At: scene\3d\area.cpp:247
ERROR: Area::clearmonitoring: Condition ' !node ' is true. Continuing..:
At: scene\3d\area.cpp:247
ERROR: Area::clearmonitoring: Condition ' !node ' is true. Continuing..:
At: scene\3d\area.cpp:247
ERROR: Area::clearmonitoring: Condition ' !node ' is true. Continuing..:
At: scene\3d\area.cpp:247

in Engine by (45 points)

Does it happen when your Area2D exits SceneTree (it or any of its parents got freed / removed from parent)?

Because, if I get this right it looks something like this:

  1. NOTIFICATION_EXIT_TREE or "monitoring" changes to false
  2. Area loops through all object that are mapped to be inside it, to call body_exit and body_exit_shape signals
  3. If the object already have been deleted/freed this error is displayed

This is for 3d Game.

Actually I have Area3d and the enemy was freed. so what i basically did I used area exit.
1. so my next question is how can i change my variable if enemy deleted/freed?
2. How can i use body_exit without having error?

Yes! SceneTree was freed or removed

Ok I got it.. I shouldn't freed/destroy my body.object inside the area_exit() method. I will change my algorithm. Thank you very much! :)

1 Answer

0 votes
Best answer

Because, if I get this right it looks something like this:

1.NOTIFICATION_EXIT_TREE or "monitoring" changes to false
2. Area loops through all object that are mapped to be inside it, to call body_exit and body_exit_shape signals
3. If the object already have been deleted/freed this error is displayed

Ok I got it.. I shouldn't freed/destroy my body.object inside the area_exit() method. I will change my algorithm. Thank you very much! :)

by (45 points)

If you want to delete the body inside of body_exit and body.queue_free() still produces this error, you can try to do body.call_deferred("queue_free") which should call it next frame instead.

Hi Kermer thanks for your effort to answering my question.

Btw call_deffered() is not also working. Because my object is still inside the area.

The error will always display as long as the object inside that area was freed.. so meaning what best thing to do is destroy the object without giving signal to area.

this is very sad :(

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.