Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GETAsync & POSTAsync are invalidating the Client property of the TMARSClientResourceXXX component resulting in Access Violations on 2nd & subsequent calls #98

Open
stuartclennett opened this issue Sep 18, 2020 · 2 comments
Assignees

Comments

@stuartclennett
Copy link
Contributor

stuartclennett commented Sep 18, 2020

GETAsync and POSTAsync leave the MARS Client property of the Resource Component (e.g. TMARSClientResourceJSON, TMARSClientResourceFormData, TMARSClientToken) in an undefined state.

Second and subsequent calls using the resource fail with access violation.

Open the MultipartFormData demo project.
Compile and run the server
Compile and run the client with debugging
Click "Select and Send" - select an image, the result is a valid JSon
Place breakpoint on FMXClient.DataModules.Main line 57 : HelloWorldRes1.PostAsync(nil, ...
Click "Select and Send" again.
At the breakpoint, inspect the HelloWorldRes1.Client property - note that it is invalid (either nil, inaccessible or contains empty property values - i.e. no engineURL).
Proceed to execute (F9) and note that the call will fail.

Setting the specificClient property does not workaround this.

@kitesoft
Copy link
Contributor

kitesoft commented Dec 3, 2020

hi
do you have a temporal workaround for this bug?

@andrea-magni
Copy link
Owner

hi
do you have a temporal workaround for this bug?

I've just pushed a first tentative fix for POSTAsync (so be aware GETAsync and the other methods are still affected by the issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants