You are not logged in.
Hi Arnaud,
starting from this (github) commit:
commit e4e52e6605cb7935c1828c93fcff979cb8092ae5 (HEAD)
Author: Arnaud Bouchez <fakeaddress@synopse.info>
Date: Fri Apr 7 20:02:16 2017 +0200
refactored JSONToObject() to use OOP for maintainability
I got a problem:
I define a method like this:
procedure Proc3(Dummy: integer; InParam: TMyClass; out Param1: TMyClass);
the method is successfully called, but an 'Invalid pointer operation' is raised exiting the method implementation.
Note that the problem arises only if the input parameter of type object is defined.
on
procedure Proc2(Dummy: integer; out Param1: TMyClass);
there are no problems.
I tracked down the issue until the TServiceMethodExecute.AfterExecute procedure:
for i := 0 to ArgsUsedCount[smvvObject]-1 do
fObjects[ i ].Free;
It seems that the fObjects[0] reference (the input parameter) is not valid when Free is called.
With the previous commit, the problem is not there.
To ease your debug, I uploaded to
https://drive.google.com/file/d/1S7OcY2 … sp=sharing
a small demo that triggers the problem when Proc3 is called ( eg pointing a browser to http://localhost/root/test/proc3?Dummy=42 )
Thanks a lot fr your support!
Last edited by CycleSoft (2018-04-26 16:37:42)
Offline
This was indeed a very nasty bug...
Thanks to your simple project to reproduce the problem, I was able to fix it quickly.
See https://synopse.info/fossil/info/21c90be709
Thanks for the very good report!
Offline
You guys have the best support a developer can dream!
Many thanks for the quick fix!!
Offline