Ah, yes, that one is very common.
You have to hit the wall in just the right spot. It's worse with Shadow because he doesn't have Gems to break the game like Sonic does.
Shadow is the worst character in that game. He's like a worse, slower Sonic with a crappy Homing Attack and no Spin Dash. And he doesn't have nearly as many exploitable glitches like Sonic or Silver.
Ahh. Nope, I had to restart the game. I think I wound up standing inside it, so I couldn't wall-run to get the game to let me out.