Arduino locks up, powering down doesn't fix but serial monitor does

Thanks for all the comments - I'll look at C strings also.

It doesn't seem that there are any thoughts about what could cause the lock up or cause the lock up not to be cleared by power cycling. Can anybody suggest how I can trouble shoot it better when it happens. Before, I just cycled power and activated the heat system so that there would be some data to record. When I did that a couple of times without success, I connected a computer to the UNO board (without taking power away) and opened the serial monitor. It then started working. What can I do to troubleshoot other than having a computer connected all the time (Not practical since it only happens every 3 months or so)? Maybe if I routinely cycle power before it happens (like put a timer on the electrical outlet that turns off power every week), I can at least keep it running....... not too elegant, but that's where I am now.