Arduino Nano - Runtime Library Version Mismatch

I'm encountering an "Assertion failed" error when compiling my Arduino sketch. I've reset the IDE settings but the issue persists. I'm not using external libraries and I'm on the latest Arduino IDE version for macOS. Any ideas?

Error message:
assertion failed [header->version <= kProjectSourceVersion]: runtime library is newer than runtime
(Library.cpp:99 init)
signal: trace/BPT trap

Compilation error: signal: trace/BPT trap

Please provide a few more details such as which board you are using and the sketch that you were compiling

Are you using IDE 1.x or IDE 2.x ?

I'm using Arduino IDE 2.3.1, Arduino Nano board (ch340c), and running a basic sketch to test my LED and board.

By posting a picture of your sketch you have prevented it being copied for testing

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

/*------- Hardware configuration -------*/
const int  redPin   = 2;         // pin red LED is attached to 
const int  greenPin = 3;         // pin for green LED
const int  bluePin  = 4;         // pin for blue LED
const byte debugPin = 13;        // pin that we put debug output on (set to 255 to disable)
                                 // (most Arduino's have a built in LED on pin 13...)
  
/*-------------------------------------------*/
/* Initializization code (run once via call from Arduino framework) */
void setup() {
  // establish direction of pins we are using to drive LEDs 
  pinMode(redPin, OUTPUT); 
  pinMode(greenPin, OUTPUT); 
  pinMode(bluePin, OUTPUT);
  pinMode(debugPin, OUTPUT);
}

/* Main routine (called repeated by from the Arduino framework) */
void loop() {
    // For this version we just flash the LEDs one after the other...
    
    // Turn LED on by setting corresponding pin voltage high
    digitalWrite(debugPin,HIGH); 
    // Delay here (leaving the LED on) for 250msec (1/4 sec)
    delay(250); 
    // Turn it off
    digitalWrite(debugPin,LOW);
    
    // Do that again for the red (1x), green (2x) and blue (3x) ones in sequence
    digitalWrite(redPin,HIGH); delay(250); digitalWrite(redPin,LOW);
    delay(500);
    digitalWrite(greenPin,HIGH); delay(250); digitalWrite(greenPin,LOW); delay(250);
    digitalWrite(greenPin,HIGH); delay(250); digitalWrite(greenPin,LOW); 
    delay(500);
    digitalWrite(bluePin,HIGH); delay(250); digitalWrite(bluePin,LOW); delay(250);
    digitalWrite(bluePin,HIGH); delay(250); digitalWrite(bluePin,LOW); delay(250);
    digitalWrite(bluePin,HIGH); delay(250); digitalWrite(bluePin,LOW);
    
    // All LEDs are now off, stay dark for 1/2 sec
    delay(500);
}  // end loop()

Thank you

Any idea what's going wrong?

My guess would be that it has to do with the IDE installation rather than the sketch

Which version of the IDE are you using ?

Using IDE 2.3.1

Your topic has been moved to the IDE 2.x category of the forum

Please be careful when selecting which forum category to start new topics in

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.