LCD Widget Buffer Overflow

Hardware: Particle Photon (Firmware: v0.5.1)
iOS: 9.3.2
Widget: LCD

If there is an attempt to write to the LCD beyond 16 characters it results in a buffer overflow and reboots the photon.

Example:
lcd.print(0, 1, "Signal Strength: " + String(wifiSignal));

Obviously I made the mistake since “Signal Strength:” eats all 16 character places. But I would think it would make sense for the LCD widget to truncate or display error instead of putting photon into a reset loop.

Rick

@vshymanskyy is that our bug?

I may have been a bit premature on the conclusion. It is not due to surpassing the 16 character limit. It appears to have to do with combining output with the + operator. I have tested a bit beyond that but do not have a resolution.

Example that will fail:

lcd.print(0, 1, "Signal: " + wifiSignal);

Example that will work:

lcd.print(0, 1, "Signal: ");
lcd.print(8, 1, wifiSignal);

Note: This also causes issues in the terminal widget. Different there and I will elaborate if necessary.

Hope this helps.

Rick