This isn't a support request, but instead a tip.
tl;dr : To get notified when the Digispark is running out of SRAM, and likely to be unstable, replace the default boards.txt file with the one attached.
The Digispark and Digispark Pro are both handy little low power microcontrollers. The Digispark Pro has more flash memory, more I/Os, and some more on-board peripherals. But they both have the same amount of SRAM, 512 bytes, which can be easily filled if you're not careful. If you write a program that is too big, the Arduino IDE will warn you, and prevent the over-sized program from being loaded. But if your program uses too much SRAM, it doesn't warn you, and you can end up with a sketch that is unstable, and doesn't do what you expect.
The fix? When the board definitions format was tweaked for the Arduino IDE v1.5, they introduced a parameter called your-board-name.upload.maximum_data_size, which tells the Arduino IDE how much SRAM your board has / or what the maximum amount of SRAM can be used by a sketch. As the ATTiny core which the Digispark is based upon pre-dates this, this entry is missing, hence the Arduino IDE doesn't warn you when you've used too much! It still does the calculation, but just doesn't warn you that you've reached / gone past the limits.
I've run some quick tests (code used to test free memory below), and it appears that 496 bytes of SRAM are available to the user sketch - the remaining 16 bytes must be used by the bootloader and/or Arduino IDE core. So, adding
digispark-tiny.upload.maximum_data_size=496 to the boards.txt file for the Digispark makes it so it starts telling you the percentage of SRAM used, and warning you when it is full. Have a look at the screenshots to see what the difference is!
I've tested out both the Digispark and Digispark Pro, and they both have the same free memory, so I have updated all the different Digispark / Digispark Pro board entries so they now report the how much SRAM is consumed.
I'll also check to see if this core is up on github so I can submit a pull request so it gets incorporated into the digispark core. Edit: Pull Request is here.
Feel free to point out any mistakes that I have made, or any improvements!

Possible paths for the boards.txt file:
Windows 10
C:\Users\user-name\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7
or
%appdata%\..\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\
You can also find it easily by going File -> Preferences on the Arduino IDE, and clicking down the bottom where the path to the preferences.txt file is.
Fancy free memory calculator sketch (uses the
MemoryFree library):
//Reported SRAM consumption
//Empty sketch: 9 bytes
//With MemoryFree Lib: 15 bytes
//With int variables: 19 bytes
//thus total "free" equals report + 19
#include "MemoryFree.h"
#define LED 1
void setup()
{
pinMode(LED,OUTPUT);
digitalWrite(LED,LOW);
}
void loop()
{
int freeMem = 0;
int temp = 0;
freeMem = freeMemory();
temp = freeMem / 100;
//count 100s
for (int i = 1; i <= temp; i++)
{
digitalWrite(LED,HIGH);
delay(1000);
digitalWrite(LED,LOW);
delay(1000);
}
delay(5000);
freeMem = (freeMem - (temp * 100)); // remove 100s
temp = freeMem / 10;
//count 10s
for (int i = 1; i <= temp; i++)
{
digitalWrite(LED,HIGH);
delay(500);
digitalWrite(LED,LOW);
delay(500);
}
delay(5000);
freeMem = (freeMem - (temp * 10)); // remove 10s
//count 1s
for (int i = 1; i <= freeMem; i++)
{
digitalWrite(LED,HIGH);
delay(200);
digitalWrite(LED,LOW);
delay(200);
}
delay(5000);
}