Error in String.getBytes() ?

The bug may be gone but there is such a thing as memory fragmentation. With only 2 Kb of RAM this isn't too good a thing to be courting.

With a lot of use of String, including concatenation, you may well end up with fragmentation. It isn't a bug and can't be fixed as such.

Parsing serial input is quite straightforward. Try reading this: