Hi Zachary,
Welcome to the community!
As you said, the issue is probably in the program code rather than an issue with the card itself. Service mode means that a critical error occurred during runtime that the application couldn’t recover from. One possibility is that changing the value of this variable is causing a memory access violation or a divide by zero error for example.
In order to figure out what specifically is going wrong, you’ll need to take a look at the system log. This can be done from Automation Studio or by getting a log file off of the panel. There was a previous post that shows you how to do this here.