The statement selects along the ancestor node, including the current context node, looking for any elements or attributes.
Sounds like a pretty ambiguous description of the fault. Have you tried debugging to any reasonable level of isolation? There are several versions of the .NET framework available (beta, 1.0, 1.1, 2.0 beta), anything beta is unsupported. If you are querying a huge document (huge being absolutely relative to your system's RAM and avialable memory w.r.t. other running applications), then you might be receiving some type of out of memory exception?
Let's remember to be safe out there, people... don't try to run XPath statements over 5 Gig documents. It just doesn't make sense. You wouldn't pull back 50,000 rows from a database and filter on the client side, you would limit the amount of data you pull back from the database. Amazingly, the same rules of conservative memory usage apply to XML: there are 2 models, the DOM and the pull-based XmlReader parser... the DOM pulls everything into memory, the XmlReader reads one node at a time.