A search turns up a discussion where the SD library has/had a memory leak problem which would cause trouble with repeated file open/close operations. SDFat was said to not have this problem.
The 1N4148 is more than capable of handling the tiny currents from those PCB relays. Random data sheet says 300mA continuous, 500mA repetitive surge. The surge current rating being the important thing here.
I learned strlen() straight from K&R. In the several example versions of strlen() shown in that book, none check for a NULL pointer. It is simply assumed that the programmer is better than that.
It will be in the ../bin directory with the rest of the GCC programs. Runable in xterm or whatever terminal window your OS provides.
But that is of limited use. What would be really helpful is to have gdb runing when this happens. Then you could...
You should be able to use the bintools programs to look at the code. The Ardunio IDE will compile your code to a .elf file somewhere in its temp files. Find that and do something like:
.../arm-none-eabi-objdump -S file.elf >output.txt
(Program...