I have weather base station that used to run a Photon with 0.6.3 and an RFM69 radio. It ran for months without a single hitch running 0.6.3. Since the upgrade to 0.7.0, it has locked up twice in the last week. There is an LCD screen that alternates two lines of output every 5 seconds. Both times that the device locked up, the screen was not rotating the text. The weird thing was that when I lifted up the case there were no lights showing on the Photon.
I do have a watchdog timer set:
ApplicationWatchdog wd(60000, System.reset);
I don’t want to blame 0.7.0 yet, but it certainly seems funny that the device is locking up when it ran for so long before upgrading. I was thinking of downgrading to 0.6.3 but before doing that I wanted to tap into the collective knowledge of everyone here.
If there are specific questions I can answer about the setup please let me know. Here is a quick description of the hw/sw:
And second the AWD does only provide "virtual" insurance against hanging code.
When you call delay() in non-threaded mode or Particle.process() the AWD will be checked-in and hence it won't fire.
Also it's possible that your free RAM got reduced with 0.7.0 just tipping your project over the edge in some cases which didn't happen with 0.6.3.
If you have a 0.6.3 device and a 0.7.0 you could check the stats side by side either by adding a System.freeMemory() readout or by adding SerialLogHandler traceHandler(LOG_LEVEL_ALL) and take the reading provided by the system.
Thanks for the reminder on the AWD stack size. I remember reading that when it came out but forgot to follow up. For what it’s worth, here is the output from the compile regarding memory:
Seems the memory issue may be not the cause - pitty tho’
These sporadic issues are a PITA to debug.
I’m not aware of any systematic problems that would explain your symptoms with 0.7.0 once it’s got installed correctly, so we may need more info to reproduce the issue.
Well, I started it at 5:41am EDT, Sunday morning and it crashed again at 5:12am EDT this morning. The last free memory reading at 5am was 49,168. There are no error messages of any kind in the logs. The last SRR was “Code Flash”, although I know I didn’t flash code at 5:12 this morning.
The interesting thing is that everything rebooted without hanging up. So, does that mean that at least the AWD fired after 60 seconds and didn’t lock things up since increasing the stack space? If that’s true, at least the cure worked but that doesn’t answer why the device reboots randomly after upgrading to 0.7.0.