You say that you only posted part of your code, so you may already be doing the following things.
[ol]
[li]You didn’t allocate any memory in your example, glReadPixels fills the array pointed to by the last parameter, so if is an illegal pointer that may be your problem[/li]
[li]Don’t read stencil bits as floats, it may not be a problem, but they make no sense as floats so…[/li][/ol]
I hope that helped you