The current RQuantLib version tends to crash when a function is called with bad parameters, f.i. negative volatility or a value that does not fit to strike and spot price. After a crash, all RQuantLib functions return 0.

Print out the parameters that you pass to contractVol. Try the same parameters in a R session. You'll then get an error message that might tell what the problem was.