This particular bug has not been entirely fixed. The following code gives you a breathing white LED
#pragma SPARK_NO_PREPROCESSOR
#include "application.h"
class A {
public:
A() { Serial.begin(9600); Serial.print("die"); }
};
A anA;
void setup()
{
// Doing Serial.print right here before Serial.begin does not kill the core.
//Serial.begin(9600);
}
void loop() { }
If the Serial.begin is in setup() instead of the constructor, it still causes the breathing white LED.
Doing a Serial.print in setup() right before the Serial.being does not cause the breathing white led, so that bit was fixed.
I solved the problem by doing the object creation in the setup(), after the call to Serial.begin(), which, in retrospect, seems the obviously sensible way of doing it. However, this did indicate a possible underlying problem, or at least code that might be a bit more defensive. I did kill off some hours tracking this down because the references to the breathing white problem pointed other directions.