Closed geekrelief closed 3 years ago
After doing some stress tests with generating lots of bullets, I can make various crashes occur in ORC/ARC. I tried instantiating 10K bullets on start and could only instance a little over 4K. I tried shortening the interval for bullet generation and managed to generate 3,148 before crashing ORC.
Then I tried disabling hot reloading, and the crashes disappeared. I'm guessing something is wrong in Watcher since in one of my tests a crash occurred while in the enter_tree
method of bullet
.
Another workaround with hot reloading, is to space the instantiation over time. Crashing is much more likely to occur when you need to create a lot of instances in a very short period of time.
When Watcher connects
to a node, it seems ORC is prone to crash on reload when lots of nodes have been instanced. Switching to node_removed
on SceneTree seems to be more stable (no crashing after instancing lots of nodes so far).
I tried switching back to tree_exiting
on Node and used the binds
argument on connect
to pass in the instance id to avoid creating a closure to capture the instance id when unregistering. I tried disconnecting inside unregister_instance
but still crashed.
Getting this random crash after hot reloading a bunch of times. Looks like nim ORC is trying either call a bad function in
trace
or gets bad data.nim version: 3b963a8150e3c541859931a1ef9ecb338e46907f