Bug? Impossible code to upload on MEGA 2560

Today there was a strange problem. Suddenly the code would not upload anymore. I tried an other board, the same problem. Tried everything I could come up with and the problem persisted.
Then I removed the last code I made and the problem was gone.
I made a short peice of code that does the same.

To clarify you do not need to have the RAM connected to run the test. Just compile and upload should do the trick.

#include <SPI.h>
#include <SPISRAM.h>
/* from header SPIRAM.h
 Copyright (c) 2010 by arms22 (arms22 at gmail.com)
 Microchip 23x256 SPI SRAM library for Arduino
 */
//The SPI RAM is 8x128K in size

#define CSRAM 7

SPISRAM myRAM(CSRAM); // CS pin

void setup()
{
  Serial.begin(115200);
  pinMode(CSRAM, OUTPUT);

  SPI.begin();
  SPI.setBitOrder(MSBFIRST);
  SPI.setClockDivider(SPI_CLOCK_DIV2);
  SPI.setDataMode(SPI_MODE0);

  //DANGEROUS CODE!!!!!!!!!!!!!!!!! UPLOAD DOES NOT WORK WITH THIS
  Serial.print("TESTING RAM :");
  myRAM.write(0x1FFFF,0);
  myRAM.write(0x1FFFF,85);
  if(myRAM.read(0x1FFFF)==85)
  {
    Serial.println("RAM OK!");
  }
  else
  {
    Serial.println("RAM FAIL!!!!!!!!!!");
    Serial.println(myRAM.read(0x1FFFF));
    Serial.println("Remove power, remove battery backup. Reinstall battery. retry");
    //   spiRAMTest();
  }

}

void loop()
{
  while(1)
  {
    Serial.println("do something");
  }
}

I tested this code on:
Mega 2560 R3
Mega 2560 (by sainsmart)
Mega 2560 R1 (?) Arduino board but no mention of a release code

Mega 1280 by tinker.it But here the code uploads fine.
I also tried on Arduino IDE 1.0.1 and 1.0.5. for OSX on OSX 10.7.5

About SPIRAM I have been using that library for over a year and never had any problems.

First I thought the address 0x1FFFF was outside of the address space but if I use 0x1FF00 the problem persists.
And it is strange that code that does compile correctly can cause this kind of error. It is like code execution starts before the programming has been completed. That is something that should be impossible to prevent errors like this.

If you have an older bootloader, three !!! is interpreted as something thing that halts the process. Update your bootload code, or remove the !!!s.

XD XD XD Great I would have never thought of that. The changed code works now. Thanks for the solution.