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:

begin
// 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
                begin
                   if _rawJSONList1.Text <> '' then
                   begin
                     try
                       JSONObj := TJSONObject(TJSONObject.ParseJSONValue(_rawJSONList1.Text));
                       _lastUpdated := JSONObj.GetValue('last_updated').Value;
                       if _lastUpdated <> LastUpdated then
                       begin
                         hasChanged := True;
                         LastUpdated := _lastUpdated;
                       end;
                     except
                       //TODO hanel exception
                     end;
                   end;
                   _rawJSONList1.Free;
                end);

end;

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 . . .
ERROR
[object Object] | FMessage::List index (3) out of bounds FHelpContext::0 FJSError::Error: List index (3) out of bounds FStack::@http://127.0.0.1:26560/DelphiTV.js:3438:32 @http://127.0.0.1:26560/DelphiTV.js:3444:20 @http://127.0.0.1:26560/DelphiTV.js:337:24 @http://127.0.0.1:26560/DelphiTV.js:13067:36 @http://127.0.0.1:26560/DelphiTV.js:13032:24 @http://127.0.0.1:26560/DelphiTV.js:13010:70 @http://127.0.0.1:26560/DelphiTV.js:13364:30 @http://127.0.0.1:26560/DelphiTV.js:63514:48 @http://127.0.0.1:26560/DelphiTV.js:63702:22 global code@http://127.0.0.1:26560/DelphiTV.html:1:69
at http://127.0.0.1:26560/DelphiTV.js [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.

TestApp2.zip (101.8 KB)

-- Rick Howitt

Hi,

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.