#Tracking queue_free() sequence

6 messages · Page 1 of 1 (latest)

prime shadow
#

When queue_free() gets called on a node, is it possible to track exactly when the item gets freed at the end of the frame? I am experiencing a seemingly random crash related to freeing nodes during a level cleanup sequence. What I need to know for debugging is what object(s) the engine fails to free.

#

Tracking queue_free() sequence

violet oxide
#

Have you tried setting a breakpoint and stepping through the code?

prime shadow
#

i don’t think breakpoints would be an option because of how queue_free works, it will execute first but what it does will only have an effect after the frame has finished (i.e. the items aren’t deleted immediately as the method is called)

#

my method in question executes queue_free on lots of nodes in one call

misty ocean
#

There's the NOTIFICATION_PREDELETE you could look for. Just override _notification() and check for it. You can do any logging/printing or even breakpointing you want then.