Some may recall the lengthy discussion we had in November:
which led to my conclusion it was down to the DFR MP3 Mini Player library
I concluded that the crashes were "entirely due to the timing requirements of the DFR module. At least, in the minimalised version of post #24. I may be back if other factors emerge in the full sketch later."
Probably more helpful to report back with a new subject heading.
I did get it working with trial/error but never discovered the full explanation. The 'finished' project ran OK in situ for much of the time since, and also during many sessions back on the bench when working on new features. But yesterday it developed an almost identical failure, consistently crasheing during setup before the second play.
// Report EW during setup()
Serial.print("EW = ");
Serial.println(eventWindow);
myDFPlayer.play(171); // "Event window is..."
delay(1300); // Actual duration is 1210, but more proved necessary
myDFPlayer.play(eventWindow);
delay(800);
Serial.print(F("Setup ended"));
And this time it also intermittently kept resetting, repeating the same behaviour.
My first debugging step was to try the previous day's version. Same behaviour. Tried several more versions going back months: same. Naturally suspected hardware/wiring. Spent most of day on it without success. This morning, I recalled that one of the recent library updates I'd accepted took DFRobotDFPlayerMini.h
from version 1.0.5 to 1.0.6. As a longshot I reverted and the problem disappeared.
I wondered if this was also the cause of the November problem. That was confirmed on viewing
EDIT: Attempt to remove unwanted large print.
July 1 'stuck on play'
July 13 'Arduino Stuck after trying to stop DFPlayer'
31 Oct 'Latest Version is not working (Hanging Arduino) when using multiple SoftwareSerial'
etc
The users switched back to 1.0.5 like me. (None of the above had a response from the developer, as usual.)
Any other users of the current library, 1.0.6, had similar obscure problems?