hardware serial already used.
Both of them?
Any ideas what could cause this problem?
You've probably stomped on memory you don't own, writing past the end of an array or writing to an uninitialized pointer.
But, of course, that's just a guess because, despite posting code being a requirement for posting in the Programming section, you failed to post any code.