It sucks when that happens, doesn't it. My first roll of HP5+ in my grandfather's AE-1 ended up that way. As eddie said, always check if the rewind crank is moving when you advance the film.

I recently got a lovely, pure black roll of Provia 400X back from the lab because the mirror lock up mechanism on an RB67 lens failed to disengage. Don't feel bad about this one roll, it happens to all of us every once in a while. I'm sure others can testify.