Solution
If you're trying to get data from a communication protocol (Modbus for example), and you use Flatten to String and Unflatten from String functions to process this information, make sure that you're always sending data to the Unflatten From String function since it needs data to work correctly. Rarely when the communication occurs for the first time there is no data in the buffer, so these functions interact with nothing, and it is in this case where the error shows up. In the following image, you will see an initialized array, and the program works correctly.

But using an array that is not initialized, and you try to run the program, the error will appear.