#1 2022-10-17 10:13:01

zekeriye
Member
Registered: 2016-06-09
Posts: 15

at interface based service Client side access violation error

hi;

Firstly, sorry for my bad english and this long post
I am newbie delphi and mormot.
I am playing some sample app with mormot.
I make some minor modification Samples\ThirdPartyDemos\George\REST-tester  app.
My app is interfacebased and  I have got many interfacebased functions over than 130.
So I made same change server and client side for this functions I make sections (make groups) over this functions.
For example; Customer, Bank, Crm etc.

HttpServer/Client start without any authentication (using http_Socket)
All of Server functions working with tested using Postman (http:/localhost:9031/...Methods/Function_name)
I haven't got any error at the server side.
in the client VCL program (At the Client side) sometimes has got error access violation at line
   TSQLRestClientURI.Services.Resolve(I...Methods, ...Methods);

Changed server section to working multiple TSQLRestServer with TServiceFactoryServer
like this 

https://gist.github.com/zbozkurt/413bcc … 5ff71b7d98


Can any body help me to solve this problem?

Last edited by zekeriye (2022-10-17 10:41:52)

Offline

#2 2022-10-17 10:22:51

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,231
Website

Re: at interface based service Client side access violation error

Please follow the forum rules and don't publish code in the thread directly, but on gist.
https://synopse.info/forum/misc.php?action=rules

Offline

#3 2022-10-17 10:45:43

zekeriye
Member
Registered: 2016-06-09
Posts: 15

Re: at interface based service Client side access violation error

Thanks admin, I put the code on gits.

Offline

#4 2022-10-17 10:52:27

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,231
Website

Re: at interface based service Client side access violation error

Where is the exact location of the access violation in mORMot source?

My guess (which is likely to be wrong) is that your local service interface variable like CustomerMethods are not properly released before assignment.

Offline

#5 2022-10-17 11:01:07

zekeriye
Member
Registered: 2016-06-09
Posts: 15

Re: at interface based service Client side access violation error

How can I interface variable properly released before assignment correctly?

Offline

#6 2022-10-18 10:43:29

zekeriye
Member
Registered: 2016-06-09
Posts: 15

Re: at interface based service Client side access violation error

Thanks AB for your great support. I find that I didn't assign nil to child object of Client. sad

Offline

Board footer

Powered by FluxBB