Okay, so it definitely works without issue on the Uno, and it definitely crashes on the Mega. Thanks for checking, SurferTim, and that is funny that just swapping the order of declaration for the two Strings fixes it.
Yeah, but are you using 1.0.1 with the bug fix included?
OP may be using version prior to 1.0.1.
The memory allocation bug is present in 1.0.1, which is what I am using.