You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing an access violation issue when there is a high level of concurrency with multithreading. I have a service that receives JSON data to insert a record into a database table. I'm using Neon to deserialize the JSON and map it to a class.
When I receive a request in my service, I handle it like this:
TTask.Run(
procedure
begin
TPersistencia.Insert(StompFrame.Body, FConf, StompFrame, Self.FStompClient);
end
);
In my tests, I sent the exact same JSON 1000 times, and occasionally, during the execution of the process, an access violation occurs when TNeonDeserializerJSON attempts to read the JSON to populate the class:
LReader := TNeonDeserializerJSON.Create(LConfig);
LReader.JSONToObject(LClasseTabela, LJSON); //<< AV occurs here
If I remove TTask, it works fine but is slower, and I need it to be faster. How can I address this problem?
Here is the callstacks of Delphi:
The text was updated successfully, but these errors were encountered:
I'm experiencing an access violation issue when there is a high level of concurrency with multithreading. I have a service that receives JSON data to insert a record into a database table. I'm using Neon to deserialize the JSON and map it to a class.
When I receive a request in my service, I handle it like this:
In my tests, I sent the exact same JSON 1000 times, and occasionally, during the execution of the process, an access violation occurs when TNeonDeserializerJSON attempts to read the JSON to populate the class:
If I remove TTask, it works fine but is slower, and I need it to be faster. How can I address this problem?
Here is the callstacks of Delphi:
![image](https://private-user-images.githubusercontent.com/71415962/279414469-b655f352-8bda-441b-8558-e0d41ac96d50.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NDY4NjcsIm5iZiI6MTcxOTc0NjU2NywicGF0aCI6Ii83MTQxNTk2Mi8yNzk0MTQ0NjktYjY1NWYzNTItOGJkYS00NDFiLTg1NTgtZTBkNDFhYzk2ZDUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDExMjI0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE4YjMwNmVhZmQwMjUzYjM1ZWU3ZWM3MTM3YWQ5OGNjOWYyMmQ2ZGQ3OTMxODAwNjYwZTY4MWFkNDQ1NTI5ZjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gF2VYFMY79FYOfJG14i3O4UZEttuTkgP99EXcWb_dRg)
The text was updated successfully, but these errors were encountered: