TMiletusStringList list index out of bounds

I have created a Class that has a WebTimer. The webtimer start every 15 seconds.
it then runs this code:

// read a JSON from a file, load the JSON into a JSONobect which is a property of the Class and then //read a value from the JSONobject

_rawJSONList1 := TMiletusStringList.Create;
_rawJSONList1.LoadFromFileAsync(JSON_PAFN, procedure
                   if _rawJSONList1.Text <> '' then
                       JSONObj := TJSONObject(TJSONObject.ParseJSONValue(_rawJSONList1.Text));
                       _lastUpdated := JSONObj.GetValue('last_updated').Value;
                       if _lastUpdated <> LastUpdated then
                         hasChanged := True;
                         LastUpdated := _lastUpdated;
                       //TODO hanel exception


the code is built for both Windows and RaspberryPi 64
the code runs fine on Windows, but on the RaspberryPi 64 it is throwing an error ever time the ontimer procedure is run. I have uploaded an image of the error and have also pasted the error message on the screen.

Waiting for Playback data . . .
[object Object] | FMessage::List index (3) out of bounds FHelpContext::0 FJSError::Error: List index (3) out of bounds FStack::@ @ @ @ @ @ @ @ @ global code@
at [13067:83]

I have checked my code for any indexes that might be out of bounds and have not found anything.
As I said this error only occurs every time this onTimer procedure is executed.

Any thought on what is causing the error?

Rick Howitt

I have been able to reproduce this error with a very simple app.
It has 2 WebTimers and 2 WebMemos.

each webTimer has an event that runs every 5 seconds and uses a TMiletusStringList.

The event uses the LoadFromFileAsync. This app runs without error on windows and on RaspberryPi 64 ( a RaspberryPi 5) the app throws and exception.

I have attached a zip file that has the project. You will need to update the software to load a file on your system. (101.8 KB)

-- Rick Howitt


Thank you for the test project, we'll investigate and report back.

We were able to reproduce this and apply an improvement. The next update will contain the necessary changes.