Serial.print no longer working

I found only this old forum entry but nothing else. So I ask here once again:
Up to yesterday evening I had no problem working with Serial.print. But this evening it does not work any more. Uploading to my Nano works and I see that transmission blinks. But none of my Serial.println get back to me. The transmission does not blink. I tested a simple delay/Serial.println loop. No response (a flicker after each delay would be normal). I'm out of ideas. Already rebooted my Mac. No change.

Anyone got an idea where to look? Is there any warranty (the nano is only a couple of weeks old)?

Hmmm. Meanwhile I played around including re-installation and it now looks like being a compiler problem. Look at the following (just ignore what it once was meant to be):

#define P1 2
#define P2 3
int rotations=0;
int p1 = 0;
int p2 = 0;
int samples[1000];
int ptr;

void rot1 () {
  p1 = digitalRead(P1);
  samples[ptr++] = 1;
  samples[ptr++] = p1;
  rotations += (1-2*p1)*(1-2*p2);
}

void rot2 () {
  p2 = digitalRead(P2);
  samples[ptr++] = 2;
  samples[ptr++] = p2;
  rotations -= (1-2*p1)*(1-2*p2);
}

void setup(void) {
  //Set the pin we want the ISR to toggle for output.
  pinMode(P1,INPUT);
  pinMode(P2,INPUT);
  p1 = digitalRead(P1);
  p2 = digitalRead(P2);

  //Start up the serial port
  Serial.begin(9600);

  //Signal the program start
  Serial.println("Timer2 Test");

  //Start the timer and get the timer reload value.
//  attachInterrupt(0,rot1,CHANGE);
//  attachInterrupt(1,rot2,CHANGE);

//  delay(2000);
  Serial.println (ptr);
  for (int i = 0; i<ptr; i++) {
    int pos = samples[i++];
    if (pos == 1) {
//      Serial.print("1");
//      Serial.print((byte)(9));
//      Serial.print(" ");
    }
    else {
//      Serial.print(" ");
//      Serial.print((byte)(9));
//      Serial.print("1");
    }
//    Serial.print((byte)(9));
//    Serial.println(samples[i]); // uncomment this line and it does not work!!!
//    Serial.println(i); // uncomment this line to see it runs and that this line is never executed
  }
}

void loop() {
  delay(1000);
  Serial.println(1,DEC);
}

Uncomment line 56 and see that everything works fine. Now instead uncomment line 55 (println samples). Now I don't see any output from the Nano. Can anyone verify that?

Big buffer there.
Could you be running short of RAM?

Seems so. I just reduced the size and it worked. Thanks for the quick reply. Just a beginners problem....

As usual, Occam's Razor applies. :wink: