I apologize in advance for the long winded nature of this message. I've been through lots of blind alleys trying to figure out this problem and although I think I've tracked it down to a string buffer overflow problem, I'm going to share with you all the gory details in case I'm wrong and it's something else.
Back before the holidays I had posted a couple of messages here saying that applications I had been using with extremely old firmware quit working when I upgraded to the latest firmware. As best I could tell I was using a version that dated way back till May of last year. I got sidetracked with that problem because in trying to diagnose it we wrestled with the problem of HQ reporting my Scout is off-line even though it wasn't. You did some things on your end which seemed to help that although I still get it occasionally. The off-line reporting thing wasn't my real problem. It was that I could no longer use the latest firmware. At first I assumed it was a conflict with my infrared library IRLib and possible TIMER3 conflicts. As it turned out that was not true either. I should have commented out my IR code and just run the sketch without it. Eventually I did that and the problem persisted. It's not a conflict with my IR code. So it had to be something with the way that I'm accessing my IR code.
My application is a big webpage that you can click on or use or use keystrokes to send commands to a Scout which in turn sends infrared signals to a TV or cable box. The crashes come most often when sending commands very rapidly. For example when you call up the cable guide and want to scroll through it rapidly by just holding down an arrow key it was likely to crash. Sometimes it would do it after just a few keystrokes. Other times it would go for 50 or 60 keystrokes before crashing. I suspected some sort of reentrant problem that perhaps I was sending one command before the previous one was completed.
I've spent three days trying to strip down my code to the bare minimum that would illustrate the problem. Then I went back to various stages of the firmware on GitHub jumping ahead a few weeks at a time until I could figure out where the problem occurred. It worked on the July 30 version of the code but not August 1. On July 31 there were more than a dozen different commits that I had to go through one at a time. Because the problem is somewhat intermittent, is difficult to clear a particular version as being a safe.
If you look at the stream of patches on that date, you will see a merge of pull requests #156 and #157 followed by a merge described as a "merge conflict that wasn't really one". It appears to me that that merge conflict commit is sort of a reapplication of 156 and 157. As best I could tell both 156 and 157 work but when you put them together with that next commit I start to get crashes. That may be think it was somehow an interaction between those two previous merges.
I was just about to package up my code for my webpage, the JavaScript that goes with it, and the Arduino sketch that I'm using. As I was packaging it up I noticed that my "version.h" on my sketch was something I'd created as custom for myself. So I patched back in a generic SKETCH_NAME "Custom", SKETCH_BUILD -1, SKETCH_REVISION "unknown". Suddenly everything started working. The custom version was based on the "version.h" from the master code repository downloaded from the solo page. It included
#define SKETCH_REVISION "2014111401-0-g87eb6af"
There was something in request 156 about removing the "banner" script command. There were also lots of string but for patches in that area. My guess is that the sketch revision string was too big for a buffer and it was overwriting something. It may not have even been this particular area of commits that cause the bug. It might just be that by adding these particular patches, you made the buffer overflow do something nasty.
So here's the bottom line.… If I go to
https://pinocc.io/solo
In the Windows section and download
http://pinocc.io/bootstrap/pinoccio-firmware.zip
I install the hardware and library folders. I install the Arduino beta IDE 1.5.8 for Windows.
I've uploaded some code to GitHub here…
https://github.com/cyborg5/stringbug
In the folder "testing" is the Arduino sketch with my IR code commented out. Basically all it does is when you send an IR command it just blinks the Pinocchio LED. I compile and upload the code to my lead Scout.
In the folder "test" is an HTML page and some JavaScript. Edit in an API token, troop ID, and Scout ID at the top of the JavaScript. Under Windows 8.1 using wamp server I launch the webpage. If you push any of the arrow keys it will send an IR command. It doesn't matter which arrow key you use, it sends the same command with three parameters. As mentioned before it doesn't really send any IR command. I've commented out my library and you don't need any special hardware. It's basically the bootstrap sketch with a couple of LED commands and my custom Scout script command.
Using the long version of SKETCH_REVISION in the "version.h" after many repeated keypresses the scout will lock up with an error message "base unit timeout…".
Shortening SKETCH_REVISION and I don't have the problem.
Note that the long version of SKETCH_REVISION is identical to the one included in the master distribution of the Bootstrap sketch in the examples folder.