Ok so I'm curious, is it a bug or just some kind of lag when you get caught on a friendly spike trap and get stuck floating like you're impaled even after the spikes go back in the ground?
It's supposed to save you from being killed, but if you're stuck in the impale animation then it is a glitch.
Traps are very inconsistent, especially the spike traps. You can take damage or die from traps that were never set to begin with, or even from allies setting traps. Enemies can also run through or not take damage from your traps if the game mistakes them as allies. It's just sloppy.