I've only ever had this happen once, and I've never had it happen again. in Sonic 2, Chemical plant zone, in the area where you have a ramp(corner) then you end up flying up to the two platforms that are rotating, I've had it glitch to where I went 'through' the ramp and ended up inside one of the floor blocks. I couldn't get out either. I was trying to see how fast I could spindash right before it, and that happened. I had to wait for the time to run out (Which sucked bit time cause this is near the beginning). Sadly, I don't have a screenshot for this, and it's never happened again.