Something else which is throwing me alonng this line is this:
Say I have a "working sketch".
Somewhere in it I put a:
Serial.print("blah blah");
When I upload it, the sketch fails.
If I remove that line, it works.
I know it sounds weird, but that is the honest truth to what I see happening.
If there are other problems in there somewhere of which I know nothing, I can't declare them here.
You need to comment out a few long strings in your code to run this code, if your code is already running out of SRAM. What you described is very much like SRAM is running out.