condition causes painful spasms